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.

Author
Message
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 12th Jan 2008 03:55 Edited at: 12th Jan 2008 04:42
ok i am making a maze game and i finally figured out collision using the native commands but it is box collision so i cant get into my maze and evryone says to use sparkys but i have no idea to do it.

here is my code...




Come see the WIP!

Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 12th Jan 2008 06:40
if you are using box collision DB will treat your maze as if it was a solid box of the same size, this is a technique used to save time when checking collisions on complicated objects.
To get more accurate collisions use SET OBJECT COLLISION TO POLYGONS
look it up in the help file

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 12th Jan 2008 12:26 Edited at: 14th Feb 2008 17:31
@ DB newbie

Check out this link. Roddman put together a pretty good example of using collision to maintain the camera height on a terrain. To be able to see what is going on, you might have to set the object to wire frame:

SET OBJECT <obj>,0,1,1

Click here

Oooooops!!! I accidentally formated drive c.
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 14th Jan 2008 02:50 Edited at: 14th Jan 2008 04:49
thank you both of you...thecomet i looked at it and it is a little to complecated for me right now so i decided to try the polygon collision it works great except it only stops at one part of the object which happend to be before i did the box collision?

edit: oh and one more thing how do i get it to show the fps on the screen... this is what i tried




Come see the WIP!

DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 14th Jan 2008 15:38
anyone?


Come see the WIP!

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 14th Jan 2008 16:12
What you have used is correct - but whether you see it or not depends on where in your program you put it.

Try putting it at the end of the main program Do..Loop immediately after the Sync.

TDK_Man

DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 15th Jan 2008 00:34
hmmmmmmm i just tried that and it still didnt work. here is were i put it.




Come see the WIP!

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 15th Jan 2008 16:51
Have you got Sync On: Sync Rate 0 at the start of your program?

Also, check the font colour. I there any possibility that it's printing black text on a black background?

TDK_Man

Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 15th Jan 2008 17:30
While making this maze game I would print a lot of "bug catchers" (as I call them) to screen; things like OBJECT COLLISION(1,3), the reason to display raw data like this is that you'll be able to see what is going on in your program and why things aren't working.

For example, if you miss-typed the object collision check as OBJECT COLLISION(1,2) and you hadn't noticed it, you'd be wondering why the code inside the if statement was never executed. By printing the result of OBJECT COLLISION(1,2) to screen you'd immediately see that you had been checking the wrong object.
Errors like this are extremely common so good de-bugging will save you lots of time

DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 16th Jan 2008 05:09
@TDK ok i put the text right after sync and before loop and i set the sync rate to 0 and it is not up on a black background and it still wont show here is all of my code...i've tried placing it all over and it wont work.



@ TDK or OBese87 how would i go about making " bug catcher" like somthign such as


i think thats how to do it...like i know how to detect but ow to display thats what i dont know...thank you for all of your guys help.


Come see the WIP!

Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 28th Jan 2008 03:50
Quote: "how would i go about making " bug catcher" like somthign such as "

not quite, you want something that will show you the result no matter what it is, like this


DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 28th Jan 2008 04:24
ok thank you...you and TDK have helped me so much


Come see the WIP!

Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 28th Jan 2008 06:18
no probs

DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 30th Jan 2008 01:22
one last quick question that i have on lvl two.
ok sweet i made the second level and the gosub worked and everything...but you know how when you use scroll object texture it has to be in the main loop..well i tried it in the gosub because i want the textures to move but it wont work...here is my entire gosub.




Come see the WIP!

Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 30th Jan 2008 20:00
umm I can't see SCROLL OBJECT TEXTURE anywhere there.

Why do you have this code at the start? (I've indented it for you)


DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 31st Jan 2008 00:25
well that was supposed to make it so if it hit that cube again then the program would end..
and the scroll texture i had it at the begining then i took it out when i posted..cant remember whythough.


Come see the WIP!

Login to post a reply

Server time is: 2025-06-04 02:03:04
Your offset time is: 2025-06-04 02:03:04