Another day, another update. Tonite, I added the beginnings of ore harvesting. Although currently, each asteroid only awards "Phat Lewtz", there are a few things behind the scenes.
There is a number after the lewtz. This is the index into the array of asteroids. This number lets me keep track of each asteroid in the scene. This data will include what the asteroid will award when harvested, and will also contain the respawn timer. Further thought may allow me to remove that array, put the awards onto the nodes using the addTag() function. Destroyed asteroids can be added to the master schedule for respawning when the time comes, etc. I will have to decide whether I can do that.
Also, there is now a maximum range on how far away you can be and still harvest the asteroid.
Bugs: The max speed that I added is having a problem. Once your overall speed (indicated in mdata) is equal/grater than 10 (max speed) it won't let you turn around and thrust in order to decelerate.
Next Step: fix the bug, and add the ability to auto-pilot towards clicked asteroids that are outside of harvest range.
Enjoy! The download link to the right has been updated.
Wednesday, May 6, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment