18 October 2012

Optimization time!

   Thanks nick for the code ideas, the array works like a charm. Added a quick for loop to assign all the bagslots to the bag array and bam! dropped almost 300 lines of code! Also fixed up a couple loose ends. instantiate a clone of each gathered object so i an instantly add the real object to the bag, and also display it being picked up on camera, for effect. (thought I removed the pickup-object/bag-too-full/ drop-object-on-ground code that I liked, and left it with a simpler object-just-doesn't-move code, which cut down a considerable amount of code.) This way you aren't limited in the speed you pick up objects. Also fixed a couple velocity errors driving inventory items off screen, but in doing so, objects no longer lerp to their respective "homes" when dropped in a bag slot, rather they just appear there, *sigh* I also liked that little touch, too bad. Other than that it's pretty much the same game. Now back to physics to fix some of those.

Edit: Not going to upload yet, because i don't deem it enough progress to to warrant going through the effort, but I got the mouse-moving/object rotation thing down, RotateAround worked perfectly.

Latest Update:
https://docs.google.com/open?id=0B3iGA1KoiI7fUkNiTWVUaFY1V2c

No comments:

Post a Comment