Day 04 Tanks
Journal
Day 04 Tanks
I think I'm starting to get a real knack for "Single responsibility", or whatever. The gun just fires. That's all it does. And it can be called from wherever, which allowed me to make all sorts of wacky configurations. It also allowed me to make one "Tank" body, that all moved the same way, and then different "Pilots" (Player, and Computer, in this case) that controlled the tank. So theoretically, I could very easily make other Pilots, that all behaved totally differently, and I'd just need to wire them up to a tank. Could maybe even combine pilots? That could be kind of cool...
Dude, fuck rotation. Still don't get it. I might need to fucking have to I guess fucking go back to trig to relearn about Vectors, and how to fucking rotate them.
Using the AnimationPlayer also provided a useful lesson. When a Scene is updated and saved, it updates the Instances as well. If I don't see the update I'm expecting, I should check the Instance in the inspector for any properties that need to be Reset.
Misc. Other Things I Learned About (MOTILA)
- Use signals way more to connect things
- Signals need to match signature of the method they're calling. So on_body_enter(body) can not be directly connected to queue_free() in inspector(I think this is true?)
- Don't be afraid to mix, match, and connect things in world scene. If I need to repeat a config, send it to a new scene
- Same "check Instance" lesson when setting up boundaries
- clampf is non-destructive. Set value = clampf()
- get_viewport_rect() for fun facts about what's on screen.
- Used Autoload for the first time. Real easy to do
- Make sprites clearer, in the future. Not clear what's "in front" and what's "behind" a tank
Initially inspired by WiiPlay Tanks.
Was going to be able to aim with the mouse. Ended up kind of liking that it was always forward.
Status | Released |
Platforms | HTML5 |
Author | Cononymous |
Made with | Godot |
Leave a comment
Log in with itch.io to leave a comment.