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.

Dark GDK / Sparky's and terrain

Author
Message
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 25th May 2008 18:01
I'm trying to use sparky's to do collision for my terrain. if theres a better way i'll use that. but when I try to SC_SetupObject on my terrain I get this:

First-chance exception at 0x7c812a5b in Dark GDK - 3D Game4.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x0013fac4..
Unhandled exception at 0x7c812a5b in Dark GDK - 3D Game4.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x0013fac4..
The program '[784] Dark GDK - 3D Game4.exe: Native' has exited with code 0 (0x0).

SC_SetupObject works for all my other objects, so i assume it has soemthing to do with the complexity of the terrain model. What fix is there?
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 25th May 2008 18:20
Did you try SC_SetupComplexObject() ?, as SC_SetupObject() should only be used for objects that you need to move, the former for anything static.

programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 25th May 2008 19:09
When I use Sparky's with my terrain, I use SC_SetupObject ( 1, 2, 0 );, and it works although it is EXTREMELY SLOW! I tried SC_SetupComplexObject, but nothing ever seemed to happen.....

~~Its not about what you know, its about how you figure it out.~~
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 25th May 2008 21:49 Edited at: 25th May 2008 21:59
nope sorry, still happens.
[edit]Im an idiot. "SC_setupTerrainCollision"
[edit again]Well "SC_setupTerrainCollision" doesnt seem to exist in the GDK version, or "SC_SetupTerrainCollision". Its in the help files sparky's came with though...
Tom Taylor
20
Years of Service
User Offline
Joined: 29th Dec 2003
Location: Germany
Posted: 25th May 2008 22:00
Hi, my terrain and SC works very fine. Here sample code which works for me:




In your mainloop call:



Tom Taylor
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 25th May 2008 22:07
Well your idea didnt work for me, but looking into the header file i found, SC_SetupTerrainObject, which is clearly what SC_SetupTerrainCollision is meant to be, and that seems to work, if very slowly
RancidRat
16
Years of Service
User Offline
Joined: 19th Feb 2008
Location:
Posted: 26th May 2008 09:26
I was also trying to make a terrain with Sparky and in the help file it says SC_setupTerraincollision but it did not work! So i looked in the .h file and saw SC_SetupTerrainObject.
So when I did:
SC_SetupTerrainObject (1,1,1000 );
it worked great and very fast!

Login to post a reply

Server time is: 2024-11-20 11:24:53
Your offset time is: 2024-11-20 11:24:53