Milestone 9: Entity update routines, wiring up systems to components


Short post update today...

So now the process has started for going into each entity’s update method and wiring up some systems.  Namely to get started I targeted the movement systems of navigation with the player, getting the screen collisions working, and updating the asteroids method as well.

This… wasn’t as easy as I thought…. I really thought I knew what I was doing.  To be fair... I was close.  But I struggled to get the vector math exactly what I wanted. So, I had to start doing some additional research into this mechanic.  Turns out, I simply needed to get back to the basics of F=MA.

I watched the YouTube video of The Lone Coder and his asteroids game.  https://youtu.be/QgDR8LrRZhk, for those keeping score at home, and he gives a decent account of the physics math required to get this to work.  I was able to make some adjustments, due to this being Asteroids +, I wanted to incorporate reverse thrust (brakes) as well. 

After some play testing on both mobile and desktop, I ported SOME of the physics math over to my asteroid entities, which is simpler, also I included the screen collision detection as well.

I now have a moving spaceship and white squares moving around the screen.

Till next time...

This currently hosted game site: https://asteroids-revisited.vercel.app/

Twitter: @jyoung424242

SlideShare: https://www.slideshare.net/JustinYoung3/next-gen-asteroids

GitHub: https://t.co/utxHxXKdOz

Leave a comment

Log in with itch.io to leave a comment.