I... need... real... jumping!

Blitz3D Forums/Blitz3D Beginners Area/I... need... real... jumping!

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

In regards to some of the code above, something to bear in mind with Blitz3D is that it executes the code supplied as a parameter for the 'For' command at the start of each loop iteration. By using:-

For c = 1 To CountCollisions(p\piv)

you're actually performing the collision count during each loop iteration. It's better to cache the result to a variable and use the variable in the loop instead.

eg.

num_collisions = CountCollisions(p\piv)
For c = 1 To num_collisions