Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / why does object collision puts down my game speed by 20?

Author
Message
kfoong
22
Years of Service
User Offline
Joined: 28th Jan 2003
Location: Australia
Posted: 22nd Mar 2003 09:07
When i use object collision, it greatly decreases the game speed. Is that command really that slow?
--------
http://www.stellarblue.vze.com/
Danmatsuma
22
Years of Service
User Offline
Joined: 2nd Mar 2003
Location: Australia
Posted: 22nd Mar 2003 11:48
Well no, but I'm not saying anymore 'cos you'll get all indignant like last time...

ZX Spectrum 48k Issue 3, Radio shack Tape drive, Rank arena 12" T.V. set.
Pricey
22
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 22nd Mar 2003 12:53
object collision is slow but you can get around it by doing a few simple things!

1) swich off object collision for any objects which don't need collision.
2) use an other way of performing collision. in the standard tutorials on darkbasic.com they use a different way of doing it. check it out!

kfoong
22
Years of Service
User Offline
Joined: 28th Jan 2003
Location: Australia
Posted: 23rd Mar 2003 00:15
lol duanmatsuma. Thanks pricey for you help.

--------
http://www.stellarblue.vze.com/
QuothTheRaven
22
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 23rd Mar 2003 02:35
object collision is VERY slow, you lose about 10 fps per 5 collision checks, so you gotta find a hella lot of work arounds

Darken the skies, we are god
Danmatsuma
22
Years of Service
User Offline
Joined: 2nd Mar 2003
Location: Australia
Posted: 23rd Mar 2003 02:39
O.K then here's a tip, don't turn it on until you know something is within a certain range of something else, use an object collision box first and then when that collides, turn on your object collision to get more detail.
Drop the attitude kfoong.

ZX Spectrum 48k Issue 3, Radio shack Tape drive, Rank arena 12" T.V. set.
kfoong
22
Years of Service
User Offline
Joined: 28th Jan 2003
Location: Australia
Posted: 23rd Mar 2003 03:18
thanks danmatsuma. ok danmatsuma im sorry, i apoligize for any inconvenience. anyway im already using the object collision box.

--------
http://www.stellarblue.vze.com/
Danmatsuma
22
Years of Service
User Offline
Joined: 2nd Mar 2003
Location: Australia
Posted: 23rd Mar 2003 07:05
No worries kfoong, just gets frustrating when you go out of your way to help someone and well, 'nuff said

ZX Spectrum 48k Issue 3, Radio shack Tape drive, Rank arena 12" T.V. set.
Danmatsuma
22
Years of Service
User Offline
Joined: 2nd Mar 2003
Location: Australia
Posted: 23rd Mar 2003 07:18
Well I'll expand on what I said about object collision:

If you need polygon collision detail, use the object collision box, when you get a collision returned from that, switch on polygon collision, and then you can have that level of accuracy. After that, you switch polygon collision off again, and back to collision bounding boxes.
This way, only the two objects colliding will be switched to polygon collision, and your game won't suffer nearly as much in it's fps
I really think this only applies to games where you might want to say, have a fist collide with different parts of a body for instance, just don't look right if the fist stops in mid air and the target goes ouch!!
If you're just wooshing round shooting people, simple object collision bounding boxes are just fine, sometimes it helps to make them a little bit smaller than you'd think nessecary, depending on what angle you see your character from. that's all I'm using for my retro entry, 'cos I'm going for arcade speed in 3d, wanna keep the fps up

ZX Spectrum 48k Issue 3, Radio shack Tape drive, Rank arena 12" T.V. set.
kfoong
22
Years of Service
User Offline
Joined: 28th Jan 2003
Location: Australia
Posted: 23rd Mar 2003 10:39
well at the moment im only using boxes. That tip may be useful in the futeure. thanx.

--------
http://www.stellarblue.vze.com/
Danmatsuma
22
Years of Service
User Offline
Joined: 2nd Mar 2003
Location: Australia
Posted: 23rd Mar 2003 10:46
'sok

ZX Spectrum 48k Issue 3, Radio shack Tape drive, Rank arena 12" T.V. set.

Login to post a reply

Server time is: 2025-05-17 03:20:01
Your offset time is: 2025-05-17 03:20:01