Whats goin on speed prob

BlitzMax Forums/BlitzMax Programming/Whats goin on speed prob

Paul "Taiphoz"(Posted 2005) [#1]
Hi ..

Well decided that id try and make a fast little game, just to get my head round all this new OO and syntax stuff. this project when complete will be open to the community in the hope that it will help some other New ppl pick up the language easier.

Anyway onto the problem, In my bullet type I have the update method, all this really does is change the Y field of a bullet and reduce by speed to move the bullet up the screen.

But when I fire 2 bullets they move at twice the speed, and so on as I fire even more.




fredborg(Posted 2005) [#2]
You are going over the list of bullets recursively (or is it exponentially? :) )

For bullets = EachIn BulletList
-> Goes to function bullets.update()
-> which does
-> For bullets = eachin BulletsList
-> add speed to this bullet
-> Next
Next


Paul "Taiphoz"(Posted 2005) [#3]
OMG so I am.

Dood I would have been here till 4AM trying to track that down lol.(2AM now)

thanks.