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 / FPS Collision DBC

Author
Message
Ginga
18
Years of Service
User Offline
Joined: 3rd Jul 2006
Location: Dorset, England
Posted: 12th Jul 2006 13:59
Having sum problemos with object collision now, i've got global collioson on, and now whenever i press the fire button it crashes, when it should play a sound the code is


As its my first game i'm making using DBC, should i try making a 2D text based game instead?
flock
18
Years of Service
User Offline
Joined: 10th Mar 2006
Location: Earth
Posted: 12th Jul 2006 17:33


This is definetly not perfect code, but it is simple and it does work. I've used it before. I've cited this from memory so tell me if it works like it should.

(no, you shouldn't try a text adventure. Maybe a pong but not a text adventure)

a.k.a. "flockhound"
Ginga
18
Years of Service
User Offline
Joined: 3rd Jul 2006
Location: Dorset, England
Posted: 13th Jul 2006 00:38
Unfortunatly, it didn't work .. it just freezes .. Pong Hey, been along time since me played that.. mayb i shuld start mega small.

Thanks anyways Flock
D Ogre
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 13th Jul 2006 02:16 Edited at: 13th Jul 2006 02:17
It will take a certain amount of setup to make this work. It depends
on what the effect your after. This is very generic code, but it does
demonstrate coding logic of sorts to employ collision.

You may want to do something like this:
Ginga
18
Years of Service
User Offline
Joined: 3rd Jul 2006
Location: Dorset, England
Posted: 13th Jul 2006 02:53
Humm..I see where your coming from D Ogre think i'll quickly hash sumit out to test that 2mos wen i get up.. Cheers
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 14th Jul 2006 13:50
Try this, it's an edit to your code. The sound will only play if it isn't already. Oh, and did you turn the sound on on your computer? (I always forget to and wonder why it isn't working ) Anyway, make sure you have your objects right as well. IF all fails then maybe the collision is happening too fast? Slow down the bullet to a slower speed and see if it works then. Anyway, I just added one thing to your code. See if it works.


My Functions: Mine
Post yours: Post
Ginga
18
Years of Service
User Offline
Joined: 3rd Jul 2006
Location: Dorset, England
Posted: 14th Jul 2006 15:11
That didnt work either,, it crashes as soon as i fire the weapon (crashes as it stops moving)
flock
18
Years of Service
User Offline
Joined: 10th Mar 2006
Location: Earth
Posted: 14th Jul 2006 15:14
Pong. On your knees before the great Flockhound!

a.k.a. "flockhound"
Ginga
18
Years of Service
User Offline
Joined: 3rd Jul 2006
Location: Dorset, England
Posted: 15th Jul 2006 11:09
*gets on his knees* Yes master, Pong master, will do master.
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 25th Jul 2006 03:03
Ummm...

Login to post a reply

Server time is: 2024-09-25 05:20:26
Your offset time is: 2024-09-25 05:20:26