Devlog 6, 7/27
What a week so far! Thankfully, I have a lot of time this weekend to really make the game pop. For now, todays accomplishments!
Making more levels is one of the MVP goals for this game. Perhaps it is not entirely MVP, as I could probably make a game with a single level, but breaking up assets and codes into more manageable chunks that won't interact negatively with each other helps more than anything. To keep that goal in mind though, I'd probably want to avoid actually just copying and pasting the same code a dozen times for each level, determining things like player movement, projectiles, and more. Thankfully, Godot makes this easy with Inheritance. Instead of making a new scene, you just make an Inherited scene.
It really is this easy.
This means I can now delete assets from my previously only scene and put them into their specific level scenes, so I can keep the code all neatly nestled in one place, and the assets in another.
So clean.
So much pizazz!
Now Godot is supposed to show inherited nodes in yellow, but it seems to forget to do it sometimes. It's okay Godot, I forget things too.
This is fine and all, but I also need to make sure to change the scripts. By default if you just inherit scenes you are still sharing the scripts with the base master scene, which can break things like signals. A few lines of code fixes that though. Put the following in the Master Scene and...
.. Then change the new level scene to extend this class_name.
And thats it! Now you can have all the parent code in the Master scene, and you're free to add level specific code in each levels scene. Simplicity!
I also began working on the start of a user interface - for this project I will leave fancy, colorful graphical interfaces to my "Nice to have" list. Text will work for now. Fun thing I learned about interfaces is that, if you don't anchor them, they stay in the exact pixel location you put them at. Anchoring keeps them relative to the games window, so they move with different screen sizes.
So far, I'm quite pleased with this project. I know I didn't get as much as I wanted done this week, but I have to admit I am human and that if I am too tired to think properly, I'll end up getting frustrated and lose more time than I want. I plan to sleep in tomorrow just a smidge, and then after some morning chores really dig into this project with gusto.
My main goals for Friday, Saturday, and Sunday are :
- Create a responsive user interface
- Create item pickups that recharge things like the grenade
- create enemies that have things like HP, and can damage the player
If I can do more than that, I'll try to aim for figuring out how to spawn enemies in, and creating win/lose conditions that transition the game to a new screen.
Devlog out!