It's Monday, but that's not gonna stop me from continuing work on this game!
After yesterday's abysmal progress I put my working cap back on and dug in. It was daunting at first, but I think my idea of using a simple approach is good.
I've modified my Basic Blaster, gave it a script to Fire whenever the cooldown has expired. I have a "shots per minute" variable I use to determine how often to create a new projectile. This does effectively limit this weapon to a maximum number of shots based on frame rate.
This is also instantiating new projectiles, no use of object pooling yet. The Fire of projectiles is its own thing too. A very simple instantiate, fires the projectile straight ahead right now.
The projectile has it's own stuff going on too! It has a speed, a range, and a lifetime! When the object is enabled (or instantiated) it immediately has a forward force applied to it so it goes flying based on the "speed" set. If it goes off screen, it is destroyed. If it lives too long, it is destroyed. If it flies too far from the ship, it is destroyed.
Basic Ship, Basic Blaster, Basic Projectile, all ready! Sure, the projectile can hit my space junk, and it pushes it around. No explosions, no destruction, nothing like that, yet. I think that's my next task, see if I can get my projectile to destroy my space junk. Maybe I should add a damage variable. . . . Done! I should give my space junk a health variable too. . . How about some Tags to help differentiate items in the scene!
For now that's pretty good, but still a lot to work on before this could even be considered a game. Tune in next time to see what I do!
Edit: I just couldn't help myself, so I jumped back in and added a camera zoom feature! Now you can zoom in and out using the scroll wheel. It will only let you zoom in so far, and eventually you get zoomed out pretty good, it'll keep going but the zoom doesn't really move much beyond a certain point, so it works out pretty well. I even added the ability to change the zoom speed (just a simple variable, no access to it yet from anywhere inside the game).
Edit Again: So I added a new scene, a menu. Very simple, just a button that opens the "space" scene, and a toggle that sets a variable for debug mode. I may actually add a keypress for debug too, but for now I'm just going to use this for fun testing stuff.
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.