Skip to content

FPS limiter, block picking, new commands and bug fixes#60

Open
pytomprog wants to merge 8 commits into
DigitalPulseSoftware:devfrom
pytomprog:dev
Open

FPS limiter, block picking, new commands and bug fixes#60
pytomprog wants to merge 8 commits into
DigitalPulseSoftware:devfrom
pytomprog:dev

Conversation

@pytomprog

Copy link
Copy Markdown
Contributor

This pull request introduces several new features and improvements across both the client and server, with a focus on gameplay enhancements, configuration options, and scripting fixes. The most significant changes include the addition of an FPS limiter, a "pick block" feature for the block selection bar, expanded server-side chat commands, and various bug fixes and code improvements.

Gameplay and User Experience Improvements:

  • Added an FPS limiter configurable via Graphics.FPSLimit in the game config, with support for limiting frame rate in GameAppComponent and configuration options exposed in gameconfig.lua.default and related files. [1] [2] [3] [4] [5] [6] [7]
  • Implemented a "pick block" feature: players can now pick a block directly into their selection bar by interacting with it, with supporting methods in BlockSelectionBar and GameState. [1] [2] [3] [4] [5]

New chatbox commands:

  • Added new chat commands: /tpplayer <player_name> for admins to teleport to other players, /links to display community resources, and /help to list available commands. [1] [2]

Scripting and Code Quality Improvements:

  • Fixed and improved Lua scripting context handling, including proper string conversion, correct metafield usage, and improved visited table logic. [1] [2] [3] [4] [5]
  • Added missing include for Planet.hpp and exposed GetChunkContainer in the server scripting API for ServerPlanetEnvironment. [1] [2]

Other Minor Improvements:

  • Added missing includes for formatting and configuration files to improve build reliability. [1] [2]

Replaces hardcoded chunk generation logic with Lua script-based generation in Planet::GenerateChunk. Updates the function signature to accept a script name and modifies PlayerSessionHandler to use planet data from the database for chunk regeneration.
Adds a `/tpplayer <name>` admin chat command that teleports the caller to the named player's current position. The command reports when the target player cannot be found or has no controlled entity.
Adds two player chat commands: `/links` for community/resource links and `/help` for a command list, with admin-only entries shown only to admins.
Add a picked-block selection path to the block selection bar and wire middle-click picking in game state so the hotbar updates to the targeted block when available. Right-click mine and left-click place behavior remain unchanged.
Adds a new `Graphics.FPSLimit` config option with a default of `-1`, registers it in the game config, and applies frame pacing in `GameAppComponent` by sleeping to cap the frame rate when the limit is set above zero.
Fixes a few bugs in `ScriptingContext.cpp`, adds the missing `fmt/format.h` include for Win32 crash handling, and exposes `GetChunkContainer` on `ServerPlanetEnvironment`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant