No description
Find a file
2023-03-08 14:06:29 +11:00
app Initial commit 2023-03-08 14:06:29 +11:00
data Initial commit 2023-03-08 14:06:29 +11:00
fonts Initial commit 2023-03-08 14:06:29 +11:00
lib Initial commit 2023-03-08 14:06:29 +11:00
metadata Initial commit 2023-03-08 14:06:29 +11:00
sounds Initial commit 2023-03-08 14:06:29 +11:00
sprites Initial commit 2023-03-08 14:06:29 +11:00
test Initial commit 2023-03-08 14:06:29 +11:00
.gitignore Initial commit 2023-03-08 14:06:29 +11:00
concom-config.json Initial commit 2023-03-08 14:06:29 +11:00
README.md Initial commit 2023-03-08 14:06:29 +11:00
run_tests Initial commit 2023-03-08 14:06:29 +11:00
SCALE_DOCS.md Initial commit 2023-03-08 14:06:29 +11:00

Scale

repeating red dragon scale pixel art

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 that's just app/main.rb with some constants and helper methods.

Check out the CHANGELOG for the summary of recent changes!

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

Use It

There are two main ways you can use the Scale template for your games.

📺 Video demo showing how to get started

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
  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 git@github.com:USERNAME/REPO.git mygame
  8. 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 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 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, 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