🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Frogger - Models and First Version

Published October 08, 2018
Advertisement

As I'm using Godot for this challenge there is no asset store, so I'm attempting to make all the assets myself. I'm no artist, and I find making artwork pretty tedious and time consuming .. that said I'm gradually getting more efficient at it. So I spent the first few days making artwork which is mostly in my frogger gallery.

Yesterday evening and today I started actually programming the game in Godot. I'm pretty much making this up as I go from zero experience with the engine and GDScript (like when I used Unity for Tower Defence). So far I am pretty positive about the Godot experience, my only criticism so far would be the lack of in built interpolation (see this post), but it has been fairly easy to workaround.

This time I'm mainly aiming at desktop rather than mobile, partly because I have no idea how good the android support is in Godot. I will cross that bridge when I come to it, but the game should in theory run fine on mobile too.

The whole engine is node based, and you can have deeply nested nodes (something I'm not sure Unity supports), and handily you can make your game out of smaller scenes which you just pull in in the editor or programmatically. I like the paradigm, and the node based scene graph is similar to NDL or Ogre so I'm familiar with how to use it.

frog_scene2.thumb.jpg.16b93ddbdbc4fbb441ab30246acbccc4.jpg

My first step was to try and move the frog around the screen. For interpolation I store previous and current positions on each tick (started out at 10 ticks per second). It was pretty easy to get the frog moving left right up and down. However, from playing frogger games in a browser I realised the movement is all in 'jumps', almost like a grid (however not when on logs etc). So instead of holding a key to move the frog, each keypress gives a new destination location, and the frog makes the way to the destination, and won't respond to other moves until it has reached the destination. This is now working pretty well.

For the vehicles etc I wanted a generic system, no point in programming the same thing multiple times. I have separated the lines of traffic into 'row' objects, and each row can contain multiple cars of a certain type, with certain speed and direction. There is no collision yet but I'll use just simple AABB checks. Handily, because the frog can only be on a maximum of 2 rows at a time, you only need to collide check against the cars / logs on those rows.

I've also figured out how to preload the different vehicles as scenes so I can create instances which get reused as they go off the edge of the screen. I need to re-export the models as I have some newer versions now.

start.jpg.9c8ffe02d9aabb894ed3f328e87b9552.jpg

There are also no wheels yet, and no animations, I'll deal with them later.

Overall it is coming together good for just a day of programming, which is a testament to how easy Godot is to use. My first aim is to get the frog playable over the screen to get to lily pads, and die if you hit vehicles etc, and have some UI for the score and lives. I have no idea how to do menus yet in Godot but I think it will involve more scenes so will hopefully be easy.

And while I'm starting with the traditional top down orthographic camera, which makes wraparound of vehicles easy, I'd like a more free moving camera, I'll just have to think of a way of making the vehicles fade in and out.

3 likes 0 comments

Comments

Rutin

Very nice work. :) Looks like things are coming along nicely for you! 

Looking forward to seeing more.

October 08, 2018 06:36 PM
extreme64

#godot ;)

October 09, 2018 03:52 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement