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 / Sparkys collision dll crashes app

Author
Message
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 22nd Mar 2008 20:05
As titled really. here is my working code:


here is the code that crashes:


(only difference being the:
sc_setupComplexObject 2,1,6 )

i took the :
sc_setupComplexObject 2,1,6
directly from a tutorial on this forum (which was quite good)

Simmilarly the tutorial on the forum all about sparkys wouldnt run either - i can compile with no worries, but then i get a breif black screen, followed by it closing itself down and returning me to my ide.

Any ideas? (yes the SC_Collision.dll is in the project directory where the exe resides)
Cheers

Paul
pirate
18
Years of Service
User Offline
Joined: 18th Apr 2006
Location: u.s.a
Posted: 22nd Mar 2008 20:19
put the sc_collision.dll in the dark basic professional/compiler/plugins-user folder not in the projects folder...hope this helps

thanks, pirate
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 22nd Mar 2008 20:21
yeah its there aswell .

Paul
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 22nd Mar 2008 20:26 Edited at: 22nd Mar 2008 20:45
latest:
sc_setupObject 1,0,1 - works ok

but if i dont comment out:
sc_setupComplexObject 2,1,6

then it crashes so:
sc_setupComplexObject 2,1,6

must be the culprit - am i doing something wrong?
\/\/\/\//\/\

And now i've found its not the command but the object?

I can apply setupComplexObject to my small model of my main character, but not my 3d world which is quite large - and made in 3dws i may add.

I cant use setupObject or setupComplex object on this large world model..

Paul
pirate
18
Years of Service
User Offline
Joined: 18th Apr 2006
Location: u.s.a
Posted: 22nd Mar 2008 20:53 Edited at: 22nd Mar 2008 20:58
take the .dll out of your projects folder...

Quote: "And now i've found its not the command but the object?"

does the object load with regular dbp commands..

thanks, pirate
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 22nd Mar 2008 21:11
the object loads ok yes, but when i try to apply sparkys collision to the 3d world it crashes out.

taking the dll out now..
doesn't do anything different.

ive tried this with two or three different "world" objects ive exported from 3dws - both terrains, im not sure if they qualify as a proper object for sparky. ive looked all over for info on this but nothing on it..

Paul
pirate
18
Years of Service
User Offline
Joined: 18th Apr 2006
Location: u.s.a
Posted: 22nd Mar 2008 21:15 Edited at: 22nd Mar 2008 21:18
maybe this is what you need to be using instead of the sc_setupcomplexobject....

notice this part...
Quote: "In general an object
with limbs can be setup normally using either setupObject or setupComplexObject. However if the total
number
of polygons across all the limbs exceeds around 21000 polygons these commands will crash."




SC_setupTerrainCollision

SYNTAX
SC_setupTerrainCollision TerrainNum , GroupNum , FreeObject

-TerrainNum: the terrain you want to setup
-GroupNum: the group that you want this terrain to belong to (0 for no group)
-FreeObject: Specify an object that is not currently in use that can be used to temporarily store
data about the terrain's limbs. This object will become free again when this command
has finished executing.

Mesh 255 and memblock 255 must not be in use.
A Terrain requires special setup since it contains many polygons seperated into limbs. In general an object
with limbs can be setup normally using either setupObject or setupComplexObject. However if the total
number
of polygons across all the limbs exceeds around 21000 polygons these commands will crash.
SetupTerrainCollision has been designed to extract the polygon data from each limb one at a time, and build
a collision tree based on all the data. The end result is the same as any other setup command, so other
collision commands (e.g. rayCast or updateObject) can be called as usual on a terrain

thanks, pirate
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 22nd Mar 2008 21:20 Edited at: 22nd Mar 2008 21:30
interesting command, tried it, still black screen and then crashing out.

Update > as a test i created a large primitive (essentially a huge flat box) - that works, but my 3dws exports arent working - how annoying!

Paul
pirate
18
Years of Service
User Offline
Joined: 18th Apr 2006
Location: u.s.a
Posted: 22nd Mar 2008 21:25 Edited at: 22nd Mar 2008 21:39
well i'm lost..i have never had this problem with sparky's...if you want i could try to load your terrain and see if i get the same result.. otherwise i don't know what else to do...
EDIT:
what is your set display mode command set to?

you really need something like this at the beginning of the program::
sync on: sync rate 60
set display mode 1024,768,32

also sometimes the .dbo export in 3dws is kind of wacky..try exporting to .x and see what you get...

thanks, pirate
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 22nd Mar 2008 21:42 Edited at: 22nd Mar 2008 21:46
yeah ok see attached (not very exciting)

i've even tried it in .x format to no avail.

adding the sync and screen res code makes no odds either ive found.

this code isnt my actual game code, just me playing with sparkys - and failing

cheers for your help so far anyway!
good luck?!

Paul

Attachments

Login to view attachments
pirate
18
Years of Service
User Offline
Joined: 18th Apr 2006
Location: u.s.a
Posted: 22nd Mar 2008 21:50
i loaded it with this code and it ran perfect...


rem load land
load object "media/test.dbo",2
set object light 2,1
MAKE MEMBLOCK 1,1000
SC_setupComplexObject 2,1,3

thanks, pirate
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 22nd Mar 2008 21:52 Edited at: 22nd Mar 2008 21:54
Well i'll be blowed!

I tried it with your code and guess what?

Still nothing!! now im wondering if its my laptop not being able to handle this??
Or could my version of the dll be out of date? - where did you get your version from?

thanks
edit: Additionally, changing the project type ex: windowed -desktop makes no odds

Paul
pirate
18
Years of Service
User Offline
Joined: 18th Apr 2006
Location: u.s.a
Posted: 22nd Mar 2008 21:55 Edited at: 22nd Mar 2008 21:58
i have v2.02 and got it here off the forum..i will attach it so you can download it...

is there anything else in your code that could be causing it to crash?...

thanks, pirate

Attachments

Login to view attachments
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 22nd Mar 2008 21:59 Edited at: 22nd Mar 2008 22:04
Ah hah, no idea how i got this to occur but see attached printscreen
EDIT: i copied your version over mine and it had the same creation date and time and file size - just thought mine might be corrupted or something.

outcome: still screwed

thoughts: when i change it between complexobject and just setupobject is when i get this error - so it knows the model/object of the terrain is too large so it must be reading it in someway.

i dont see how im doing anything different to you? clean project with just your code and the model .

Paul

Attachments

Login to view attachments
pirate
18
Years of Service
User Offline
Joined: 18th Apr 2006
Location: u.s.a
Posted: 22nd Mar 2008 22:04
is this talking about the sc_setupobject object type?

thanks, pirate
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 22nd Mar 2008 22:06
yeah if i have it as sc_setupobject tryin to load terrain it black screens then crashes - displaying error box.

if i have it as sc_setupcomplexobject i get just black screen and exit..

Paul
pirate
18
Years of Service
User Offline
Joined: 18th Apr 2006
Location: u.s.a
Posted: 22nd Mar 2008 22:08 Edited at: 22nd Mar 2008 22:09
maybe your sparky's .dll got corrupt during download...save that one and try another...this is already got me on a mission to try to figure this out..let me know how it turns out...

thanks, pirate
pirate
18
Years of Service
User Offline
Joined: 18th Apr 2006
Location: u.s.a
Posted: 22nd Mar 2008 22:12 Edited at: 22nd Mar 2008 22:13
i was running the model in my code from the fps tutorial that i posted a few weeks back..you might try putting your model and texture in that and see if the code compiles...let me know

http://jandscreations.com/files/dbprofpstut.exe

thanks, pirate
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 22nd Mar 2008 22:17
just trying this.

ive just done a fresh sparkys download and cleared all of the other stuff out.

the only thing i saw was in the changelog.txt - "fixed crashing for certain systems" - maybe im one of the few who has this problem - in which case i may need to try this on my other machine upstairs ,

Paul
pirate
18
Years of Service
User Offline
Joined: 18th Apr 2006
Location: u.s.a
Posted: 22nd Mar 2008 22:21
i have found that it is best to program 3d programs on a desk top computer..laptops seem to lack power...

thanks, pirate
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 22nd Mar 2008 22:27
ok well im pretty gutted, i ran your fps code how it was, ran fine, although a bit of a shock when one of those alien things started to rape my leg and make a loud noise

-changed code to load my terrain.dbo file

-tested.

after start screen crashed out ..

think we can safely say a Dell Latitude D600 Win XP, is off the cards for sparkys!

What a shame! means any game i create can't be played on a laptop..

Newtons works ok on here, i may have to see how hard that is to use?

cheers for your help pirate

Paul
pirate
18
Years of Service
User Offline
Joined: 18th Apr 2006
Location: u.s.a
Posted: 22nd Mar 2008 22:41 Edited at: 22nd Mar 2008 22:43
you are welcome paul,
i enjoyed working with you, even though we solved nothing and i'm sorry the monsters scared you...ha ha

i found newton hard to use ,but it could be just a personal preference...later, pirate

thanks, pirate
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 22nd Mar 2008 22:45
one more thing pirate, what version of dbpro are you running?

Paul
pirate
18
Years of Service
User Offline
Joined: 18th Apr 2006
Location: u.s.a
Posted: 22nd Mar 2008 22:55
i am running v1.066

thanks, pirate
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 22nd Mar 2008 23:11
hmm cant be that then.

just tried this on my other machine - no luck there either just crashed out, cant get my head around this.

both this machine (dell laptop) and my MSI Mega180 media pc play games like UT2003, Black and white, etc but just wont work with SC_setupcomplexobject

Paul
pirate
18
Years of Service
User Offline
Joined: 18th Apr 2006
Location: u.s.a
Posted: 22nd Mar 2008 23:22
i'm thinking that it must be something missing from your code..i have never heard of anyone having trouble with the .dll itself...i wouldn't mind taking a look at the code you have so far and maybe i could figure it out by running your code on my computer...i make a lot of mistakes when i code so i'm getting pretty good at figuring it out...

thanks, pirate
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 22nd Mar 2008 23:38
Pirate im just using the code you posted - so we were in the same boat so to speak?


but with a loop in it to keep it running:
so all in:

(begin code)


Paul
pirate
18
Years of Service
User Offline
Joined: 18th Apr 2006
Location: u.s.a
Posted: 22nd Mar 2008 23:51
you will have to have more code than this...you will have to have a camera positioned..

thanks, pirate
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 22nd Mar 2008 23:55
No but as a universal test what happens if you run that?

if i comment out the sc_ (sparkys command) then it runs fine and stays in the loop? if i leave the code in it will crash out

Paul
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 22nd Mar 2008 23:59 Edited at: 23rd Mar 2008 00:26
There has to be something in the: SC_setupComplexObject that just wont agree with my laptop or processing power? (think this is a 1.2-1.6ghz processor) - i'd be interested to know exactly why though.

Like i said before i can do a:
SC_setupObject - on a normal smaller model..
that works fine.

*rips some more hair out*

edit: according to windows system via cpanel i've got: Intel Pentium M 1600 MHz, 512mb ram..

edit:
additionally i was looking at the 20line forum and this wont run either:
http://forum.thegamecreators.com/?m=forum_view&t=119562&b=11

Paul
pirate
18
Years of Service
User Offline
Joined: 18th Apr 2006
Location: u.s.a
Posted: 23rd Mar 2008 00:38
try this code and let me know if it will run...

thanks, pirate

Attachments

Login to view attachments
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 23rd Mar 2008 01:00
just looking at

Paul
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 23rd Mar 2008 01:04 Edited at: 23rd Mar 2008 01:05
Right, the outcome of that is:
The exe ran fine.

DarkBASIC Professional: compiled ok. black screen. crashed.

Does this mean theres something wrong with my compiler?

Now i've compiled it obviously the new exe file wont work.

So the laptop CAN handle the function, just it cant compile it properly for some reason,

just looked, my DBP compiler ide is v1.057

Paul
pirate
18
Years of Service
User Offline
Joined: 18th Apr 2006
Location: u.s.a
Posted: 23rd Mar 2008 01:12
you might have to save your projects and reinstall dbpro...

thanks, pirate
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 23rd Mar 2008 01:28
would be nice if i hadnt lost all the packaging and with it my serial. will see if i can do an upgrade

Paul
pirate
18
Years of Service
User Offline
Joined: 18th Apr 2006
Location: u.s.a
Posted: 23rd Mar 2008 01:39
in your profile under order history you will be able to get a copy of your serial...it is always best to keep these in a serial file on several computers around the house...

thanks, pirate
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 23rd Mar 2008 01:44
would be nice, i didnt really want to mention it here but i bought it off a friend of mine a couple of years ago, he tells me he got it from electronics boutique/ game (in the uk its a shop that sells games etc) - so i have little chance of getting it tbh, i might just have to go out and buy it again just to get another serial lol - bet you anything it still wont work.

anyway time for some sleep i feel.

Paul
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 23rd Mar 2008 06:55
I've only been using Sparky's with DBC a week or so, but so far I've only used setupcomplexobject with cones and cylinders.

When I load a .X file I have only ever used setupObject with collision type polygons. I don't know if this is now different in DBPro though, (not had time to play in DBP yet).

I also don't know if I have been doing this incorrectly and have yet to come across problems in the future because of doing it this way. Might be worth you trying though...

Another thing I noticed that due to stupidity on my part, in DBPro I thought I had put the dll in the correct place - plug-ins - not realising there were two plug-ins folders, one being 'users' which I hadn't used when I should. And that was after reading the instructions!

TDK_Man

Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 23rd Mar 2008 11:13
Cheers, yeah dll is in users plugin folder, and in dbpro using sparkys(latest ver) it says "incorrect object type" or something to that extent if you try it on a large model..

Paul
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 24th Mar 2008 01:28
Trying installing the latest DBPro update again, make sure you choose the "repair" option, it sounds like your version hasn't updated properly.
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 24th Mar 2008 01:39 Edited at: 24th Mar 2008 01:39
@Paul08

How about posting your version of the exe.

As all the required dll's are included in the exe, if there are any dll version problems then the exe itself should fail whatever machine it is run on.

D3DFunc - Superfast Antialiased text & much much more
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 26th Mar 2008 15:00
I don't believe it.

Using CodeSurge as the IDE the command:
SC_setupComplexObject

..and for that matter everything else works fine..
no upgrades or anything?

Strange. Think i'll stick with codesurge for the time being then.

Paul

Login to post a reply

Server time is: 2024-09-27 12:16:29
Your offset time is: 2024-09-27 12:16:29