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.

Code Snippets / Terrain Collision

Author
Message
Milkman
18
Years of Service
User Offline
Joined: 30th Nov 2005
Location: United States
Posted: 23rd Dec 2005 08:17
This is a short program I wrote to demonstrate my terrain collision. I needed a very versatile way to do collision with almost any surface on a map, so I used Kensupen's basic sliding collision idea and Sparky's collision commands to create this. You slide horizontally and vertically off of any surface with a slope greater than about 45 degrees, but can walk on any surfaces with a slope lower than that. I will be using this in the game I'm creating, and I hope this is useful to someone else. Please post with comments, suggestions, or problems, and also post your performance and fps with this. You can download the whole program with attached media, but I've also supplied the source below.



"Genius is 1% inspiration and 99% perspiration"

Attachments

Login to view attachments
Zedane
20
Years of Service
User Offline
Joined: 3rd Nov 2004
Location: Milky Way, Earth
Posted: 26th Dec 2005 02:23
someones wrong..but it may just be my DBP skrewing up...

[COMMON]
PathToEXE=C:\\CrashOn_12_25_05.txt
[CEXE]
m_dwRuntimeErrorDWORD=7023
m_dwRuntimeErrorLineDWORD=31

thats the error.


around here.. normal's just a setting on a hair dryer
Milkman
18
Years of Service
User Offline
Joined: 30th Nov 2005
Location: United States
Posted: 26th Dec 2005 05:01
did you compile the code, or run my exe? because this was written with dbp v5.2...

"Genius is 1% inspiration and 99% perspiration"
Zedane
20
Years of Service
User Offline
Joined: 3rd Nov 2004
Location: Milky Way, Earth
Posted: 26th Dec 2005 16:46
aah i see well i will get around to running the exe but first im going to make a level to test your collision with.


around here.. normal's just a setting on a hair dryer
Milkman
18
Years of Service
User Offline
Joined: 30th Nov 2005
Location: United States
Posted: 26th Dec 2005 18:45
try as best as you can to break it

"Genius is 1% inspiration and 99% perspiration"
Zedane
20
Years of Service
User Offline
Joined: 3rd Nov 2004
Location: Milky Way, Earth
Posted: 28th Dec 2005 04:38
Do you know why i cannot run the code though?


around here.. normal's just a setting on a hair dryer
Milkman
18
Years of Service
User Offline
Joined: 30th Nov 2005
Location: United States
Posted: 28th Dec 2005 06:46
well if you dont have sparky's, that could be why. i'll mention again that i wrote it with v5.2, so your version could be the reason.

"Genius is 1% inspiration and 99% perspiration"
Milkman
18
Years of Service
User Offline
Joined: 30th Nov 2005
Location: United States
Posted: 29th Dec 2005 19:41
I can't beleive that no one is interested in this...

"Genius is 1% inspiration and 99% perspiration"
Acolyte Entertainment
19
Years of Service
User Offline
Joined: 28th Dec 2004
Location: Oregon, US
Posted: 7th Jan 2006 01:05 Edited at: 7th Jan 2006 01:18
how do i use it

EDIT: Hmmmm. where do i get the
command. cause my code wont run with it in the source.

O
M
G!
Milkman
18
Years of Service
User Offline
Joined: 30th Nov 2005
Location: United States
Posted: 7th Jan 2006 22:58 Edited at: 8th Jan 2006 19:29
this was just an example of how to do accurate terrain collision with sparky's. to get it to work for you, you'de have to dissect it yourself and implement it into your game...

i am working on a small collision system right now that uses this method and is easy to implement into your own program. i wil post it on the forum when it's done. you might want to look at that if you cant understand exactly how this works.

EDIT:
my collision system is now complete. please see this thread:
http://forum.thegamecreators.com/?m=forum_view&t=69073&b=1

"Genius is 1% inspiration and 99% perspiration"
Shadowed Lightning
20
Years of Service
User Offline
Joined: 10th Nov 2004
Location:
Posted: 21st Jan 2006 00:51
xMik, I'm having problems with the code, first I tried it myself and it didn't work, then I tried one of your latest demos, and it didnt work, then I made a big error in the main loop and it didn't even get to the main loop to read the error, I run the code, the screen goes black, then the programs "ends" though I'm thinking it never starts. Your demo .exe's seem to work fine, I have sparky's dll installed properly, and I upgraded to 1.058 so what is going wrong do you think?
You did a really good job on this by the way, I wish I had the coding capabilities of making a collision enginge like this. All I have to say is Wow, amazing lol

AMD Athlon 64 3200 - GeForce 6800 GT - 320GB Hard Drive
1024MB RAM
Milkman
18
Years of Service
User Offline
Joined: 30th Nov 2005
Location: United States
Posted: 23rd Jan 2006 17:44
are you talking about the code on this thread, or my other thread?


"Genius is 1% inspiration and 99% perspiration"
Shadowed Lightning
20
Years of Service
User Offline
Joined: 10th Nov 2004
Location:
Posted: 25th Jan 2006 02:20
I'm talking about the other thread, sorry posted at wrong place, could you try to figure out the problem I posted though, its for the code on the other thread. Thanks

AMD Athlon 64 3200 - GeForce 6800 GT - 320GB Hard Drive
1024MB RAM
Milkman
18
Years of Service
User Offline
Joined: 30th Nov 2005
Location: United States
Posted: 25th Jan 2006 03:28
try compiling the project on this thread, without modifications:
http://forum.thegamecreators.com/?m=forum_view&t=70123&b=1
that is the absolute newest version of the demo. if this doesnt compile for you under 5.8, then it never will

"Genius is 1% inspiration and 99% perspiration"

Login to post a reply

Server time is: 2024-11-23 07:28:02
Your offset time is: 2024-11-23 07:28:02