WIP / XenoPhysics - A Havok Wrapper for DarkBasic Professional |
| Author | Message | ||
|
Xarshi
User ![]() Joined: Sun Dec 25th 2005 Location: Ohio |
Well, I've wanted to do this for a bit, but just about eleven days ago I decided to begin working on it. The actual programming started probably about nine days ago or so. Anyways, without further ado... XenoPhysics This is a plugin aimed at programmers who wish to have professional control over the dynamics within their games. This plugin utilizes Havok Physics and Havok Animation, two extremely high quality dynamics libraries. Havok supports outstanding rigid body physics, as well as amazing Character control and vehicle simulation. If you have ever played: Half-Life 2, Counter-Strike: Source, Team Fortress 2, Portal, Left 4 Dead, Left 4 Dead 2, Halo 2, Halo 3, Halo 3: ODST, Dead Rising, BioShock, Condemned 2, Dead Space, Fallout 3, The Elder Scrolls IV: Oblivion, Far Cry 2 then you have definitely used Havok. As of right now I have implemented 96 commands within XenoPhysics. These include commands for rigid bodies, character controllers, and vehicles. Some features I wish to highlight: Character Controllers Very high quality Ability to move objects (but not infinitely strong) Integrated ability to move forward, backward, left, and right. Integrated ability to jump. Integrated ability to crouch. Integrated ability to climb ladders (ladders can be any rigid body that you call the "xeno set rigid body as ladder" command on) Vehicles Amazing amounts of variables to be set - optional. You can set data about the vehicles engine, it's transmission, it's aerodynamics, it's steering, each individual wheel (you can have an arbitrary amount of wheels also. You can have as many axles as you want as well and apply wheels to each axle) Integrated vehicle camera command set - simply call "xeno make camera" and then position and point your camera with the following commands: + Code Snippet This allows for seamless vehicle integration into DarkBasic Professional. Gone are the days where it takes you lines upon lines of code to create vehicles. You can do that with just one line now, with the preset vehicles I am including. Simple command set for controlling vehicles: + Code Snippet Presets for vehicles will include (will most likely expand): Four wheeled vehicle Six wheeled vehicle Motorcycle Tank This plugin will allow you to finally achieve the professional quality physics you see in games today. Ever wanted a game to control like Halo? Well now it's feasible with my plugin. You no longer have to mess with intricate forces to move your player correctly, or deal with your character being simply incapable of certain tasks. For now that is all I have implemented. This is a complete list of commands within my plugin at the moment: + Code Snippet Those are all the commands for now. Assuming I didn't forget anything, if you have questions let me know. For now, I'll leave you with a very very basic demo I wrote in about two minutes as well as its source code so you can see what a program written with this plugin looks like. You need the latest DirectX redistributable installed (august I think) Please note - the demo is not supposed to be flashy. At all. It is graphically dull, in fact. The beauty lies within the physics. If there are problems with the demo let me know. Controls: + Code Snippet Code: + Code Snippet Looking forward to any responses! (I wish there was a preview post option...) XenoPhysics - A Havok Wrapper for DarkBasic Pro. In progress. |
||
| Back to top |
|||
|
Zotoaster
User ![]() Joined: Mon Dec 20th 2004 Location: Scotland |
I get an error because it can't find the DLL. Also, for some reason, it can't seem to find d3dx9_42.dll, lol "everyone forgets a semi-colon sometimes." - Phaelax |
||
| Back to top |
|||
|
Xarshi
User ![]() Joined: Sun Dec 25th 2005 Location: Ohio |
Quote: "I get an error because it can't find the DLL. Also, for some reason, it can't seem to find d3dx9_42.dll, lol"
Quote: "You need the latest DirectX redistributable installed (august I think)"
XenoPhysics - A Havok Wrapper for DarkBasic Pro. In progress. |
||
| Back to top |
|||
|
tiresius
User Joined: Wed Nov 13th 2002 Location: MA USA |
Sounds cool looking forward to seeing some demos of this. Is there a license for Havok? Has it been made free recently? I'm not a real programmer but I play one with DBPro! |
||
| Back to top |
|||
|
Xarshi
User ![]() Joined: Sun Dec 25th 2005 Location: Ohio |
Quote: "Sounds cool looking forward to seeing some demos of this. Is there a license for Havok? Has it been made free recently?"
Thanks. Without contacting Havok at all you can sell a game for up to $10. If you contact them you can request a free license to sell a game for as much as you'd like.XenoPhysics - A Havok Wrapper for DarkBasic Pro. In progress. |
||
| Back to top |
|||
|
Virtual Nomad
User ![]() Joined: Wed Dec 14th 2005 Location: SF Bay Area, USA |
the simple demo works fine here tho a little too simple to show much functionality but plenty of potential @zoto: i had to dl the dx DLL, too (on vista here). after i dropped it in the demo folder, it ran fine (and the (separate) missingle DLL error went away, too)). @tiresius: from what i read, it's free. if your commercial product sells for over $10, logo and credits need to be included, otherwise, completely free. @xarshi, keep up the good work! Virtual Nomad @ California, USA AMD Phenom™ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit |
||
| Back to top |
|||
|
Xarshi
User ![]() Joined: Sun Dec 25th 2005 Location: Ohio |
Quote: "the simple demo works fine here tho a little too simple to show much functionality but plenty of potential
Heh, I figured simple was better than nothing " Quote: "@zoto: i had to dl the dx DLL, too (on vista here). after i dropped it in the demo folder, it ran fine (and the (separate) missingle DLL error went away, too))."
It gave the missing dll error because the plugin depends on the d3dx9_49.dll, and if you don't have it, that means that the plugin won't load. At least, that's my theory.Tomorrow I'll be adding in at least two vehicle presets, one of which will be the motorcycle. After I have more vehicle presets I am going to work on ragdoll integration. Edit I'm actually considering condensing the camera commands. Instead of xeno make camera I'm just going to have a xeno control camera cameraID, rigidBodyID then xeno enable camera control ID and xeno disable camera control ID. Instead of having to position the camera explicitly, my plugin will handle that. XenoPhysics - A Havok Wrapper for DarkBasic Pro. In progress. |
||
| Back to top |
|||
|
marlou
User Joined: Sat Jan 17th 2009 Location: sa upuan ko dito |
Any chance of this having a DarkGDK version?Id like to see this one in DarkGDK. Nice work by the way. When a person has nothing but a dream, can he dare to dream. |
||
| Back to top |
|||
|
Xarshi
User ![]() Joined: Sun Dec 25th 2005 Location: Ohio |
Quote: "Any chance of this having a DarkGDK version?Id like to see this one in DarkGDK. Nice work by the way."
Sure. I don't see why not. My primary focus will be DBP but I can easily make it available in DarkGDK. So yeah, you guys won't be left out.Edit By the way, in case anyone is wondering, with presets, the wheels will be placed according to the size of the vehicle. The wheels are not in one predetermined place. The presets just make everything easier, but don't take away the ability to configure the vehicle. The code up there for the current demo is now dated as you will have to at least call two commands to create a vehicle: + Code Snippet Once you create a preset vehicle, you will be able to configure the vehicle with commands like: + Code Snippet Of course, that's only five out of the 62 commands for configuring your vehicle. That's right, sixty two commands you can use for configuring your vehicle. I'm also considering adding in special vehicle types, like hovering vehicles (ghost type vehicle anyone?) Those are just a few ideas right now. I'm also going to add in flying vehicle support soon enough. Edit 2 Just as an fyi, the vehicles perform more accurately when their mass is up to a realistic amount. In the demo the vehicles mass was only about 10kg I think. If you set the vehicles mass up to 750kg, you get much more realistic results. I also found you can power slide with the hand brake when the mass is up. So I've been preoccupied zooming around... hah. XenoPhysics - A Havok Wrapper for DarkBasic Pro. In progress. |
||
| Back to top |
|||
|
Xarshi
User ![]() Joined: Sun Dec 25th 2005 Location: Ohio |
Alright, I updated the demo in the first post. It now has a very light vehicle (10kg) and a very heavy vehicle (750kg). The vehicle now reacts much more realistically. If you get a bit of speed and turn whilst using the hand brake (space) you will power slide. The vehicle no longer jerks forward so violently since it is now trying to actually move something as opposed to 10kg. Hopefully you'll get a better idea of how this plugin will handle with vehicles now Edit And no, that small weak vehicle in front of you is not a motorcycle. That is simply a small four wheeled vehicle (I know I know, you can't see the wheels. I promise you will soon, though). XenoPhysics - A Havok Wrapper for DarkBasic Pro. In progress. |
||
| Back to top |
|||
|
Hassan
User Joined: Mon May 4th 2009 Location: Iraq |
Quote: "Sure. I don't see why not. My primary focus will be DBP but I can easily make it available in DarkGDK. So yeah, you guys won't be left out." Nice =) ![]() |
||
| Back to top |
|||
|
Syncaidius
User ![]() Joined: Tue Mar 22nd 2005 Location: United Kingdom |
You sir, are awesome. Been waiting for some kind of Havok physics wrapper for DBP for years now. |
||
| Back to top |
|||
|
KISTech
User ![]() Joined: Fri Feb 8th 2008 Location: Portland, Oregon |
|
||
| Back to top |
|||
|
Xarshi
User ![]() Joined: Sun Dec 25th 2005 Location: Ohio |
Quote: "Don't forget GDK.Net. It could use a boost in the physics department."
Doesn't GDK.net cost money? If so, I'm not sure how I'd be able to.A little update, I have three preset vehicles in right now. Their commands are: + Code Snippet If you don't modify any data, the two wheeled controls like a motorcycle, the four wheeled vehicle controls like the one in the demo (just a car), and the six wheeled vehicle controls like a three ton armored monster. It'd be useful for very heavy vehicles. Note that you can modify these presets via commands since these will be part of the vehicle data command set. So I guess you'll be able to reset the number of wheels and completely modify them, but in that case you're better off starting from scratch. Also, I'm considering just making a vehicle editor application to be released with this, complete with a testbed so you can rapidly prototype them. I'm not sure yet, though. Edit Another thing that I remembered - I'm going to be modifying the structure of the vehicle commands a little. I'm going to be adding in flying vehicles and vehicles that hover (think halo 2's ghost/wraith/specter) They will all, however, have the camera commands able to be used on them so you won't have to mess with any camera stuff. Which is actually really nice, as it works great and you can get it done. Oh, you can also modify the cameras. Aka - their position, their position when at low speed, their position when at high speed, their following distance, their speed at which they zoom up to the vehicle, and so on. They are really quite nifty. XenoPhysics - A Havok Wrapper for DarkBasic Pro. In progress. |
||
| Back to top |
|||
|
KISTech
User ![]() Joined: Fri Feb 8th 2008 Location: Portland, Oregon |
Quote: "Doesn't GDK.net cost money? If so, I'm not sure how I'd be able to."
Not sure how that would all work, but I bet someone who does know would be willing to chime in. GDK.Net is kind of like the misfit of the family, and doesn't seem to get much attention yet. Projects like this could really help give it a much needed boost. Will you be charging anything for this at some point? I know I'd pay a bit based on what I've seen so far. This combined with BlitzTerrain? I'm salivating just thinking about it. |
||
| Back to top |
|||
|
Xarshi
User ![]() Joined: Sun Dec 25th 2005 Location: Ohio |
Quote: "This combined with BlitzTerrain? I'm salivating just thinking about it.
Did I say anything about that yet?" Kaedroho and I are working on implementing BlitzTerrain into this so you can do that. It'll be just like any other rigid body command except it will be "xeno make rigid body static terrain" and then you can either go with just that, or specify the sectors and LOD level. Edit As for selling, I'm not sure. I may or may not, but I don't actually know if the Havok license permits me to do so. Plus I wanted to attempt to revive the Blackout project and use this for character control, then the plugin I'll be working on next (wrapper for RakNet (Unreal Tournament 3 uses this)) for networking. XenoPhysics - A Havok Wrapper for DarkBasic Pro. In progress. |
||
| Back to top |
|||
|
kaedroho
User Joined: Tue Aug 21st 2007 Location: Oxford,UK |
Unlike terrain engines such as Advanced terrain, If you use BlitzTerrain with XenoPhysics you don't need to create any objects for physics. XenoPhysics accesses the BlitzTerrain internal structures and calculates collision from them without needing to create an object. Huge RAM and FPS saver. PS: How did you find out about this? I haven't said anything about it either. |
||
| Back to top |
|||
|
Xarshi
User ![]() Joined: Sun Dec 25th 2005 Location: Ohio |
Alright I have a new very small demo showing the motorcycle. The rotations of the chassis are a little abrupt at the moment, but bear with me, it'll be smooth by release. Anyways, I started you pretty close to the ramp. If you go back and get more speed, you get more height obviously. It's actually quite fun. You can also see the suspension in action here a little more than the previous demos (you actually see the results of the springs on the vehicle working! haha) Anyways, this demo is JUST the motorcycle. Keys are: + Code Snippet This vehicle was created using this code: + Code Snippet Note - as with before, you need the latest DirectX redistributable. You can download the required dll here XenoPhysics - A Havok Wrapper for DarkBasic Pro. In progress. |
||
| Back to top |
|||
|
Virtual Nomad
User ![]() Joined: Wed Dec 14th 2005 Location: SF Bay Area, USA |
the motorcycle demo is fun also, i dont think kistech knew this was gonna combine w/ blitzterrain, just hoped. and, he's not alone Virtual Nomad @ California, USA AMD Phenom™ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit |
||
| Back to top |
|||
|
thenerd
User Joined: Mon Mar 9th 2009 Location: USA |
|
||
| Back to top |
|||
|
Google Ad
AdBot Joined: Aug 26th 2002 Location: Everywhere |
|||
| Back to top |
|||
|
Xarshi
User ![]() Joined: Sun Dec 25th 2005 Location: Ohio |
Quote: "i just wish there was a reset button for when the cycle ends up on it's side so i didn't have to restart the app."
I was thinking that I should have implemented that before posting the demo, haha. I'll get a command up. I think "xeno vehicle reorient ID" will do just fine. I'll soon have more stuff to show.Edit Quote: "combine w/ blitzterrain"
It's not going to combine with it, they can just utilize each other. So it's more so a collaboration than a merging.XenoPhysics - A Havok Wrapper for DarkBasic Pro. In progress. |
||
| Back to top |
|||
|
KISTech
User ![]() Joined: Fri Feb 8th 2008 Location: Portland, Oregon |
Quote: "PS: How did you find out about this? I haven't said anything about it either."
No one let it slip, I just started drooling over the prospect of an outstanding terrain engine, combined with such an outstanding physics engine. The numerous game ideas started to flood in at an astonishing speed.. Now that the cat's out of the bag... WOOOOHOOOO!!!!!! BRING IT ON!!!!!! [edit] Tried the demo. LOVED it. Fell through the ground after landing a big jump. Other than that, no problems really spotted. |
||
| Back to top |
|||
|
Xarshi
User ![]() Joined: Sun Dec 25th 2005 Location: Ohio |
Quote: "Fell through the ground after landing a big jump. Other than that, no problems really spotted."
First time I heard that one O.o I'm kinda curious as to why it would do that...Anyways, I'm adding in commands to get wheel positions and rotations now. So you'll be able to just position your wheels easily. XenoPhysics - A Havok Wrapper for DarkBasic Pro. In progress. |
||
| Back to top |
|||
|
KISTech
User ![]() Joined: Fri Feb 8th 2008 Location: Portland, Oregon |
Quote: "First time I heard that one O.o I'm kinda curious as to why it would do that..."
For what it's worth, I turned around and went all the way to the edge of the terrain to start my run at the ramp. Try it a couple of times and you might be able to duplicate it. It could just be I landed on an edge and it slipped through or something. Not sure. |
||
| Back to top |
|||
|
Xarshi
User ![]() Joined: Sun Dec 25th 2005 Location: Ohio |
Quote: "Try it a couple of times and you might be able to duplicate it."
I haven't been able to. When I do it mine just flips over, reminding me I have to make a reorient command.Quick Update You can now get wheel positions and rotations by calling these commands: + Code Snippet Wheels update to show the suspension in use. You can see the wheels going up or down depending on what you did. For instance, in the demo above, when I implemented these commands the motorcycles wheels would go up on impact after landing. XenoPhysics - A Havok Wrapper for DarkBasic Pro. In progress. |
||
| Back to top |
|||
|
KISTech
User ![]() Joined: Fri Feb 8th 2008 Location: Portland, Oregon |
|
||
| Back to top |
|||
|
Randomness 128
User ![]() Joined: Tue Feb 13th 2007 Location: Cyberspace |
This plug-in looks really nice. Any chance it'll support multithreading? |
||
| Back to top |
|||
|
Xarshi
User ![]() Joined: Sun Dec 25th 2005 Location: Ohio |
Quote: "This plug-in looks really nice. Any chance it'll support multithreading? "
Already does |
||
| Back to top |
|||
|
blobby 101
User Joined: Sat Jun 17th 2006 Location: England, UK |
brilliant! Any time frame in mind? Or a demo/pre release? I just really can't wait to try this out and it its into my current project perfectly xD Your signature has been erased by a mod because it's larger than 600x120 |
||
| Back to top |
|||
|
KISTech
User ![]() Joined: Fri Feb 8th 2008 Location: Portland, Oregon |
|
||
| Back to top |
|||
|
Xarshi
User ![]() Joined: Sun Dec 25th 2005 Location: Ohio |
Quote: "brilliant! Any time frame in mind? Or a demo/pre release? I just really can't wait to try this out and it its into my current project perfectly xD"
I don't want to give any solid release dates, but it should be available (an early version) relatively soon. I only have to get constraints and triggers implemented, then I can release a basic version. Ragdolls will be after those and in a second release as I plan on spending quite a bit of time on that (and require a rigged model to try out the ragdolls on...). But as is, I'm going to see if I can't get ragdolls integrated with a single command. I think it is possible, but who knows. I'll have an entire command set for them either way. Then I'll also have a command set for animation commands (animated ragdolls anyone?) |
||
| Back to top |
|||
|
Master13
User Joined: Thu Dec 27th 2007 Location: Cyberspace |
Looks great! I've also been struggling trying to get dark physics to destruction and I like Havok's Destruction. |
||
| Back to top |
|||
|
KISTech
User ![]() Joined: Fri Feb 8th 2008 Location: Portland, Oregon |
Quote: "Then I'll also have a command set for animation commands (animated ragdolls anyone?"
Would this possibly lead to a situation where you could create any model (as long as the bones and such are all named the same) and apply a set of standard animation to them? It would be so nice to use motion capture files on animated ragdolls. Make your character with all the right bone names, and just drop it in. |
||
| Back to top |
|||
|
Xarshi
User ![]() Joined: Sun Dec 25th 2005 Location: Ohio |
Quote: "Would this possibly lead to a situation where you could create any model (as long as the bones and such are all named the same) and apply a set of standard animation to them?"
Yes.Havok Animation provides many great tools for animations and ragdolls. I'm going to see if I can't just extract animations out of objects from DBP so you won't even have to use the Havok exporter for 3ds max/xsi/maya. I'm sure it's possible, so I'm not too worried about that. Quick Update
I'm going to add in a few commands for mesh simplification. You'll be able to specify a simplification percentage to the plugin and it will simplify your meshes to optimize in game performance. Please note this doesn't affect your visual model, only Havok's representation of it. |
||
| Back to top |
|||
|
N3wton
User ![]() Joined: Wed Jun 3rd 2009 Location: Cyberspace |
Dude you are a legend, I was just going to start work on a havok wrapper, but now I don't have to Keep up the awsome work Yours N3wton ![]() |
||
| Back to top |
|||
|
Airslide
User ![]() Joined: Mon Oct 18th 2004 Location: Cyberspace |
|
||
| Back to top |
|||
|
Xarshi
User ![]() Joined: Sun Dec 25th 2005 Location: Ohio |
Quote: "Newton physics feels too complicated, and DarkPhysics feels broken. Might this fill the gap? "
Well, it's as easy as Dark Physics if not more so. It also supplies you with state of the art physics technology. So I don't know, I think it might fit your criteria for filling in the gap n_n |
||
| Back to top |
|||
|
N3wton
User ![]() Joined: Wed Jun 3rd 2009 Location: Cyberspace |
Also with darkphysics you have to install the physx drivers ( around 30mb ) which is annoying if you want to distribute a game, and as you say newton is just to complicated and you also have to include the newton.dll along side your project (which isn't to bad) with this physics wrapper will we need to include and large driver packages or extra dll's with our project? I've tried the demo and it worked fine, but I have all the havok libs ect installed on my pc from when I was using it with Irrlich. Yours N3wton ![]() |
||
| Back to top |
|||
|
Syncaidius
User ![]() Joined: Tue Mar 22nd 2005 Location: United Kingdom |
Quote: "Newton physics feels too complicated, and DarkPhysics feels broken. Might this fill the gap? "
Exactly what I thought too. Quote: "I've tried the demo and it worked fine, but I have all the havok libs ect installed on my pc from when I was using it with Irrlich."
I've just tried it on my laptop which doesn't have any games or Havok sdk's installed and the demo ran fine for me. Guess no extra files are needed. |
||
| Back to top |
|||
|
N3wton
User ![]() Joined: Wed Jun 3rd 2009 Location: Cyberspace |
NICE! Thanks for letting me know So lets get this dll released Yours N3wton ![]() |
||
| Back to top |
|||
This is a multi-page thread older than 30 days.
Go to the last page to check if you can reply to it.
Go to the last page to check if you can reply to it.
Forum Search
Enter a word or phrase to search our Forum for:
|
|












forever loading...




