CompiledFrog

Post #9: Dodge the Creeps, Part 1

Woah, post #9! Tomorrow we'll be in double digits.

If you're a new reader, I've been making my way through the Godot docs, as I'm on a journey to learn game development. I've been posting daily, and while the posts are short, hopefully they are helpful. Today I made some progress on the first game the Godot docs introduce, Dodge the Creeps!.

While I'm not done building the game yet, there were two points in the docs that I thought are worth mentioning for the post today:

  1. "As a general rule, a scene's root node should reflect the object's desired functionality - what the object is." (link)

This is a good note. It helps keep organization in the scene tree, and keeps scenes simple as you build out reusable bits and pieces for your game. (It also kind of reminds me of the single responsibility principle from SOLID.)

  1. For this game, a CharacterBody2D node for the player root node would have been more appropriate. But, the authors chose the root as an Area2D, to help show more general concepts in the tutorial. (link)

This makes sense. I'm glad they mention this so users know what the correct choice would be, but know why they used that one in the tutorial. They also hint at the reason for picking an Area2D node compared to other types: "With Area2D we can detect objects that overlap or run into the player." (link)

So, hopefully tomorrow we can rig up the player!

pic1