Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/depilz/Solar2DGameSpeed
This is a tool made for Solar2D to control the speed of your game
https://github.com/depilz/Solar2DGameSpeed
Last synced: about 2 months ago
JSON representation
This is a tool made for Solar2D to control the speed of your game
- Host: GitHub
- URL: https://github.com/depilz/Solar2DGameSpeed
- Owner: depilz
- License: mit
- Created: 2024-05-28T01:20:04.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-28T02:26:01.000Z (7 months ago)
- Last Synced: 2024-07-31T09:10:35.820Z (5 months ago)
- Language: Lua
- Size: 17.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-solar2d - Solar2DGameSpeed - a tool designed to control the game speed. (Coding & Debugging)
README
# Solar2D - Game speed control
This tool is designed for controlling the game’s speed in Solar2D, primarily for debugging purposes. It allows you to adjust the speed of various game elements, providing a flexible environment for testing and debugging.## Controls
You can find a keyboard.lua inside the GameSpeed folder which is has the basic controls for this tool. It is in a different file since this is very likely the file you will like to change according to your project.- **Space bar:** Toggle Fast mode.
- **Left arrow key (hold):** Fast mode on.
- **Right arrow key (hold):** Slow mode on.
- **Up arrow key:** Speed++.
- **Down arrow key:** Speed--.
## Important Notes
- **Early Initialization:** The tool must be required early in the app to avoid issues with enterFrame events, transitions, or delays.
- **Debugging Use Only:** This tool is intended for debugging purposes and should never be used in production. While reliable, it lacks precision.
- **os.clock() Behavior:** The os.clock() function still returns the actual time to prevent “going back in time” when reloading the app.
- **Physics Interaction:** The tool affects physics, but using physics.setTimeScale(scale) in conjunction with this tool can cause conflicts.## Ownership and License
This tool was created by Depilz for Studycat Limited. Studycat Limited is happy to share it with the community as open-source software under the MIT License.
Feel free to adjust or expand upon this as needed to better suit your project’s specifics. If you have any additional details or sections you’d like to include, let me know!