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 / The easiest sliding collision system ever !!!

Author
Message
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 27th May 2007 09:47
Hey there guys !!! Well on short, after spending like more than a year trying to find some good and simple collision detection systems, I came up with nothing cause either I didn't understand their concept or I couldn't put it into DB code now, after watching a simple DBC sliding collision tutorial, I've managed to make SUCH a simple collision detection system just using some internal commands Please feel free to check it out :



Could you help me treat my injured Dino-Fly ?
Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 27th May 2007 11:02
And you have missed Sparky's collision dll


[B] - LINKIN PARK - [/B]
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 27th May 2007 11:23
lol that's way more complicated than this just because u have to call a dll and stuff

Could you help me treat my injured Dino-Fly ?
Mr X
19
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 27th May 2007 15:08
As I reacall, you don't need the dll for the exe, it's just aomething the compiler uses to create th exe. And about calling it, you don't need that either if you've installed it correctly (then it's commands just treated as any other DBPro command in the editor). Anyway, this code seems quite easy.
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 27th May 2007 15:33
@Twinsen - your code is just using the built-in sliding commands and most users know about them already but once you try and write a proper game using them you will find why they are pretty useless. For a start they are really slow and you get some annoying things happen when you have lots of objects close together and you get 'stuck' sliding along walls.

That is why Sparky and Nuclearglory collision systems are so much bettter, specially the speed, and also you have far more control of things.

Boo!
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 27th May 2007 16:33 Edited at: 27th May 2007 16:34
oh spooky can you please answer in my other threads ?

this one http://forum.thegamecreators.com/?m=forum_view&t=107049&b=7
and this one http://forum.thegamecreators.com/?m=forum_view&t=107042&b=7

Could you help me treat my injured Dino-Fly ?
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 4th Jun 2007 03:42
Quote: "And you have missed Sparky's collision dll "


I think he has DBC...

Quote: "lol that's way more complicated than this just because u have to call a dll and stuff "


Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 4th Jun 2007 14:39
nope, I have DBPRO and can u please answer to my other 2 threads ? I really need ur help people

Could you help me treat my injured Dino-Fly ?
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 4th Jun 2007 17:45
Not a lot to say really. DBPro's built in sliding collision is a big pile of pants. As you have experienced, it is just about usable for non-rotated boxes, ie level must be made of boxes at 90 degrees. I tried many times with slanted walls at 30 or 45 degreesm etc and the sliding commands dont work properly and you end up stuck.

As the help files 'try' and explain, sliding commands only work for objects that you manually create a collision box for and the ,1 on the end is supposed to handle rotated boxes, but it doesn't.

TGC will never bother to fix and so I would give up trying if I were you. Sparky is free, fast and has lots of functionality. Nuclearglory costs money but has lots of functions. I bought it years ago but still not used it!



Boo!
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 5th Jun 2007 20:08
woow what's that spooky ??? it looks cool though the collision with the white wall is messed up

Could you help me treat my injured Dino-Fly ?
The Nerd
20
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 5th Jun 2007 20:53 Edited at: 5th Jun 2007 20:55
Quote: "woow what's that spooky ??? it looks cool though the collision with the white wall is messed up "


umm... I think you need to read peoples posts a bit better That was exactly what he wanted to show you... it was to get a point across. That the collision in DBPro get's messed up as soon as they're not 90 degress anymore.

And to say that Sparky's collision DLL is complicated is a big lie. Hehe I think it's the easiest free collision DLL you'll find out there. It's fast and easy to use too.

http://forum.thegamecreators.com/?m=forum_view&t=74762&b=5

Give it a go.

Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 5th Jun 2007 22:35
oh now I got it :p also, I might be a moron but how exactly do I use his dll ??? I mean as soon as I call a sc_xxxxxxxxxxx command, the compiler asks for a memblock ... and btw: I never understood what a memblock is

Could you help me treat my injured Dino-Fly ?
The Nerd
20
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 5th Jun 2007 23:15 Edited at: 5th Jun 2007 23:18
Quote: "I mean as soon as I call a sc_xxxxxxxxxxx command, the compiler asks for a memblock ..."


Yes, you have to call a memblock somewhere in the code. You could do this outside of your main loop:


etc... it's needed to initialize the DLL properly.

Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 5th Jun 2007 23:19
hmm I'll try but what is a memblock anyway and what's it used for in general ???

Could you help me treat my injured Dino-Fly ?
The Nerd
20
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 5th Jun 2007 23:32 Edited at: 5th Jun 2007 23:33
I haven't used memblocks much, but well, It's memory. I guess you could say that it's like a block of memory that you can put aside for whatever you might wanna use it to. Since I haven't used them much I won't be able to tell you how they are used in general. But I think there's a lot of ways you could use them. To study them further, you could take a read in this tutorial:
http://files.thegamecreators.com/developer/dbpro/DBPro_Tutorial_9_2D_MemBlock_Star_fields.zip

That would be one way of using them.

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 6th Jun 2007 03:49
Quote: "
DBPro's built in sliding collision is a big pile of pants
"


Im using it with 60 fps in my mazed 3d procedural rpg, but i had to add many other techniques to cull it down so only a few checks are made per loop.

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 7th Jun 2007 08:24
Quote: "I've managed to make SUCH a simple collision detection system just using some internal commands"


You managed to make?

All you appear to have done is changed the variable names in one of the code snippets from my tutorial - and lost the indentation!

'Your' code:



Mine:



I don't see what you actually 'managed' to do here - apart from copy someone else's code without saying where you got it from.

Good job I managed to not get annoyed...

TDK_Man

Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 7th Jun 2007 15:00
wow sorry for that didn't wanna make it sound like that ... it's just that I've seen all those complicated systems and I thought that I had discovered an easier way of dealing with things ... but apparently I didn't ... anyway, by the I'VE MANAGED sentence, I meant I've managed to extract just the essential part out of the DBC sliding collision example sorry again TDK

Could you help me treat my injured Dino-Fly ?
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 8th Jun 2007 01:23
But you said you made it...

:/ why are the forums suddenly being flooded with plagiarism... wow.


TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 8th Jun 2007 07:48
Quote: "didn't wanna make it sound like that"


No big deal really - I wasn't mad or anything.

But, just as a tip for the future, if you post any code on the forums which isn't totally your own work - eg you based it on someone else's code, it's a common courtesy to mention who's code you based yours on.

If you don't, you'll get a bad reputation on the forum and probably jumped on from a great height by the person who's code you used.

TDK_Man

Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 8th Jun 2007 14:18
oh thanks also, I didn't know it was your code cause I found it in the examples which came with DBC so that makes u a darkbasic engine coder ??? WOW that's sooo cool

Could you help me treat my injured Dino-Fly ?
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 8th Jun 2007 14:42
Twinsen's ability to get contextual help just dropped by whale meters.

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 8th Jun 2007 17:19 Edited at: 8th Jun 2007 17:20
Quote: "why are the forums suddenly being flooded with plagiarism... wow."


Yeah - I know!

Here's something else I thought I wrote but apparently I didn't...

http://forum.thegamecreators.com/?m=forum_view&t=106251&b=11

TDK_Man

Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 8th Jun 2007 17:30
Wow, hpfan273 didn't even wait to claim your code as his own. Worse still, he didn't even understand it! He was asked a question about the data statements and just glossed past an answer.

To make it worse still he still didn't acknowledge you after you pointed it out. Wonders will never cease...


Come see the WIP!
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 8th Jun 2007 17:43
TDK, if you're a TGC member and a DB coder, can u please tell me one thing ? cause others seemed not to know the cause in a game of mine I used a ghost object command and the game looked super up until 5.9 cause from 6.0 and above, the room looks dark or unlit

Could you help me treat my injured Dino-Fly ?
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 8th Jun 2007 19:20
Quote: "TDK, if you're a TGC member and a DB coder, can u please tell me one thing"


No, I'm not a TGC member - I'm only a forum user like everybody else.

I'm also more of a DBC user than DBPro, so I know a lot less about it than most DB Pro users on here.

Having said that, I don't see the connection between using Ghost Object and your scene being darker. It's more likely to be a change in the lighting commands, (commands are often changed in updates to improve the way they work).

TDK_Man

spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 8th Jun 2007 19:55
In more recent versions of DBPro you need to DISABLE OBJECT ZWRITE objNum on objects you are ghosting.

Boo!
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 9th Jun 2007 11:22
oh ok guys I'll try that spooky thanks

Could you help me treat my injured Dino-Fly ?

Login to post a reply

Server time is: 2024-11-25 18:02:58
Your offset time is: 2024-11-25 18:02:58