Godot has a lot of features that are specifically designed for the 2D game development. This also means that there is almost always more than one way to implement a game.
You can play online before you read any further:
https://vkrishna.itch.io/color-jump
Things I wanted to achieve:
- Flexibility to design chunks of gameplay
- Build a procedural system to use these chunks
- A workflow for quickly treating it the chunk changes
var block = [
“[___________]”,
“_______”
]
The advice structure worked fine but I quickly ran into a problem. It was getting hard for new to visualise what The chunk was going to look like. So I wanted to leverage the tile map editor from engine to do the level design as well
Attempt 2:
I had good format for describing the chunk but it was hard to create New chunks without a lot of trial and error.
So I created a new scene in Godot for editing abs spitting out tile chunk description for be to copy and pate into the code I already wrote for reverting chunks based on string array.
I attached a script to the root buffer of the scene and made it a tool. This let me write code that works in editor that captures the UI-selects input and generates a string per line in the cell used in the tile map for chunk creation
Attempt 3:
Very soon I started to realize I didn’t need to do the tedious work of printing the chunk strings and then copying them for the actual game, I created a single scene with all the levels designed with multiple GridMaps in it, which i instantiated at the beginning of the game and extracted the level details from each of those GridMaps within the design scene. Once i had the levels, i could just free the design scene and move to creating the levels dynamically during gameplay.
You can checkout the source code of the game: https://github.com/vkbsb/ColorNJump
Gameplay Sample pic.twitter.com/2Uq8VgOhxf
— VamsiKrishnaV (@vkrishna1983) September 20, 2020
Comments