Page List

Friday, February 18, 2011

Geometry my old enemy, we meet again!

When we last left off my attempts to get the player ship to move resulted in jerky movements and spiraling off into infinity. Things have gotten slightly better.

Remember how some old games use to have cheat codes that let you unlock debugging mode. When I was younger I was always irradiated that all this did was make a bunch of numbers appear in the corner of the screen. I've learned those numbers are my friends.
A bit of yellow text and suddenly finding out what was going on was much easier. Using break points can be a pain in the ass when certain methods and lines of code get ran 60 times a second. My biggest problem is that I seem to have forgotten everything I know about geometry and trigonometry. I did not help that geo and trig are probably my worst mathematical subjects so I didn't know much to begin with. I need to brush up on somethings.

I checked my bookshelf but unfortunately I sold my geo and trig math books for money that was probably wasted on junk food and other university supplies. I wasn't completely out a luck, my modern philosophy book was of no value to anyone and thus remains in my possession. I since Descartes was the father of analytical geometry his Discourse on Methods might shade some light on my problem. A little reading revealed that by assuming everything I can doubt does not exist and only accepts things I know are absolutely true I should be about to completely rederive all of geometry and trigonometry from innate concepts. 

A half hour and one existential crisis later and I decided to just check Wikipedia. Ultimately my ship is now moving in the proper direction when press the move button.

Probably would demonstrate my progress better if I captured some video, maybe next time

Next step: Smooth out ship movements and handle collisions with screen boarders. Begin writing code to handle ships weapon.


No comments:

Post a Comment