Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/DragonRidersUnite/scale
Framework with conventions and utils for DragonRuby Game Toolkit
https://github.com/DragonRidersUnite/scale
dragonruby dragonruby-gtk dragonrubygtk game-development
Last synced: 3 months ago
JSON representation
Framework with conventions and utils for DragonRuby Game Toolkit
- Host: GitHub
- URL: https://github.com/DragonRidersUnite/scale
- Owner: DragonRidersUnite
- Created: 2022-11-26T12:28:23.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-17T23:16:39.000Z (7 months ago)
- Last Synced: 2024-05-10T13:33:14.989Z (6 months ago)
- Topics: dragonruby, dragonruby-gtk, dragonrubygtk, game-development
- Language: Ruby
- Homepage:
- Size: 309 KB
- Stars: 54
- Watchers: 7
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-dragonruby - Scale - Lightweight starter template with common helpers (Libraries, Frameworks and Wrappers)
README
# Scale
![repeating red dragon scale pixel art](https://user-images.githubusercontent.com/928367/204090457-0d096cbe-21cc-4753-9c63-f7786d165cfa.png)
**Simple DragonRuby Game Toolkit Game Starter Template**
Status: usable but not yet stable! This is pre-v1 software.
Quickly start a new DragonRuby Game Toolkit game with useful conventions and helpful extensions.
Looking for a simpler version? Check out [the `simple` release](https://github.com/DragonRidersUnite/scale/releases/tag/simple) that's just `app/main.rb` with some constants and helper methods.
[Check out the CHANGELOG for the summary of recent changes!](https://github.com/DragonRidersUnite/scale/wiki/CHANGELOG)
## Bugs / Features
Last tested against DragonRuby Game Toolkit v4.3.
- Functional approach to the code, namespaced in modules
- Use the DragonRuby GTK methods and data structures you know and love
- Driven by `args.state`
- Menus and pause screen
- Sensible default controls
- Defined location for where to put scenes
- Settings that persist to disk
- Displays framerate in the upper-right hand corner of the game when running in development mode
- `#debug?` helper to easily check if the game is running in development mode; useful for custom commands
- `#mobile?` to easily check when on mobile and M to simulate mobile
- Reload all sprites in development using the `i` key
- Reset the game with `r` key, calls `$gtk.reset`
- Put all debug-only code in `#debug_tick`
- `#init` method that gets run once on game boot
- `#version` to get the version of your game
- Constants for various values and enums: `FPS`, `BLEND_*`, `ALIGN_*`
- Tests for the methods!
- See more in [SCALE_DOCS.md](./SCALE_DOCS.md)## Use It
There are two main ways you can use the Scale template for your games.
[📺 Video demo showing how to get started](https://www.youtube.com/watch?v=eek3a3aO-zo)
### Download the Zip
The fastest way to get started is to download the template zip file and put it into your unzipped DragonRuby Game Toolkit folder.
1. Download and unzip the DragonRuby Game Toolkit engine zip
2. Delete the `mygame` directory
3. [Download Scale](https://github.com/DragonRidersUnite/scale/archive/refs/heads/main.zip)
4. Unzip the `scale-main.zip`
5. Move the `scale-main` folder into the DRGTK folder
6. Rename `scale-main` to `mygame`
7. Start DragonRuby, and make an awesome game!### Use GitHub's Template System
If you're going to track your game with Git and use GitHub, the baked-in template system will get you going quickly.
1. View the project on GitHub: https://github.com/DragonRidersUnite/scale
2. Click "Use this template"
3. Click "Create a new repository"
4. Fill out the details and create the repository
5. Unzip the DragonRuby Game Toolkit engine zip
6. Delete the `mygame` directory
7. Clone your new repository into the DRGTK engine folder with the folder name `mygame`, example: `git clone [email protected]:USERNAME/REPO.git mygame`
7. Start DragonRuby, and make an awesome game!### Updating
Because Scale is a template with all of its source as part of your game, updating the framework's source code in your game isn't an easy thing to do.
I generally would say: don't worry about it! Take ownership over the code in your game and change what Scale provides you without concern. When it comes time to start your next game, Scale will be updated and improved.
But if you do find yourself wanting to keep it updated, [watch the GitHub repo](https://github.com/DragonRidersUnite/scale) for releases. You could pull in just the changes you want. Or you could set an upstream in your repo to the template and merge the changes in.
## Documentation
Every game that uses Scale comes with the [SCALE_DOCS.md](./SCALE_DOCS.md) file. Read through that document to find a quickstart guide and information about useful methods.
## Release Approach & Versioning
Code on the `main` branch is intended to be stable because Scale is a template. When significant changes have been made, a tag and release are created. This allows progress to be tracked and previous versions to be easily downloaded.
Scale uses a simplified major.minor versioning scheme. Major version bumps means there are breaking changes to the API (the methods and structure). Minor bumps mean non-breaking additions and fixes.
## Template License
The template source code falls under the [Unlicense](https://unlicense.org/), meaning it is dedicated to the public domain and you are free to do with it what you want.
## Contribute
Conributions are welcome!
Open an issue or submit PRs if you notice something isn't working.
If you find yourself adding the same files, methods, constants, etc. to your DRGTK games, submit a PR to add it to Scale.
---
[Clear out what's above in this README out and add your own details for making your game!]
## Debug Shortcuts
- 0 — display debug details (ex: framerate)
- i — reload sprites from disk
- r — reset the entire game state
- m — toggle mobile simulation