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 / Dark SDK + Newton - Question about Matrices...

Author
Message
stevie disco
19
Years of Service
User Offline
Joined: 30th Dec 2004
Location:
Posted: 6th Jan 2005 02:02
Hi All,

I'm just cutting my teeth on some C++, Newton and DGSDK - I'm trying to convert the first Newton tutorial from GLUT to the DG graphic engine.

Got my head round all the include files, linkers and the like - haven't programmed in C++ for years. Bit slow but hey.

Anyway - my questions:

1) How to get the transformation matrix from a DB object that can be used to push into Newton to set the body's starting position, angle etc. Here's the original -


2) How to pull the matrix from the Newton body to update the db object. Again, here's the original -


Basically, is there an equivalent in the DGSDK or is that covered by the EZAngle plugin thingy. If so - is there a way of using that in my C++ programs.

I know I should cut my teeth on something a bit more straightforward, but if I can crack this, then I should be able to get quite far with the physics engine.

I hope someone it's something simple so that someone can help.

Thanks in advance.

check out www.bookandstay.com for some non-game related work of mine.
stevie disco
19
Years of Service
User Offline
Joined: 30th Dec 2004
Location:
Posted: 6th Jan 2005 08:17
Bump...

I'm really hoping that I don't have to do a course in linear algebra to solve this. Surely someone must've had a go.

I'm knee deep in Eulers, Quaternions and Matrices and I haven't touched math for about 7 years. Argh!

Getting there though - I've found a function to convert a matrix(4,4) to Euler angles. Just need some background info on how DB does rotations..

Are the inputs to dbRotateObject radians or degrees, or something else entirely.

Anyone any ideas? Anyone got Newton working with DGSDK and C++? Please share code if you have . Failing that, would the EZRotate thing be of use. I know it doesn't work in DGSDK as of yet, but I could muck about with the DBPro trial if it does.

Ta.

check out www.bookandstay.com for some non-game related work of mine.
stevie disco
19
Years of Service
User Offline
Joined: 30th Dec 2004
Location:
Posted: 6th Jan 2005 19:18
I know I'm talking to myself ATM, but hopefully someone can come in and help me out..

I'm getting there. Found a function in the Newton SDK thus..



That'll give me the rigid body's orientation in Euler angles. I don't know much about Euler angles except that it represents pitch, roll and yaw. I'm assuming that means rotations about the x, y and z axis.

Those angles are in radians and i've got a little function to convert to degrees thus..


But when I pop the values into dbRotateObject my cube doesn't rotate as expected.

Anyone got any advice or ideas. Must be simple to convert it, surely.

check out www.bookandstay.com for some non-game related work of mine.
stevie disco
19
Years of Service
User Offline
Joined: 30th Dec 2004
Location:
Posted: 6th Jan 2005 21:26
Ignore me - I'm a muppet.

Just got the code from walaber's wrapper - it's the same. The problemetter was me ballsing up the transformation matrix in an earlier bit of code.

Sorted.

check out www.bookandstay.com for some non-game related work of mine.
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 8th Jan 2005 10:19
took me a while to find this thread... sorry

gald my source could help

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
zao420
20
Years of Service
User Offline
Joined: 5th Aug 2003
Location: Canada
Posted: 8th Jan 2005 12:57
Ia m thinking about using newton in my project. wasn't going to befor cause i didn't want to rewrite it for darkbasic but now that i am converting it for darksdk i think that will be addition to my remake i am doing, hopfully after i learn c++ a bit more there will be lots of examples with newton

http://cavesoft.no-ip.com
WIP Version of my site. Usally it is offline.
http://dev-cavesoft.no-ip.com
Paranoid Android
19
Years of Service
User Offline
Joined: 5th Feb 2005
Location:
Posted: 16th Feb 2005 17:02 Edited at: 16th Feb 2005 17:11
Can someone attach a simple basic DGSDK project that initializes newton successfully?

(I'm using VC++ VS.NET 2003)

Cheers,
Paranoid Android.
Paranoid Android
19
Years of Service
User Offline
Joined: 5th Feb 2005
Location:
Posted: 16th Feb 2005 18:07 Edited at: 16th Feb 2005 18:08
Oh, and I almost forgot to say Please

So here goes: Please

Cheers,
Paranoid Android.
wh1sp3r
20
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Czech republic
Posted: 17th Apr 2005 16:57
Please :o)

PS: Real programmers aren't afraid of math!.

☺☺ AthlonXP 2500+, Ati Radeon 9600 128MB, dualDDR 512MB 400Mhz CL3.0, SB LIVE!, monitor 19" ☺☺
shiny
20
Years of Service
User Offline
Joined: 17th Jan 2004
Location: Santa Monica
Posted: 8th Jun 2005 04:36
Yeah! Please!

walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 9th Jun 2005 18:31 Edited at: 9th Jun 2005 18:34
my game for the puzzle compo comes with the full source included, so you can see how I integrated DarkSDK + Newton.

I will put up a download for the game on my website after the deadline is up.

[edit]
actually the beta download had the source too, which is still on my site:
http://walaber.com/connect_more/ConnectMore_Beta3.zip

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
Erick G
Retired Moderator
19
Years of Service
User Offline
Joined: 2nd Oct 2004
Location: Texas, USA
Posted: 9th Jun 2005 19:00
I wonder how newton will stack up against the planned physics library.
shiny
20
Years of Service
User Offline
Joined: 17th Jan 2004
Location: Santa Monica
Posted: 10th Jun 2005 04:10
oOo. Rock on walaber!!!

Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 10th Jun 2005 04:44
I'm too lazy to search for that d3dx9_25.dll. Where is a direct download that I can get using my 14.4k Dialup connection?

-This...is my boomstick!
shiny
20
Years of Service
User Offline
Joined: 17th Jan 2004
Location: Santa Monica
Posted: 10th Jun 2005 05:15
Awww, come now! I had looked all over the place for a darkSDK example of Newton!

walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 10th Jun 2005 13:14
Erick G - I think it'll stack up just fine. I know from lots of experience the Newton solver is fantastic.

however I have a feeling they are implementing the "Meqon" engine, because they mentioned particles and liquid dynamics in the diaries, and the only rigid-body physics engine I know that includes both of those right out of the box is Meqon... although I imagine Havok does as well.

Shiny - did you have a look at the source?

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
shiny
20
Years of Service
User Offline
Joined: 17th Jan 2004
Location: Santa Monica
Posted: 10th Jun 2005 14:31
Sure did have a look at the source. I learn't allot, not just about Newton. Thankyou very very much.

Erick G
Retired Moderator
19
Years of Service
User Offline
Joined: 2nd Oct 2004
Location: Texas, USA
Posted: 10th Jun 2005 17:05
cant run the demo, this damn dll rubbish, aarrgg
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 11th Jun 2005 04:09 Edited at: 11th Jun 2005 04:10
I take it Erick G you need the DLL thing too?

@walaber:

I called my friends at Havok and they won't "confirm nor deny" anything about their engine and TGC.

-This...is my boomstick!
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 11th Jun 2005 17:36
Quote: "I called my friends at Havok and they won't "confirm nor deny" anything about their engine and TGC."


you have friends at havok? damn

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 12th Jun 2005 00:48
Yeah, we usually get drunk when I goto San Jose for the GDC.

-This...is my boomstick!
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 20th Jun 2005 11:56
in the latest diary entry Mike mentioned a major update to the engine... which leads me to believe they might be using Novodex, as it's the only major engine that has mentioned an update recently, and people on other forums have mentioned changes to functions, etc.

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB

Login to post a reply

Server time is: 2024-03-29 06:13:21
Your offset time is: 2024-03-29 06:13:21