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 / newton

Author
Message
Sephnroth
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 20th Sep 2006 08:40
as i'm recovering from a leg injury and lost all my recent projects in a nasty hdd failure, i'm passing time by bringing some of my older projects that were backed up upto date with the latest version of the sdk, shaders and in this one particular case newton phsyics for the purposes of level collision.

i'm having some trouble following the tutorials that came with newton (mainly because I dont get on with their seperated tutorial system.. ie, a source file and a document file with the document continually asking you to alt tab to the source to look at something - it makes me feel so detatched and confused) but I think I understand the general idea. I use a newton tree collision thing for static, non-moving data like my world and rigid boxes for things that do move like my player and moving platforms within the world, yes? This is a 3rd person btw.

Anyway I decided to use a class this time (not normal for me, I lub function based programming) to start creating a CNewton object that would load an object into darkGDK and newton at the same time with one command. Stumbled when I saw the difference in tree commands between the c++ and dbp versions - dbp's newton wrapper will take a dbp object id and newtons sdk wants you to add faces. Whats the best procedure here? I figured i would end up parsing the world using the vertex commands and passing those in? or something?

I wouldnt mind seeing the wrapper source if anyone has that, I couldnt find it though on walabers forum for it there are hints it WAS released once but has now vanished.

Its actually a real shame there isnt a minimalistic example of newton with the sdk - just moving a cube around over a .x/.dbo/.whatever and no fancy pants like crates to push around - just the basics. If anyone has one lmk :/

cheers

p.s - will the sdk ever get any form of dark physics or something? though it seems if i can make newton work then theres not alot else one would need

Wilvis
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location:
Posted: 21st Sep 2006 03:31
I would love to see a network and gdk example i tried to do it my self but ended up getting linking errors and gave up to work on other parts of my game.
Sephnroth
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 22nd Sep 2006 20:24
well i have been trying to do it myself and I have progress but not conclusion. I really need someone like walaber to look at my code - i'm trying to create a collision tree from a loaded model (intended to be the game world) and I have some code to draw wireframe where newton thinks the geometry is afterwards. The wireframe is all there.. but messed up, warped and contained all in one big heap. I dont know if its the fault of my loader (most likely) or maybe im drawing the wireframe wrong (possiable, unlikely) so if someone could take a look:

my level loading code:



no idea if that is a sensiable way of retriving faces but i dont have a clue how else to do it. then this was generating the wireframe from it after load:



anyone with knowledge of these things like to set me streight?

thanks

Sephnroth
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 24th Sep 2006 06:44
further updates because i know i've talked to people who will be looking here later but i've made significant changes to my code:

got tons of progress now, i can pretty much see the whole level through the geometry drawer (which i changed from lines to solid triangles, lets me see more clearly what is happening) but its still not quite right. Either the for each poly function misses polies or the Add Face command is failing to add some of my faces because a few choice faces are missing in the geomtry. i cant see a pattern, there are just some that arnt drawn. If, instead of a loaded model, I run this on a simple cube made with dbCreateObjectCube() then it only draws half the cube! It draws it all if i draw directly from the face add code though so i know i'm parsing all the faces correctly.. anyway, updated code (all of it this time):



Login to post a reply

Server time is: 2024-11-19 08:47:48
Your offset time is: 2024-11-19 08:47:48