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.

Newcomers DBPro Corner / Object Collision is slow! help!

Author
Message
Uber Krystoff
20
Years of Service
User Offline
Joined: 3rd Feb 2004
Location:
Posted: 4th Feb 2004 03:18
I'm making a first person shooter and all was going well untill i got into a little problem. I want to be able to make a shoot routine that occurs instantly, that is one click will send the bullet its entire range determain what it hits and begin an explosion effect BEFORE the screen refreshed and the loop finishes. The problem is that the Object collision() command is SLOW. this part of my program looks something like this:

obj2=bullet
obj3=what bullet will hit



I am completely at a loss for what to do, i even tried making my own collision detection command which is very hard. Little help here?

256k ought to be enough for anybody
-Bill Gates
walaber
21
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 4th Feb 2004 04:30
are you using DB or DBPro?

also, don't use GOTO. in your example, use this code:


the "exit" command will jump out of a for/next loop (or a do loop, as well as a repeat/until while loop I think).


if you are using DBPro, there is a very fast way to do this using the intersect object command...

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia Ti4200 AGP 8x 128MB
nuclear glory
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 4th Feb 2004 06:09
Also, be sure to take a look at our DLL if you already haven't. Link below

Lead Programmer/Director
Powerful Collision DLL for DBPro and DBC: http://www.nuclearglory.com
Uber Krystoff
20
Years of Service
User Offline
Joined: 3rd Feb 2004
Location:
Posted: 4th Feb 2004 20:04
I'be also been considering makeing my overall layout use functions for all major components and instead of useing arguments, just call values from an array while in my function.

256k ought to be enough for anybody
-Bill Gates
Uber Krystoff
20
Years of Service
User Offline
Joined: 3rd Feb 2004
Location:
Posted: 4th Feb 2004 20:33
here is the basic code for my program, i built it to be very interchangeable. i wrote it in school so i haven't had time to actually build the array yet. All of the arguments used in the functions will be replaced with positions in an array which is available within functions and as univeral variables.
i have left the arguments in to give an idea of what data will need to flow in and out of these sections

someone told me that i'm trying to use DB as if its object oriented, but i've never actually used an object oriented language. What exactly am i doing and will the data going in and out of the array be to slow?



This is realllly sketchy and i think i have some fundamental errors in my orginazation, its basically just a brainstorm right now, but you get the general idea of how much info will have to be written into and out of the array every single revolution. Will this be slow or is writing in and out of an array slow?
What about with a memblock?

256k ought to be enough for anybody
-Bill Gates
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 6th Feb 2004 03:53
Hey Uber Krystoff, NuclearGlory's dlls are worth taking a look at. They handle collision easy as using PRINT, and are more accurate than DB's standard collision.

Juvenile Industries
Current Project: KillZone(FPS)
Soon to come:An rts, and a snowball fight game
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 6th Feb 2004 04:41
DB Standards are slow as poo in the winter! Go with the NG DLL!


We need help! Email us! join@eternaldestinyonline.com
walaber
21
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 6th Feb 2004 06:12 Edited at: 6th Feb 2004 06:12
nm

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia Ti4200 AGP 8x 128MB
Uber Krystoff
20
Years of Service
User Offline
Joined: 3rd Feb 2004
Location:
Posted: 6th Feb 2004 19:59
Thanks for the tips guys, i thought i was gunna have to re-work my whole engine, thx a bunch!

There are 10 types of people in the world, those who understand binary and those who don't.

Login to post a reply

Server time is: 2024-11-26 04:43:25
Your offset time is: 2024-11-26 04:43:25