Merge branch 'main' into main

This commit is contained in:
Brett Chalupa 2023-01-26 16:53:34 -05:00 committed by GitHub
commit f633de7c8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 48 additions and 48 deletions

View file

@ -16,7 +16,7 @@ When the code is pushed to the `main` branch on GitHub, an action runs that depl
## Key Versions
- DragonRuby Game Toolkit: v3.24, v4.0
- DragonRuby Game Toolkit: v3.x, v4.x
- mdBook: v0.4.22
## Running Samples

View file

@ -1,6 +1,6 @@
# Background
We're eight chapters in and haven't even touched upon a simple and useful piece of functionality that DragonRuby GTK gives us: drawing rectangles! Rectangles are great for backgrounds, text boxes and more. Layer some sprites on top, and you can get pretty fancy.
We're eight chapters in and haven't even touched upon a simple and useful piece of functionality that DragonRuby GTK gives us: drawing rectangles! Rectangles are great for backgrounds, text boxes, and more. Layer some sprites on top, and you can get pretty fancy.
## Blue Sky
@ -8,22 +8,22 @@ Up until now, our dragon has been flying around in a gray sky. Let's make the sk
DragonRuby provides `args.outputs.solids` to easily display filled rectangles.
At the top of `#tick`, below where we start the music, create a solid rectangle that's the size of the screen and placed at 0, 0:
At the top of `#tick`, below where we start the music, create a solid rectangle that's the size of the screen and place it at 0, 0:
``` ruby
{{#include code/chapter_09/01_blue_sky/app/main.rb:102:115}}
```
We're familiar with a lot of the shape hash keys for the position and size, but `r`, `g`, and `b` are new. They specify the values for the (r)ed, (g)reen, and (b)lue color values for the rectangle we're drawing. Their values can be set to anything between 0 and 255, inclusive. Adjust the values to see a different color displayed. The higher the value for a given color, the more it'll be part of the mix. So our color has a blue of 230, meaning blue comes through more than the others. You can also specify `a`, the alpha value, between 0 and 255, inclusive, to get transparency in our color.
We're familiar with a lot of the shape hash keys for position and size, but `r`, `g`, and `b` are new. They specify the (r)ed, (g)reen, and (b)lue color values for the rectangle we're drawing. Their values can be set to anything between 0 and 255, inclusive. Adjust the values to see a different color displayed. The higher the value for a given color, the more it'll be part of the mix. So our color has a blue of 230, meaning blue comes through more than the others. You can also specify `a`, the alpha value, between 0 and 255, inclusive, to get transparency in our color.
Now we've got our dragon flying over a blue sky. That looks quite a bit better.
![game with dragon and three targets and blue background](./img/c09-blue-sky.jpg)
![game with a dragon, three targets, and a blue background](./img/c09-blue-sky.jpg)
## Extra Credit
- Make (or find) some cloud sprites and render those in the sky. Put them in the `args.outputs.sprites` _before_ the other sprites to have them render behind.
- Move the clouds, randomly placing at a different position and with a different size when they go off the screen.
- Make (or find) some cloud sprites and render those in the sky. Put them into `args.outputs.sprites` _before_ the other sprites to have them render behind.
- Move the clouds, randomly placing them at a different position and with a different size, when they go off the screen.
- Draw some more rectangles under the score and timer to make them easier to read.
## What's Next

View file

@ -6,7 +6,7 @@ Have you ever made a flip animation in the bottom corner of a notebook? You make
## Animating Our Dragon
In the `mygame/sprites/misc/` folder, there are more dragon images than just `dragon-0.png`. There are 5 additional frames of the dragon flapping their wings. Perfect! That's just what we need.
In the `mygame/sprites/misc/` folder, there are more dragon images than just `dragon-0.png`. There are 5 additional frames of the dragon flapping its wings. Perfect! That's just what we need.
The core of how this will work is that each dragon frame will be displayed for some period of time and then we'll switch to the next frame after that time has passed.
@ -19,11 +19,11 @@ Where we lazily set `args.state.player`, we no longer specify the `path` to the
`#frame_index` is a method DragonRuby GTK gives us on integers to keep track of what frame to use when animating. `0` is when we want to start the animation, which we want to start at the beginning of our game. We have 6 frames in our animation, and we want to display each of them for 8 ticks, repeating forever! Change the `hold_for` value and see how it affects the animation speed and feel of the game. Pick a rate that feels good for you or just stick with 8.
Then we take the `player_sprite_index` and use that when specifying the `path` of our player sprite by interpolating it into the path to our sprite. Our dragon frames are named `dragon-0.png`, `dragon-1.png`, and so on. So we take what `#frame_index` gives us and inject it into the path to the image to make that value dynamic. Remember string interpolation from Chapter 1? It comes into play all the time when coding.
Then we take the `player_sprite_index` and use that when specifying the `path` of our player sprite by interpolating it into the path to our sprite. Our dragon frames are named `dragon-0.png`, `dragon-1.png`, and so on. So we take what `#frame_index` gives us and inject it into the path to the image, making that value dynamic. Remember string interpolation from Chapter 1? It comes into play all the time when coding.
## A Note on Spritesheets
If you've done any game development before, you may be familiar with spritesheets, where each frame of an animation is contained within one image file. When using a spritesheet for animation, instead of changing which image file path is used for the sprite to render, you change which piece of the large spritesheet you render. [The DragonRuby GTK docs have a detailed example on how to do this.](https://bit.ly/drgtk-spritesheet)
If you've done any game development before, you may be familiar with spritesheets, where each frame of an animation is contained within one image file. When using a spritesheet for animation, instead of changing which image file path is used for the sprite to render, you change which piece of the large spritesheet you render. [The DragonRuby GTK docs have a detailed example of how to do this.](https://bit.ly/drgtk-spritesheet)
## Extra Credit

View file

@ -1,10 +1,10 @@
# Scenes
When making a game, there are all sorts of scenes that exist, from the main menu to the actual gameplay to the pause menu. Often these scenes have different interactions than the main game. Instead of moving your character around the world you instead move a cursor up and down menu options. In this chapter we'll refactor our main gameplay and game over state to be a bit easier to work with and then introduce a title scene that's used to start the game.
When making a game, there are all sorts of scenes that exist, from the main menu to the actual gameplay to the pause menu. Often these scenes have different interactions than the main game. Instead of moving your character around the world you instead move a cursor up and down menu options. In this chapter, we'll refactor our main gameplay and game over state to be a bit easier to work with and then introduce a title scene that's used to start the game.
The concept of a "scene" isn't specific to DragonRuby Game Toolkit or any given game engine. It's just a generic concept that we're introducing to make our game code easier to work with. Much like a movie scene, it's clear when one ends and when one begins.
When we introduced the game over functionality, we actually introduced a scene separate from gameplay. Kinda neat! But it wasn't the time to think about them in terms of scenes and reckon with how we add more.
When we introduced the game over functionality, we introduced a scene separate from gameplay. Kinda neat! But it wasn't the time to think about them in terms of scenes and reckon with how we add more.
## Refactor
@ -28,7 +28,7 @@ Not much of the code changes, but we do shuffle things around a bit. None of the
args.state.timer -= 1
```
We need to continue to subtract from the timer in each tick since we rely upon it for when we accept input to restart the game.
We need to continue to subtract from the timer in each tick since we rely upon it when we accept input to restart the game.
We introduce `#gameplay_tick` which contains all of our logic for when we're actually playing the game. We set the background to the blue solid rectangle and initialize our player and animate the sprite. That's all the same.
@ -66,9 +66,9 @@ Then in `#tick` lazily initialize `args.state.scene` to now be `"title"`:
Now when you start the game, the title scene will be displayed:
![black text on gray background that reads 'Target Practice' with instructions on how to play](./img/c11-title.jpg)
![black text on a gray background that reads 'Target Practice' with instructions on how to play](./img/c11-title.jpg)
When you press the fire button, the game will start. And when you restart after game over, you'll end up back on the title scene.
When you press the fire button, the game will start. And when you restart after the game is over, you'll end up back on the title scene.
## Extra Credit
@ -84,4 +84,4 @@ We've now got three scenes in our game and can easily switch between them. The c
## What's Next
For all intents and purposes our game is done! You can start it, play it, and replay it. All that's left to do is release it so that the world (or at the very least our friends) can play it.
For all intents and purposes, our game is done! You can start it, play it, and replay it. All that's left to do is release it so that the world (or at the very least our friends) can play it.

View file

@ -2,15 +2,15 @@
So far you've been playing the debug development build of your game within the DragonRuby GTK engine. In order to get it to friends, we'll need to build versions for other players to use. We'll use the `dragonruby-publish` tool that comes with the engine to do so.
Releasing your game is a process that has only gotten easier and easier over time. One of the coolest things about DragonRuby GTK is that you can build your game for the web, Linux, Windows, and MacOS with one command.
Releasing your game is a process that has only gotten easier and easier over time. One of the coolest things about DragonRuby GTK is that you can build your game for the web, Linux, Windows, and macOS with one command.
We'll release _Target Practice_ on [itch.io](https://itch.io/), an open marketplace for distributing your game. You can share your games for free on Itch or sell them. The html version will even be able to be played in the browser. So go ahead and sign up for an Itch account.
We'll release _Target Practice_ on [itch.io](https://itch.io/), an open marketplace for distributing your game. You can share your games for free on Itch or sell them. The HTML version will even be able to be played in the browser. So go ahead and sign up for an Itch account.
## Prep for Release
While the code of our game is done ([view the finished source](https://github.com/DragonRidersUnite/book/tree/main/src/code/chapter_12/01_release)), we need to specify some info about the game, like its title and our information.
First, delete `mygame/high-score.txt`. We don't want our high-score from building the game to get released with the game version we share publicly. You'll need to make sure you do this every time before building your game. How could you turn the build and publishing process into a script that automatically does this for you?
First, delete `mygame/high-score.txt`. We don't want our high score from building the game to get released with the game version we share publicly. You'll need to make sure you do this every time before building your game. How could you turn the build and publishing process into a script that automatically does this for you?
In `mygame/metadata/` you find a file called `game_metadata.txt`. Open that up and specify the following values:
@ -25,7 +25,7 @@ How you version your game is up to you, but I generally think about it like this
- The structure is `MAJOR.MINOR`.
- While your game is actively being developed and isn't done, increase the minor number to the right of the `.` with each release, so `0.1`, `0.2`, and so on. Minor versions can go as high as you want, `0.24` or however many releases you have.
- When your game is done, increase the major version on the left of the `.` to 1, so it'd be version `1.0`. When you increase the major version of a piece of software, you reset the minor version back to 0.
- As you fix bugs and expand upon it after initial release, increase the number to the right, so `1.1`, `1.2`, and so on.
- As you fix bugs and expand upon it after the initial release, increase the number to the right, so `1.1`, `1.2`, and so on.
- If you ever majorly overhaul your game, you might want to consider bumping the major version to `2.0`.
If your eyes are glazing over at this versioning stuff, don't sweat it. It's something that may be more useful to you in time.
@ -44,7 +44,7 @@ Open a new terminal. If you're using Visual Studio Code, there's an option to do
That command will build your game for all platforms DragonRuby GTK can target. Check out the `builds/` folder. You'll see all sorts of files that are your game builds.
Depending on what operating system your computer is using, you can even launch and play the release version of your game. On Linux, open `target-practice-linux-amd64.bin`. On MacOS, open `target-practice-mac-0.1/Target Practice.app`. On Windows, launch `target-practice-windows-amd64.exe`.
Depending on what operating system your computer is using, you can even launch and play the released version of your game. On Linux, open `target-practice-linux-amd64.bin`. On macOS, open `target-practice-mac-0.1/Target Practice.app`. On Windows, launch `target-practice-windows-amd64.exe`.
## Upload to Itch

View file

@ -10,11 +10,11 @@ When youre just starting out in any creative endeavor, set your sights on sma
## What Can You Cut?
When you have an idea for a game, ask yourself what you can cut from it while still maintaining the core essence of it. Dont dwell on adding a bunch of complex systems. Focus on the fun and how you can subtract to bring the fun forward. Arcade games do a great job of making short, repayable, minimal experiences.
When you have an idea for a game, ask yourself what you can cut from it while still maintaining its core essence. Dont dwell on adding a bunch of complex systems. Focus on the fun and how you can subtract to bring the fun forward. Arcade games do a great job of making short, repayable, minimal experiences.
## Finish Your Games
When making your small games, finish them! Finishing what you start is so important. Having a bunch of unreleased prototypes isnt fun for anyone. Its okay to share works in progress and tiny games. Finish what you make and release it. Shipping games is a muscle and different skillset than building the game. The more practice you get, the better you'll be at finishing your games.
When making your small games, finish them! Finishing what you start is so important. Having a bunch of unreleased prototypes isnt fun for anyone. Its okay to share works in progress and tiny games. Finish what you make and release it. Shipping games is a muscle and a different skill set than building the game. The more practice you get, the better you'll be at finishing your games.
## Release Them for Free
@ -32,7 +32,7 @@ When youre making your small, free games, dont worry about being original.
Game jams are constrained events where people make games within a certain time frame, sometimes with specific rules. They're a great way to start and finish a game in a short period of time. You can experiment and take risks and connect with the community of your fellow participants. I can't recommend them enough. Try to do at least one jam a year (or more if your heart desires).
[Itch has a directory of jams](https://itch.io/jams) and [Ludum Dare](https://ludumdare.com/) is a well known jam that happens multiple times every year with many participants.
[Itch has a directory of jams](https://itch.io/jams) and [Ludum Dare](https://ludumdare.com/) is a well-known jam that happens multiple times every year with many participants.
## Share Your Work

View file

@ -17,8 +17,8 @@ Recommended tools for making games.
### Graphics
- [Aseprite](https://www.aseprite.org/) — pixel art tool
- [GIMP](https://www.gimp.org/) — open source image editor
- [Inkscape](https://inkscape.org/) — open source vector editor
- [GIMP](https://www.gimp.org/) — open-source image editor
- [Inkscape](https://inkscape.org/) — open-source vector editor
- [Krita](https://krita.org/en/) — digital painting tool
- [Piskel](https://www.piskelapp.com/) — free browser pixel tool
@ -34,15 +34,15 @@ Making a game by yourself can seem like a lot when you need to design the game,
I love reading books about making games. It's a great way to take a break from the computer but still learn about the hobby you love. Here are some of my favorites.
- [Spelunky by Derek Yu](https://bossfightbooks.com/products/spelunky-by-derek-yu) — deep-dive into the game development process by the creator of the game himself
- [How to Make a Video Game All By Yourself](https://www.valadria.com/how-to-make-a-video-game-all-by-yourself/) — excellent book on being a solo game dev
- [Code the Classics](https://wireframe.raspberrypi.com/books/code-the-classics1) — free book covering how to make classic games in PyGame, but if you instead used DragonRuby GTK?
- [Indie Games: From Dream to Delivery](https://www.amazon.com/Indie-Games-Delivery-Don-Daglow/dp/0996781552) — a book of questions and essays to get your brain churning about your game for when you're further a long
- [How to Make a Video Game All By Yourself](https://www.valadria.com/how-to-make-a-video-game-all-by-yourself/) — an excellent book on being a solo game dev
- [Code the Classics](https://wireframe.raspberrypi.com/books/code-the-classics1) — a free book covering how to make classic games in PyGame, but if you instead used DragonRuby GTK?
- [Indie Games: From Dream to Delivery](https://www.amazon.com/Indie-Games-Delivery-Don-Daglow/dp/0996781552) — a book of questions and essays to get your brain churning about your game for when you're further along
## Videos
A selection of the best videos about making games:
- ["Juice it or lose it" presentation](https://www.youtube.com/watch?v=Fy0aCDmgnxg) — how to polish games
- ["The art of screenshake" presentation](https://www.youtube.com/watch?v=AJdEqssNZ-U) — step-by-step guide on making a game feel good to play
- ["The art of screenshake" presentation](https://www.youtube.com/watch?v=AJdEqssNZ-U) — a step-by-step guide on making a game feel good to play
- ["Game a Week: Teaching Students to Prototype" presentation](https://www.youtube.com/watch?v=9O9Q8OVWrFA&list=PLT0BvNof1jZKXdGj7pT8pxakQVFUPO9GA&index=6&t=9s) — two college instructors talk about their courses where students make a game a week

View file

@ -13,12 +13,12 @@ Here are some ideas for what you could do to put your personal stamp on it:
- Replace the sprites with your own
- Make your own music track and drop it in
- Build out waves of enemies that fly in and attack you
- Make it so the dragon can fly around a level instead of stay in one screen
- Make it so the dragon can fly around a level instead of staying in one screen
- Add a narrative introduction
## Say Thanks
Say thanks in [the DragonRuby Discord](https://discord.dragonruby.org) or on [Mastodon](https://mastodon.gamedev.place/@brettmakesgames). It would mean so much to me know that you've read the book. The website version of this book has no analytics tracking. My success metric isn't the number of views this book goods. I'll only be able to measure the success of this book through community and connecting. Share what you've made!
Say thanks in [the DragonRuby Discord](https://discord.dragonruby.org) or on [Mastodon](https://mastodon.gamedev.place/@brettmakesgames). It would mean so much to me to know that you've read the book. The website version of this book has no analytics tracking. My success metric isn't the number of views this book goods. I'll only be able to measure the success of this book through community and connecting. Share what you've made!
If you really want to show your appreciation, [buy me a coffee](https://www.buymeacoffee.com/brettchalupa) by sending me a small tip. Financial support means the world and helps me continue to make free resources like _Building Games with DragonRuby_.
@ -30,7 +30,7 @@ Writing a book about making games is challenging to scope properly because games
A second edition of the book could deep dive into making a shmup with enemy waves and bosses. Or we could build an entirely different game, like a platformer or a dungeon crawler. I'd also love to write about more advanced programming topics like encapsulating behavior with classes and sharing behavior with modules. It'd be great to go over adapting our game for iOS and Android too.
But I _need_ to be sure people want a follow up book where we build a more complex game using DragonRuby Game Toolkit. Let me know if you'd like to see a sequel in [Discord](https://discord.dragonruby.org).
But I _need_ to be sure people want a follow-up book where we build a more complex game using DragonRuby Game Toolkit. Let me know if you'd like to see a sequel in [Discord](https://discord.dragonruby.org).
In the meantime, read through my [advanced tutorials](https://www.dragonriders.community/recipes) online.
@ -45,7 +45,7 @@ A big thank you to the DragonRuby community. This book would not have been possi
In particular, in alphabetical order, thank you to:
- Akzidenz for feedback and support
- Amir for encouraging me to write this book & making DragonRuby
- Amir for encouraging me to write this book & for making DragonRuby
- The rest of the DragonRuby core team for making such a great engine
- Levi for nitpicking
- [Nick Culbertson](https://twitter.com/MobyPixel) for the dragon sprite included with DRGTK

View file

@ -86,7 +86,7 @@ def add(num1, num2)
end
```
Ruby implicitly returns the last expression in method and by default returns `nil` if there's no expression.
Ruby implicitly returns the last expression in a method and by default returns `nil` if there's no expression.
You can explicitly return a value with `return`:
@ -100,17 +100,17 @@ Explicit returns are mostly used when you want to exit a method early.
## Blocks
Blocks are chunks of Ruby code that yield to the caller. At first you'll use blocks when calling specific methods, like `#each`, but it can be useful to write your own blocks as well.
Blocks are chunks of Ruby code that yield to the caller. At first, you'll use blocks when calling specific methods, like `#each`, but it can be useful to write your own blocks as well.
[📺 Ruby Blocks Explained](https://www.youtube.com/watch?v=1YjSP-cEzMo)
## nil
`nil` in Ruby is known as `null` in other languages. It's the absence of a value. nil is a huge topic and not something gone over in the book explicitly.
`nil` in Ruby is known as `null` in other languages. It's the absence of a value. nil is a huge topic and not something gone over in this book explicitly.
## Exceptions
When something goes wrong in Ruby, an exception is thrown. You can rescue from exceptions using the `rescue` keyword:
When something goes wrong in Ruby, an exception is thrown. You can get rescued from exceptions using the `rescue` keyword:
``` ruby
begin

View file

@ -2,7 +2,7 @@
When working on any piece of software, whether it's a video game or an app to track how many dogs you pet in a given day, it's extremely important to keep track of the changes to your code and keep it backed up in a secure location.
Imagine this scenario: you work on your game for three months. It's amazing. It's your X-Files Dating Sim. You've painstakingly drawn all of the characters, written the scenario, coded up all the interactions. Then one day your computer gets stolen by a giant crow! I don't trust those crows, I never have. Suddenly your game is gone, poof. All that hard work just sitting on a hard-drive barely being protected by the shell of your laptop from the aggressive pecks of the entire local union of crows.
Imagine this scenario: you work on your game for three months. It's amazing. It's your X-Files Dating Sim. You've painstakingly drawn all of the characters, written the scenario, and coded up all the interactions. Then one day your computer gets stolen by a giant crow! I don't trust those crows, I never have. Suddenly your game is gone, poof. All that hard work just sitting on a hard drive barely being protected by the shell of your laptop from the aggressive pecks of an entire murder of crows.
You'd just have to start over, from scratch. That is if you aren't too bummed out about losing the entire game. Crow theft—it's the number one reason to back up your game's source code.
@ -12,7 +12,7 @@ You could use a cloud service like Dropbox to back it up to the ✨cloud✨. Tha
## Using Git
I'd like to advocate for using source control (a.k.a. version control) to keep track of the changes to your game. It's like a more advanced form of using a cloud storage provider. The primary source control tool is called [Git](https://git-scm.com/). Git lets you track your changes by creating commits--references of what changed and why since the last time you made a commit.
I'd like to advocate for using source control (a.k.a. version control) to keep track of the changes to your game. It's like a more advanced form of using a cloud storage provider. The primary source control tool is called [Git](https://git-scm.com/). Git lets you track your changes by creating commits--references to what changed and why since the last time you made a commit.
The basics of Git are beyond the scope of this book, but there are some helpful resources out there:
@ -22,7 +22,7 @@ The basics of Git are beyond the scope of this book, but there are some helpful
Using version control at first may seem a bit tedious, but it's immensely valuable. Not only can you document why you made a change to help your future self and others, but you can safely experiment without fear of really messing things up. Because you're tracking the changes to your game's source, if you go down a rabbit hole that doesn't work out, you can easily undo it. Let's explore some examples of commits and scenarios where it's helpful.
Any time you add a feature, create a commit. This lets you see your game evolve over time. Let's say you added player input with the gamepad. Boom, make a commit! Let's say you improved the enemy AI, commit that. Keep your commits small. Don't make hundreds of lines of unrelated changes and make a big commit that just say "changed some stuff". You're trying to help yourself but creating a useful log of your game. Here's a look at commits from a little project of mine:
Any time you add a feature, create a commit. This lets you see your game evolve over time. Let's say you added player input with the gamepad. Boom, make a commit! Let's say you improved the enemy AI, commit that. Keep your commits small. Don't make hundreds of lines of unrelated changes and make a big commit that just says "changed some stuff". You're trying to help yourself by creating a useful log of your game. Here's a look at commits from a little project of mine:
``` console
@ -71,7 +71,7 @@ Start the flow again!
## Source Code Hosts
When you use Git on your computer for your project, you're creating a log of changes that exists in your computer. You'll want to push your Git repository up to a host so that it's backed up. There are many free hosts out there, allowing you to create private or public repositories of your code.
When you use Git on your computer for your project, you're creating a log of changes that exists on your computer. You'll want to push your Git repository up to a host so that it's backed up. There are many free hosts out there, allowing you to create private or public repositories of your code.
Some popular ones are:
@ -86,27 +86,27 @@ In the flow of development above, step 6 is: push the code to the remote host. T
When I work on my DRGTK games, I check the entire project, including the engine, into source control. This lets me easily clone and run the project without needing to set anything up. Because the engine binary (`./dragonruby`) is so small, it's no problem at all. I'll often clean out the sample code and sprites if I'm not going to use them.
A benefit to this is that if a new version of DRGTK is released, I can create its own commit for that and easily rollback if anything breaks. Phew!
A benefit to this is that if a new version of DRGTK is released, I can create a commit for that and easily roll it back if anything breaks. Phew!
## A Note on Open Source DragonRuby Game Toolkit Games
You may have heard of the term open source software (OSS). It's when people write code and release available to the public to see and use under varying license terms. Code is released as open source for a variety of reasons, from helping people learn to collaborating with anyone. It allows people to contribute and help fix things. This book is even [open source](https://github.com/DragonRidersUnite/book)!
You may have heard of the term open source software (OSS). It's when people write code and release available to the public to see and use under varying license terms. Code is released as open source for a variety of reasons, from helping people learn, to collaborating with anyone. It allows people to contribute and help fix things. This book is even [open source](https://github.com/DragonRidersUnite/book)!
The DragonRuby Game Toolkit is not open source software, which means that you can't distribute the engine publicly on a source control host, but you can publish the code you've written, since it's your code. This is a bit a nuanced situation with DRGTK because of how projects work.
The DragonRuby Game Toolkit is not open-source software, which means that you can't distribute the engine publicly on a source control host, but you can publish the code you've written since it's your code. This is a bit of a nuanced situation with DRGTK because of how projects work.
I recommended checking the entire folder of the engine and your game into source control in the previous section. But if you want to open source your game, I'd do it a little differently. And it helps to know this from the start of your project, but it's okay if you do it later down the line.
If you want to open source you game, follow these steps:
If you want to open source your game, follow these steps:
1. Unzip the engine
2. Change into the `mygame` directory
3. Initialize your Git repository there with `git init`
4. Don't track the engine parent folder
The downside to this approach is that you need to ensure you keep your specific engine version parent directory available. You could use version control to sync that and then use Git to publish it online as open source code.
The downside to this approach is that you need to ensure you keep your specific engine version parent directory available. You could use version control to sync that and then use Git to publish it online as open-source code.
## Summary
- Back up your games! You never know when you might lose your computer.
- Source control, like Git, let's you make changes with confidence.
- Source control, like Git, lets you make changes with confidence.
- Push your code regularly to a source control host so that it's backed up.