[#]cr20gc #devlog
I moved on to Jetpack Joyride yesterday! Still might come back to improve the Flappy Bird clone, but probably not. :)
I started with my "study" of the game, in which I play with it and observe/record the behaviors, mechanics and design.
Then I moved on to implementing the basic player mechanics and got something that felt similar to the real deal. This step was satisfying as I could already feel my practice with Godot paying off, as I didn't have to glance at documentation or prior projects to remember how to simulate physics and handle input.
Later, I started thinking about how to implement hazards. It looked to me like Jetpack Joyride was entirely composed of hand-designed patterns, or "segments" as I'm calling them, in which hazards (or coins) have been arranged in interesting and/or challenging shapes on a grid and presented to the player one after the other at random. So my thought was that I'll build a handful of scenes as segments and then, using some kind of "SegmentManager", cycle through them randomly, queuing them up to move on-screen for the player to face. But not all segments are spatial, some conclude after a set amount of time (laser timing challenges) and not all of them are even exclusive (missile clusters), meaning they can be presented on top of some other segments. So these will have to be handled appropriately by the manager logic.
As I started to design the individual hazards, I encountered an inconvenience where the SegmentShape2D I was using as the collider for a beam wasn't resizing in the editor preview when I would alter the length parameter I had exposed. This is because the code for applying the length only runs in _ready
. I figured there had to be some hook or mechanism to allow me to alter the editor behavior, and that's how I discovered the [@]tool
(minus brackets) annotation!
https://docs.godotengine.org/en/stable/tutorials/plugins/running_code_in_the_editor.html
So I used this newfound technique to update the beam length preview in the editor, after realizing I needed to duplicate the Shape2D instance to ensure uniqueness across instances. This makes it very quick and easy to design segments where I need the beams to line-up or block certain regions.
=> More informations about this toot | View the thread | More toots from crenfrow@hachyderm.io
=> View cr20gc tag | View devlog tag This content has been proxied by September (3851b).Proxy Information
text/gemini