DEV Community

Ankur Gupta
Ankur Gupta

Posted on

Creating a game in a single day

Hey everyone,

So in the previous weekend I registered for a major hacking league hackathon known as "Snakes and hackers", the theme looked pretty intimidating and we were very excited to learn something which we haven't before, even what we wanted was to build that using a technology which we haven't used before.

So here comes the fun part, me and my friend decided to delve into game development using those fancy game engines and create a classic snakes and ladders game, as Snakes and ladders was something we've been planning to create since a long time but this time using a game engine sounded much more cooler, so yeah, we decided to go for it.

Now comes the next part, where to start. So first of all, for like about the half of the first hackathon day, we just did some research about game development basics using various internet resources. That included learning how games are built, how a game prototypes are built, which game engines are suitable for what purposes etc. Most of these include random articles or YouTube videos.
Then we decided to use the Godot game engine as from many reviews we found it good for 2D games and easy for beginners.
So for the rest of the day, we read the whole documentation of the Godot game engine, which I feel is really very helpful. You can find the whole documentation here. We also looked at some of those YouTube videos teaching the basics of Godot game engine. At this point we got a sense of what things we'll be needing and the things that are needed to be done.

Next comes the designing part, so as a starter, we created a very simple game board with a red line indicating snake and a blue line ladder, a dice face using Adobe Illustrator and we started coding on day 2.
Basic Game board

For the next and the last day, we were about to gave up as I was really confused about how to connect the players and the board (turns out it was pretty simple), then as they say, I took a break. And somehow after the break, I decided to look for that issue and then found a very simple way to use the Path2D node. Just after realizing that, the whole game creation looked easy and finally we did it. We had the whole game ready. For the coding part, as I was proficient with Python, using GDScript felt very easy for me and I did not felt the need to learn it from somewhere else.
For the game creation, we did all the things step by step, we started working from the start scene of finding a way to put the player token on start on first dice roll and then worked out to the condition of game when the player won the game.
After all this, I decided to add a quit and restart button which turned out to be pretty easy in Godot game engine. (Just 2 lines of code).

After all the coding done, we have some 6 hours left before the final submission, so we decided to improve the game design, so we customized the board, my friend created the fancier snakes and ladders replacing the plain lines. Here is how the final board looks-
Board

Finally we created a demo video, uploaded the code on GitHub and did our final submission.
You can find the code on GitHub and the Demo video.

Overall, the sense of pride we get after successfully completing the game in just one day of coding was out of the bounds and I would like to thank MLH for this opportunity.

Top comments (0)