Solar Explorer - Day 2

Hello, Fellow Explorers!

So, where did we leave off? we left off with the 'character' being able to be controlled by the player and navigate through the play space, we enhanced this with animation and particles to give the illusion of movement and motion through said space, we also added a background and i'm not sure if you noticed it in the previous GIF; 'Stars' that went from right to left were also added, which also gave the illusion of motion!

So based on my 'Minimum Viable Product' I had achieved, the first stroke of that with a few extra bits to help emphasis that. Today's tasks were to expand on the 'character' and create a playable attack and to create an 'enemy' to fight.

As you can see from the GIF above, I further improved the motion of the ship and changed the background to a more "spacey" background, i'm not even 100% sure what I used the last one, it wasn't space, it wasn't tileable, not a damned clue but it was made 8 years ago, so forgive meee!

So with that in place, my next step was to create an attack, this was going to be done though a particle that was shot out of the cannon on the top of the space shuttle, this was simple enough to code and implement:

I basically, told the Unity to create an instance of my "bolt" attack at the location of a game object attached to the cannon and registered some logic to spawn it and move it forward at X speed, which was registered to the click of the left mouse button! Unlimited power has been achieved all you need do is wreck your mouse!

This did have some unfortunate side effects when I started adding events to detect the collision of the enemies and the boundary of the world, when you pressed up, the ship tilts up too, this then makes the bolt collide with the ship and you ended up killing yourself! Was rather entertaining to do! One of the joys of programming and game development is discovering odd, unintended  interactions with your code and playing around with them! Probably one of the most iconic creatures in games history was an accidental bug, can you guess what it is?

After getting the ship firing away, I added and expanded the code to have a fire-rate, this was to control the players power and also allowed for expansion into power-ups where this cap could be relaxed!

Same amount of clicks, just a controlled rate of fire!

After that, I used the old sprite for the 'enemy', added movement to it (disabled in the gifs) and added collision events for death and destruction with a very pretty finish!

My next task for the project will be to redesign the enemy spacecraft, with different visuals and some basic animation and create an enemy attack to counter the player. After that I'll create a wave of randomly spawning enemies to start creating the pacing for the overall game! 

I'm not far off completing the basic prototype for the game! Only a few more steps to go!

That's all for today.

Subscribe for more Updates.

See you in my next post!



Popular Posts