DEV Community

Cover image for My Hacktoberfest personal challenge: I'm writing a game in 7 days! (Day 2)
Fernando Doglio
Fernando Doglio

Posted on • Updated on

My Hacktoberfest personal challenge: I'm writing a game in 7 days! (Day 2)

Welcome back to my improvised dev journal where I'm recording the journey of working on my personal Hacktoberfest challenge.

I'm creating a game in 7 days. More specifically, a Platformer Typing game, you can read more about the idea here on my first day's journal.

The plan for Day 2

Since day 1 was about making sure the concept for the game was feasible, day 2 was about 3 things:

  1. Improving the default physics that came with the example code I was using. (Jumping felt really unnatural, and it could only jump up rather than jumping forward or backward).

  2. Understanding how to move from one level to the next one. Although I was happy with the way level creation worked, I needed to make sure I could easily add more levels and that moving from one place to the next one was easy and could feel natural.

  3. Finally, I also wanted to make sure adding a title screen was easy. I don't want to work on a lot of options for this section, but for it to feel like a game, I think it needs one, don't you?

The actual results

Although the first point took me a while, I think I managed to get it to a point where I like it. Jumping and moving feels more natural now that acceleration is being used.

I also figured out how to move from one screen to the next one. It turned out to be super easy, I'm starting to think my choice of engine was a great one.

And last, although certainly not least, adding a title screen felt natural and required just a few lines of code.

To keep this interesting, I created a GIF of the gameplay so far. That being said, take into account the following:

  1. All assets aren't final. The title screen was created in a rush to test some things out, I'll have to re-do it.
  2. During gameplay, the assets shown there are the ones that melonJS comes with. I will not be using them for much longer.
  3. In case the GIF is too small, notice how I'm typing the words on the input box (which I still need to add styles to) and when I hit ENTER, the character moves and the words written on the screen update. Those words are meant to show what happens when you write it (which direction are you moving towards).

So without further ado, here it is (it might take a bit to load, I managed to get it down to 9Mb, so it might require a few seconds...):

Basic demo

The plan for Day 3

Although day 3 is meant to be tonight (that's when I'm working on this), tonight's date night with my wife, so tomorrow I'll be focusing on:

  • Creating new art assets for backgrounds, main character, and some (at least one) enemy
  • Creating at least two levels
  • Hopefully, re-working the title screen.

If I manage to do that, then Day 4 will be all about fine-tuning screens, adding extra items (such as collectibles) and working on win/lose conditions.

If you haven't you can check out day 1 and intro to the challenge here:

And you can check out Day 3 here

Days 4 & 5 are here as well.

Days 6 is here as well.

Top comments (6)

dopamine0 profile image
Roee Fl • Edited

Looks really nice. Following, interested to see how it will look by the end of your week.

May I ask, how did you choose MelonJS over other similar HTML5 Game engines?

I was trying to choose one myself a few weeks ago, and it wasn't easy to figure out.

deleteman123 profile image
Fernando Doglio

As for choosing, it wasn't easy either! I asked for recommendations a few weeks ago here in and got some good names. The bottom line is: I just looked at one of their tutorials and saw how easy it was to create a level with Tiled, so I decided for it.

Eventually I found out other tools also have integration with it or similar alternatives, but I guess they're all similar in the end, it's up to each one to figure out how they like to code.

dopamine0 profile image
Roee Fl

Thanks Fernando

chrisachard profile image
Chris Achard

That's awesome! I hadn't heard to melonJS before - it looks like it gives you quite a bit to start with, so that's nice.

I also like that part of your motivation to do this is to help motivate your son :) I did a very similar thing with mine while he was learning numbers... he helped me design and build a really simple game, and he loved seeing his ideas come to life!

Good luck with the rest of your 7 days, and I'm excited to see how it turns out!

savagepixie profile image

Good job! It's looking really good. And you've got me intrigued about this melonJS.

deleteman123 profile image
Fernando Doglio

Thanks! it'll look better (hopefully) by the end of the weekend!

And yes, melonJS is very good!