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.

Work in Progress / XenoPhysics - A Havok Wrapper for DarkBasic Professional

Author
Message
Melancholic
14
Years of Service
User Offline
Joined: 26th Nov 2009
Location:
Posted: 19th Dec 2009 19:38
How are you people extracting the dll anyway?. ive googled but i cant find anything on the subjct
Blobby 101
18
Years of Service
User Offline
Joined: 17th Jun 2006
Location: England, UK
Posted: 19th Dec 2009 21:14
you go to the temp directory and find where all the DLLs and working files were extracted on runtime.

revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 20th Dec 2009 00:46
Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 20th Dec 2009 01:32 Edited at: 20th Dec 2009 01:35
Please note that I refuse to support any plugin that is extracted. You use it at your own risk. I'm also relatively sure any plugin you extract with have bugs.

That being said, I'd highly appreciate if you did not extract the plugin. Or use it in general until I release it. It makes me very uncomfortable. This isn't directed toward anyone.

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 20th Dec 2009 07:18 Edited at: 20th Dec 2009 07:21
Quick Update

So as I've been restructuring my plugin, I've decided on a syntax change. Instead of xenoStart I'm just going to have "start physics", and instead of, for instance, "xeno make rigid body dynamic box", I'm going to have "make rigid body box". I'm not sure why I desired prefixes to each function as I do not think there is any conflicting commands anywhere in this.

And something that is completely irrelevant, I love multiple inheritance in C++. I have been using Java too much which doesn't support it. I can now make my class XenoPhysics inherit from my Singleton class and my dbPlugin class (dbPlugin just loads functions and stores them as methods, so when you call "XenoPhysics::getSingleton()->getObject(int ID);" it will work. And that is exactly why I love multiple inheritance. )

I'm also updating the way triangle meshes are created. I'm going to use dbps native commands to do so. It's not quite the way the Newton plugin handles it as that uses memblocks, but it's relatively close.

Aldur
17
Years of Service
User Offline
Joined: 8th Oct 2007
Location: Melbourne, Australia
Posted: 20th Dec 2009 09:43
Just got to say, this is amazing.
Good work Xarshi.

Any ideas on when a DGDK version may appear? I would love to play around with this, as I tried both your and n3wton's demos and they were awesome.

Keep up the good work mate! This will undoubtedly be a huge contribution to the DBP/DGDK community.
Melancholic
14
Years of Service
User Offline
Joined: 26th Nov 2009
Location:
Posted: 20th Dec 2009 10:05
Quote: "That being said, I'd highly appreciate if you did not extract the plugin. Or use it in general until I release it. It makes me very uncomfortable. This isn't directed toward anyone."


Okay no problem, just make sure to get a release out soon then
Danny M
14
Years of Service
User Offline
Joined: 19th Dec 2009
Location:
Posted: 20th Dec 2009 10:51
Yeah this is looking like a great wrapper, I look forward to the final release.
Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 20th Dec 2009 17:21
Quote: "Any ideas on when a DGDK version may appear? I would love to play around with this, as I tried both your and n3wton's demos and they were awesome."

I'm not entirely sure, but I was going to use the GDK for a game I plan on making with this. So it will definitely happen, no doubt in my mind. I'll try to get it going now whilst I restructure the DBP version. That way they'll be up to date with each other.

And thanks for your kind words, everyone.

Melancholic - Yeah, I'll get it out as soon as I can. I'd rather not rush and have parts missing though

Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 20th Dec 2009 18:27
DGDK version

just

AWESOME! CANT WAIT =]

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 20th Dec 2009 18:28
I think the main reason why it slows down is that it is drawing 10000 boxes. You would expect similar FPS even if your dll wasnt even running.

Try making a demo which doesnt draw any boxes, I know it would look pretty boring but lets just see how much it can handle without any other overheads.

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 20th Dec 2009 19:40 Edited at: 20th Dec 2009 20:12
Quote: "I think the main reason why it slows down is that it is drawing 10000 boxes. You would expect similar FPS even if your dll wasnt even running.

Try making a demo which doesnt draw any boxes, I know it would look pretty boring but lets just see how much it can handle without any other overheads."

That is actually it. 10,000 boxes is going to slow it down because of the number of triangles being drawn.

There are now three types of simulations in the plugin. Discrete, Continuous, and Multithreaded. Just thought I'd let you all know. Before, you were using a continuous simulation type. I haven't added any demo with multithreaded physics up, but those will come along soon enough.

Quote: "DGDK version

just

AWESOME! CANT WAIT =]"

I think the DGDK version is going to be object oriented. I mean, I could make it just like the dbp version if you dgdk guys wanted it like that though. I just feel as if if you have a better programming language you should make use of its features.

thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 21st Dec 2009 01:02
n3wton's demo with grass.

Attachments

Login to view attachments
CSGames94
16
Years of Service
User Offline
Joined: 27th Dec 2007
Location:
Posted: 22nd Dec 2009 04:11
Will it be possible to make a wrapper for this rendering engine?
http://sunflow.sourceforge.net/index.php?pg=feat
Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 22nd Dec 2009 04:38
Quote: "Will it be possible to make a wrapper for this rendering engine? "

I wish. There are a couple problems with that, however. First off, it's Java. Second off, it is a ray tracing system not meant for real time rendering (or perhaps realtime, I'm not sure).

Right now I'm just adding on to the plugin and going to work on graphics at a later date. I'm going to be tackling one project at a time.

Danny M
14
Years of Service
User Offline
Joined: 19th Dec 2009
Location:
Posted: 22nd Dec 2009 11:49
This is turning out to be a great! Really looking forward to the final release as from reading about DarkPhysX it seems really buggy and unfinished. That and I can't justify having to buy an extra plugin just to enable physics in a game engine. That business concept died years ago...
Grasmann
16
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 22nd Dec 2009 21:46 Edited at: 22nd Dec 2009 22:06
The Demos are good. Looks interesting.

Mh ... What about Ragdolls? Will they be easy to create? Like you
take an object no matter what animation frame and it reads everything from the bones of the object? So you just have to set
the size of the ragdoll bones ... that would be awsome.

Right now in the moment Im trying to get those damn ragdolls from
newton working. Has anybody of you guys made that and can explain
it to me? Or has anybody some functions with a simple routine to get that done correctly?

I could give you the model you need ... thats no problem. I just
have to rename the bones.
Melancholic
14
Years of Service
User Offline
Joined: 26th Nov 2009
Location:
Posted: 23rd Dec 2009 13:28
hey Xarshi, any more info?, any updates?. Id quite like to use this in my NaGaCreMo entry but im just concerned about it being read in time, and newton hates me and crashes, well evreything . it looks so awsome i cant wait!
Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 23rd Dec 2009 18:34
Quote: "hey Xarshi, any more info?, any updates?. Id quite like to use this in my NaGaCreMo entry but im just concerned about it being read in time, and newton hates me and crashes, well evreything . it looks so awsome i cant wait! "

Unfortunately I've been lazy lately. I'm going to get back to work in full force today, however. I'll try to make some release in a very short amount of time.

Quote: "What about Ragdolls? Will they be easy to create?"

They will be easy to make. They should be, at least. Assuming you can get all the vertices attached to a bone. Which I think you can. I'm not sure though. Even if you can't I'll try to find some way to make this easy.

Melancholic
14
Years of Service
User Offline
Joined: 26th Nov 2009
Location:
Posted: 23rd Dec 2009 19:35
Quote: "however. I'll try to make some release in a very short amount of time."


Good to hear
Grasmann
16
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 23rd Dec 2009 20:32
Will that release already include Ragdolls? ^^" I doesnt really
matter since I will probably use it. Or at least test it.

btw. If I wanted to use newton joints to build up some own Ragdoll
system ... which joints would you guys prefer?

I´d like to make some own Ragdoll system.
CSGames94
16
Years of Service
User Offline
Joined: 27th Dec 2007
Location:
Posted: 25th Dec 2009 01:30
One more thing, will your ragdolls be able to do this? : http://www.youtube.com/watch?v=_yGJPoTnK6c

http://csgm.webs.com/apps/photos/photo?photoid=63340546
Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 25th Dec 2009 07:22
Quote: "One more thing, will your ragdolls be able to do this? "

Should be possible. You can animate ragdolls with Havok. I'll have to experiment with them when the time comes though. Actually, I know it's possible, I just need to think of a way to make it easy for everyone.

CSGames94
16
Years of Service
User Offline
Joined: 27th Dec 2007
Location:
Posted: 26th Dec 2009 05:49
Quote: "Should be possible. You can animate ragdolls with Havok. I'll have to experiment with them when the time comes though. Actually, I know it's possible, I just need to think of a way to make it easy for everyone."


Excellent, that's is just GREAT! Now It will be possible for me to make a football game. Good luck on your Havok Wrapper!

http://csgm.webs.com/apps/photos/photo?photoid=63340546
jasonhtml
20
Years of Service
User Offline
Joined: 20th Mar 2004
Location: OC, California, USA
Posted: 26th Dec 2009 07:37
I'm very interesting in the ragdoll portion of the Havok wrapper. I'll be watching this thread

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 26th Dec 2009 19:34
Quote: "[root question]
Will we be able to make our own vehicle settings apart from these presets you are creating?"

Sorry KISTech, must have missed that question. Yes, you will be able to make your own vehicle settings aside from these presets. The only reason I supply these presets is because the code will undoubtedly be hellishly long for creating vehicles from scratch. I may add an option to serialize them as well.

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 26th Dec 2009 22:03
Cool. Thanks.

jeffhuys
18
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 26th Dec 2009 23:29
Xarshi,
YEAH
THANKS
[/happyness]
This is what I've wanted for SO long!

You're the 'th to view this signature!
Melancholic
14
Years of Service
User Offline
Joined: 26th Nov 2009
Location:
Posted: 27th Dec 2009 12:35
Hey Xarshi, i was jsut lookign through the list of commands on the front page and saw Charecter Controller commands. What are thease commands used for(Not the obvious and what will they work like?
Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 27th Dec 2009 18:20 Edited at: 27th Dec 2009 18:21
Quote: "Hey Xarshi, i was jsut lookign through the list of commands on the front page and saw Charecter Controller commands. What are thease commands used for(Not the obvious and what will they work like? "

I'm not quite sure I get what you are asking. Just a quick explanation of what they do collectively - lets say you want your character to move like, oh, I don't know, Halo's main character master chief. Well, he uses the exact same character controller as in this, so you could easily achieve that.

So a character controller is just a representation of your character in a dynamic 3d environment. You can jump on rigid bodies, climb ladders (commands supplied to make anything a ladder), and push rigid bodies (you can set the strength of the character controller). I am basically just supplying easy methods to make use of character commands. But let's take a test I had done for myself that made use of a character controller in a Halo level (bloodgulch, and yes, I like halo a lot. That's the only reason why the anti-grav vehicle command set exists in this plugin...) This is just the code for creating the character:


Now for starters, we have the xeno make character controller function. The first parameter is the ID of the character, the second parameter is the height of the character, the second is the radius, the third is the crouch height, the fourth is the maximum move speed (10 here, so obviously fast, but fps games tend to not be realistic), the fifth is the jump height (two meters again), and then the sixth is the strength (so the character has a strength of 150).

The next line is just to position the character controller at a certain position.

Now we have, in the main loop, the movement. For prerequisites, lets just say we have yAngle and xAngle defined as floats before the program enters the main loop. This is a first person example, btw. Anyways, now we have the main loop (or a portion of it)


Ok, obviously this is a bit more code, but it's pretty straight forward. We update XenoPhysics, then we check if the user presses any keys. If he or she presses w, then the character controller will move forward at the defined maximum speed (this is going to change so you can input a value from 0 to 1, where that is the percentage of the maximum speed). You continue doing similar commands for wsad.

Now we get to check if the user presses the space key. If he or she does, then tell the character controller to jump. Note that the character cannot jump in the air, so it is checked internally. If enough people desire it, I may add in support for an arbitrary number of jumps.

Anyways, now we have check for the control key. If the user presses this, the character will crouch. If the character crouches in mid air, the "legs" are brought up and the head position is unaffected. If the character crouches whilst on the ground, the head goes down. So if you jump, and then crouch in air, and land, you will still be crouched. Then, when you "stand up", or let go of control, your character will then extend his torso up. Basically I covered all that stuff for you.

Now after all that we just get the characters x and z positions and then its head height. I'll have a command so that the programmer can specify, in local coordinates, where the head is and then return that x y and z position.

Now after all of that, we update the yAngle and xAngle variables for mouse look, and then rotate the character with the yAngle. This will then rotate the character, making move forward move forward in its rotated coordinates. This is then converted to radians then put into an empty vector which is converted into a quaternion (as Havok handles rotations in quaternions).

That should explain what the character controller does. It handles your character movement, basically. You can also disable and enable characters (removing them from the world) just in case, for instance, you want to have vehicles and you wouldn't want a ghost character lingering in one place.

kordman916
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location:
Posted: 28th Dec 2009 01:34
All I can say is wow this shall be a great achievement in DBPro's history if this project is completed. Nice work.


Dell Optiplex GX280,3.4 GHZ Pentium 4 processor
1 Gig DDR2 ram,Geforce 8500 GT 512mb
Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 28th Dec 2009 04:44
Quote: "if this project is completed"

Heh, it will be finished. The restructuring on my end is over, and I have characters, rigid bodies, and vehicles nearly finished. I just have to add in constraints and triggers really, and then it's just extra stuff.

Also to everyone, I am completely set on making a vehicle designer that will save vehicles out into a file. This designer will let you design and test your vehicles right in the editor, with keyboard and xbox 360 controller support (I think there is already a 360 gamepad library, but I feel like making my own as it's only an hour project at most).

What I may end up doing is creating an editor that will let you edit constraints, vehicles, characters, and rigid bodies. Or just an all around editor for physics. It would be easy enough, so I think I'll do that. This would be open source as well most likely.

Melancholic
14
Years of Service
User Offline
Joined: 26th Nov 2009
Location:
Posted: 28th Dec 2009 10:47
Xarshi, once again, i am simply amazed by this!. The charecter controller command's will be brilliant i just know it!. This will probably be one of the best DBpro plugins ever!. Any news on a release date?, i simply cant wait!
Syncaidius
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: United Kingdom
Posted: 28th Dec 2009 21:19
Maybe you could release the plugin first before working on the editors?

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 28th Dec 2009 21:24
Quote: "Maybe you could release the plugin first before working on the editors? "

That was the plan. That's why I'm making all the presets now, so people can have vehicles to use. Plus you can still edit presets.

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 28th Dec 2009 23:27
Quote: "Xarshi, once again, i am simply amazed by this!. The charecter controller command's will be brilliant i just know it!. This will probably be one of the best DBpro plugins ever!. Any news on a release date?, i simply cant wait! "

I'm not sure when it will be released. I'll try to make it as soon as possible.

jeffhuys
18
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 29th Dec 2009 12:16
Xarshi, this is very cool. Are constraints implemented yet? Like welding two things or having a ball socket?

You're the 'th to view this signature!
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 29th Dec 2009 13:18
DarkGDK VERSION! DarkGDK VERSION!

Syncaidius
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: United Kingdom
Posted: 29th Dec 2009 15:50
Quote: "That was the plan. That's why I'm making all the presets now, so people can have vehicles to use. Plus you can still edit presets."


Nice

CSGames94
16
Years of Service
User Offline
Joined: 27th Dec 2007
Location:
Posted: 29th Dec 2009 18:50 Edited at: 29th Dec 2009 18:53
Quote: "Xarshi, once again, i am simply amazed by this!. The charecter controller command's will be brilliant i just know it!. This will probably be one of the best DBpro plugins ever!. Any news on a release date?, i simply cant wait!"


Looking forward for the release of this too! I just wished that Dark Physics could be better because I got Nvidia Graphics cards to take advantage of the PhysX Engine. But, this Havok Wrapper is going to be great!

The Pokemon Engine
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 29th Dec 2009 19:55
Really looking forward to trying this out, on a project right now that needs ragdolls and good vehicle support - so those tech demos fill me with hope .

I'd be happy to pay for such good vehicle support.


Health, Ammo, and bacon and eggs!
Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 29th Dec 2009 22:44
Quote: "Xarshi, this is very cool. Are constraints implemented yet? Like welding two things or having a ball socket?"

They are next on my list. They are used internally at the moment, but there are no commands to mess with them. Havok has some wonderful constraints that you can make use of, so don't expect to be let down in this area!

Quote: "DarkGDK VERSION! DarkGDK VERSION!"

Haha, soon enough. I plan on making a game with this in DGDK before I make a game with it in dbp if I even do.

Quote: "
Looking forward for the release of this too! I just wished that Dark Physics could be better because I got Nvidia Graphics cards to take advantage of the PhysX Engine. But, this Havok Wrapper is going to be great! "

That's what I felt like when it first came out. I was expecting so much more. However, that wasn't TGCs fault. The character control in that physics engine is very disappointing, and the vehicles are disappointing as well. Havok feels right at home to me, so I'm determined to make it work well for everyone else.

Quote: "Really looking forward to trying this out, on a project right now that needs ragdolls and good vehicle support - so those tech demos fill me with hope .

I'd be happy to pay for such good vehicle support."

Thanks. I think you may find it even better that it will be free and open source then. The ragdolls should be simple, but at worst they'll be the standard approach that you see in most dbp physics engines. I'd like to try my best to not make this a standard physics plugin for dbp.

Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 30th Dec 2009 02:03
Dear Xarshi,
Functional Character Controller + Ragdoll Physics + DarkGDK = Epic Win. It would be so awesome if you could pull that off.

At the moment, trying to make use of DarkGDK's character controller is like hell, and it's attempt at ragdoll physics are pathetic. Your wrapper will have a lot of people switching over to Havok physics.

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 30th Dec 2009 03:04
Quote: "Functional Character Controller + Ragdoll Physics + DarkGDK = Epic Win"

Well the character down, and implementing this with DarkGDK won't be at all difficult. Ragdolls will be doable.

Let's just hope everything goes smoothly and I have enough time to work on this at a high speed.

Daniel wright 2311
User Banned
Posted: 30th Dec 2009 03:09
I want this now, I said now darn it,lol, just kidding. I cant wait

Syncaidius
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: United Kingdom
Posted: 30th Dec 2009 13:24 Edited at: 30th Dec 2009 13:25
Quote: "At the moment, trying to make use of DarkGDK's character controller is like hell, and it's attempt at ragdoll physics are pathetic. Your wrapper will have a lot of people switching over to Havok physics."


Life isn't so much different in the realm of DarkBASIC Pro either.

The character controller from DarkPhysics is lame at its best.

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 30th Dec 2009 18:16 Edited at: 30th Dec 2009 18:17
XenoPhysics + BlitzTerrain + (DBPro OR DarkGDK) = EPIC WIN!!!



Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 30th Dec 2009 19:37
I meant to write DarkPhysic's character controller, not DarkGDK's

Melancholic
14
Years of Service
User Offline
Joined: 26th Nov 2009
Location:
Posted: 31st Dec 2009 12:14
Hey Xarshi, im about to start work on my NaGaCreMo entry and i really need this dll. I was wondering if i could get your permission to extract it?, i know it will be buggy, and i wont be recieving any help, plus my program may crash. But this is a truley great product. And not to forget, please
Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 31st Dec 2009 19:15 Edited at: 31st Dec 2009 19:18
What is your email, Melancholic?

Also judging from your game (cartoon platformer) you will probably only need what I have already implemented. At least for a while. So you should be able to use it to its fullest extent I think.

Login to post a reply

Server time is: 2024-11-24 19:23:30
Your offset time is: 2024-11-24 19:23:30