Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with Optimzing Speed
#11
:|
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#12
hahaha, pwned
am an asshole. Get used to it.
Reply
#13
:rotfl:

Anyways thanks for the help and the engine is coming along nicely in the emenies and shots deptartment but...

still behind in collison detecting. I have some horrible code written up for that but sometimes it fails when I approach it it from a random direction (Maybe misuse of the RND?) and closes...

So my last plea for help is: anyone would could point me to some tutorial or FAQ or thread about collison detecting?

Thanks again...
Reply
#14
Search for "Collision detection" on the qbasicnews.com search.

You're not going to be able to use point collision detection, but you can use box collision detection.

Make a (1 to 4, 1 to n) array for the 2 x, y points on 2 box corners. N = object amount.

For each object, test whether it intersects the other objects using the 8 x and y points of the 2 objects.

To increase efficiency, test only objects that can possibly collide, and pre-sort objects into sectors based on where they are on the screen, then test for object collision in the same and in adjacent sectors.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#15
here:

http://forum.qbasicnews.com/viewtopic.ph...25&start=0
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)