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
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 19th Apr 2010 16:16
Quote: "I might explode with excitement!"

I just did... someone else can clean up the mess

Is it worth waiting for at least SP1 though (Vista style)? I'd hate to start another WIP I'm never going to finish...

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 19th Apr 2010 23:33
Alrighty guys, I'll be (hopefully) posting something tonight.

As of right now I have to upgrade the project to visual studio 2010 (going to take two minutes or something...) and then actually test a project and release. So no worries!

jeffhuys
17
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 19th Apr 2010 23:45
Awesome Xarshi! I'm looking forward to it!

thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 19th Apr 2010 23:50 Edited at: 19th Apr 2010 23:50


Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 20th Apr 2010 00:34 Edited at: 20th Apr 2010 00:36
One thing I must say though.

I am heavily considering removing vehicles - as in, all code relating to them will be deleted. This would, of course, only be temporary.

In one of my absences (one of my humongous month long ones) I had created a small rendering engine in C# that made use of Havok. I liked the way that I handled vehicles in there, as it was rather clean. My current code for XenoPhysics is not.

Also, just a random side note, if anyone is good with modeling and or RTS media they should email me at bben53@gmail.com. I'm looking to create something extra fun in Direct3D10 / Direct3D11 (primarily 11 for tessellation, as with planets that could be beyond awesome).

Anyways, I have to get all the necessary files from the DBP extras zip as I lost my hard drive (I have two hard drives and I keep many back ups of my projects, so no worries there).

Edit

Wow, did I really not respond to your models jeffhuys? They look good. I really thought I had responded... hmm. Oh well.

binsky
15
Years of Service
User Offline
Joined: 6th Feb 2009
Location:
Posted: 20th Apr 2010 00:37
Sweet!
Two questions:
1.Will you be releasing the libraries for both darkbasic and darkgdk?
2.Will the source code be included for darkbasic and darkgdk?

Thanks!
Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 20th Apr 2010 01:01
Quote: "Sweet!
Two questions:
1.Will you be releasing the libraries for both darkbasic and darkgdk?
2.Will the source code be included for darkbasic and darkgdk?

Thanks!"


1. I will be releasing for DarkBasic Professional first. DarkGDK will come later on. Users of that will have to be patient and can download the library for DBP for prototyping.

2. This will be a remotely open source project. A little control on my part, of course. As of right now, I do not plan on releasing the source code with the initial release of this project. It will come, just not as quickly as the library itself. Patients is a virtue, as they say.

thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 20th Apr 2010 01:25
Quote: "Also, just a random side note, if anyone is good with modeling and or RTS media they should email me at bben53@gmail.com. I'm looking to create something extra fun in Direct3D10 / Direct3D11 (primarily 11 for tessellation, as with planets that could be beyond awesome)."
I might have time to do a few things...

Also, do you still need a level?

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 20th Apr 2010 01:29
@thenerd - I mean, it's not required, but it would be nice. As you can tell I'm not really an artsy person, so that doesn't matter to me too much.

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 20th Apr 2010 02:08 Edited at: 20th Apr 2010 02:09
Ehhhhh. I'm really worried about this, but here it goes. Don't expect much help with this premature release honestly. I don't even have a demo project. All I can offer is what is in this post really.

First off, here are commands in my string table (I really don't want to type them all out):


I'm not promising everything will work. Vehicles I am 99% sure will NOT work. You can go ahead and try them though I guess.

Here is an uber basic demo:


Don't expect too much just yet. This is still a very premature library. I'll probably upload source code here soon, assuming you all can make it out. It's kinda weird, so yeah.

Enjoy? I'm really scared about this release though, so please, be kind and not too demanding! You'll frighten me away!

And of course, place in your plugins-user folder.

Attachments

Login to view attachments
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 20th Apr 2010 02:14
First download!

Don't worry so much. We should be able to tell you want needs improving (and especially what we want to see improved) from playing with it. That way you'll know better what to focus on.

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 20th Apr 2010 02:19
I also forgot I'm linking with the february 2010 directx sdk. YOU NEED TO GET THE REDISTRIBUTABLE FOR THAT OR THIS WILL NOT WORK.

And yeah, I just hate releasing unfinished work that is most probably buggy, haha.

gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 20th Apr 2010 02:30
defiantly a lot of commands ;o)

one other addition I though would be nice
but I know it means more work

the ability to damage to an object and have it show it
at that point of impact taking into account of the impact speed

I have looked around the code base
I Located a couple of example that came close but the closes one
I found the once command was in in dbp list

replaceing a limb on a 3d object or
changing the skin of the object dose not meet my
requirements for the game I have in mind

Resourceful@shaw.ca

If a thought is Just a thought whats the main thought ?
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 20th Apr 2010 02:32 Edited at: 20th Apr 2010 02:32
@Resourceful: Fail at empathy

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 20th Apr 2010 02:32
Excellent! A release at long last!!!

Been having a play with it already. The demo works fine, and all alterations I've made to it thus far have functioned as expected, so that's great!


I'm going to have a go at making a more.... interesting demo for you.


The one and only,


BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 20th Apr 2010 02:35
Keywords attached.

Attachments

Login to view attachments
Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 20th Apr 2010 02:35
Quote: "I'm going to have a go at making a more.... interesting demo for you. "

Be my guest. I wrote the one up in my post in about thirty seconds, so it is by no means good, haha. Glad to hear its working for you, especially since it is basically pre alpha material!

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 20th Apr 2010 02:36
Quote: "Keywords attached."

Woah now, buddy. How did you manage that? Do you have a generator for this?

BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 20th Apr 2010 02:38 Edited at: 20th Apr 2010 02:39
Quote: "Woah now, buddy. How did you manage that? Do you have a generator for this?"

Speed-coded one on the spot . 24 minutes...not bad, eh?

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 20th Apr 2010 02:40
Quote: "Speed-coded one on the spot ."

Hm, looking at the times it makes sense I suppose. I thought it had been about three minutes or so. My perception on time, as it seems, is quite askew.

ShaunRW
DBPro Developer
16
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 20th Apr 2010 03:13
YES! Xarshi, you released it.

Downloading now.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 20th Apr 2010 03:25
Welp, here's my little demo. It's not much and would have been a bit better if I knew how to delete rigid bodies.



Left-click to shoot a ball.
Yup, that's my half hour of work. I'll be back later to do something a lil more in-depth.

For some reason, sometimes when you click, the ball is given no velocity and just drops to the floor, but if you keep clicking they work fine. Not sure what happened there, mighta been an error on my part.

Xarshi, I don't see any way of deleting rigid bodies. Is it supposed to be that way? How do I get rid of physic objects then?


The one and only,


Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 20th Apr 2010 03:27
Err... huh. If I didn't add that in I will soon... I guess I must have forgot to add that important command in...

thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 20th Apr 2010 03:35
I'm just finishing up a pretty big demo I started a while ago, originally it was a showcase of all the features in my fps engine, Now it's gonna show everything xeno can do, with flashy graphics!
unless I run into any problems I'll release it tomorrow.

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 20th Apr 2010 03:48
Quote: "I'm just finishing up a pretty big demo I started a while ago, originally it was a showcase of all the features in my fps engine, Now it's gonna show everything xeno can do, with flashy graphics!
unless I run into any problems I'll release it tomorrow."

Sounds spectacular. Of course, some features might not work. You should know from the early early versions that I am notorious for destroying feature sets and reviving them at the fall of another, hah.

In all seriousness, I will have vehicles working again soon. I think I'm just going to have to man up and rewrite the resource script as I have many functions I wish to change. I also feel that the overly complex structure of the internal code is going to make it difficult for me to move, but I could be wrong. It's been a bit since I've looked at it to be honest.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 20th Apr 2010 03:49 Edited at: 20th Apr 2010 03:55
Another thing I found... I originally wanted to set up the towers with cylinders, however creating a cylinder rigid body (dynamic) crashed the engine.

Here's some example code for the crash:


[EDIT]
The crash doesn't seem to be caused by the creation of the cylinder rigid body, but is caused during the "xeno update". Hope that helps narrow down the issue.


The one and only,


Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 20th Apr 2010 04:04 Edited at: 20th Apr 2010 04:11
I'll debug it now.

Edit

Found the problem. I'll be reuploading soon enough.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 20th Apr 2010 04:11
Thanks, Xarshi.

Perhaps it has something to do with how DBP's cylinders do not have closed ends? The cylinder primitives in DBP are open.

This is a wonderful plugin so far and I've had little trouble getting things going. The only real issues I've had is guess-work on what parameters certain commands are looking for. Such as the numerous possible parameters for the character controller. Hopefully come the next release we can have a more descriptive command list with parameter names to help with the guess work.


The one and only,


Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 20th Apr 2010 04:15 Edited at: 20th Apr 2010 04:19
Nah, it's because I was apparently in a rush to finish two methods - the cylinder and capsule creation methods. The capsule method is messed up too. Basically, to create a rigid body in havok you do something like this:


I forgot to set the hkpRigidBodyCinfo structures m_shape member apparently. I'm so awesome when I'm in a rush.

Also, the character controllers parameters are like so:


And just for kicks, this is the code to the first one:


I made it more complicated than it had to be, but it works so oh well. The ID internal class is actually inherited via a template class I wrote. It's kind of fun. Here is the template class:


It works quite well in my opinion, and makes it so items are very easily indexable.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 20th Apr 2010 04:28
Okay, as long as you know what went wrong. Lol

I can't be of much help with the backend, but I'm hoping that providing the front-end symptoms will help you with locating the problem in the backend.


Thanks much for the character controller params. I've updated my .ini to suit with it.

Perhaps you can also provide the vortex params? I've no clue what it's looking for and the name has given me that "This sounds cool, I wanna see what it does" feeling.


The one and only,


Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 20th Apr 2010 04:28 Edited at: 20th Apr 2010 04:30
And here we go. Btw, actually keeping an fps dependent time step I left up to you all. So you'll have to either cap the frames per second or do some timestep management. I just set sync rate to 60ish just because I'm lazy.

Attachments

Login to view attachments
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 20th Apr 2010 04:45 Edited at: 20th Apr 2010 04:48
Awesome, downloading now for testing.


I just had a play around with the gravity points. Fun stuff! Watching everything get sucked up into a tight ball and then *BOOM!* go flying in all directions once it dissipates.

I'm still curious about the vortex, though. Any chance we can see the parameter list for that one? *puppy dog eyes*

[EDIT]
Failed to launch with new DLL.
"This application has failed to start because MSVCR100.dll was not found."

Your last one didn't require that.


The one and only,


gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 20th Apr 2010 04:58
humm

ware can I get "XenoPhysics" to play with ?

please E-mail the file to
resourceful@shaw.ca

thanks in advance

Resourceful@shaw.ca

If a thought is Just a thought whats the main thought ?
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 20th Apr 2010 05:37
Sorry for double post.

"xeno end" causes application crash as well. Nothing even needs to be created to cause the crash.

Example:



The one and only,


Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 20th Apr 2010 05:54
Ok, for the first one:
I upgraded to Visual Studio 2010. So you may need to get the redistributable. That apparently doesn't exist.

I'll move the project back down... I shouldn't have upgraded it so soon. I'll have that fix up soon.

And by the way, vortexes don't work. I'm not sure why I kept them in. I may get them to work soon, but as of right now they are bloody useless.

Anyways, just stick to the original for now maybe? I'm not sure. Also, I'll debug xeno end. See what is going on there. I have some ideas. More rushed programming on my part most likely.

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 20th Apr 2010 06:17
Quote: "humm

ware can I get "XenoPhysics" to play with ?

please E-mail the file to
resourceful@shaw.ca

thanks in advance"

I have posted files in a few of these posts. This is the post I suggest you download from:
http://forum.thegamecreators.com/?m=forum_view&t=162138&b=8&msg=2001107#m2001107

ShaunRW
DBPro Developer
16
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 20th Apr 2010 16:17
Xarshi, Well done making an awesome plugin.

I have had a lot of fun testing this out. Is it possible to get object colliding with the inside of spheres. I have tried using negative size values but no luck. Does anyone have any ideas?

BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 20th Apr 2010 16:22
I imagine you'd have to use the mesh commands on a sphere with the normals inverted.

Kryogenik
14
Years of Service
User Offline
Joined: 22nd Sep 2009
Location: Heidelberg, Germany
Posted: 20th Apr 2010 17:31
I'm confused, does the plugin require the new direct x distributable or does the version of DBPro you are compiling it in need it? And do you need the visual c++ redistributable, too? Thanks.

Codesurge is so awesome, thanks Hyrichter.
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 20th Apr 2010 18:02
to no avail I can not get any example's to work
with out the proper compiled dll and ini with the commands

the example's will not run

Resourceful@shaw.ca

If a thought is Just a thought whats the main thought ?
jeffhuys
17
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 20th Apr 2010 18:21
@Xarshi
Awesome man, had a little play-around with it and came up with this:



The performance is AWESOME (at least, looking at the example )

Can you please explain how to make vehicles using the commands? Thanks!

Jeff

thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 20th Apr 2010 19:38 Edited at: 20th Apr 2010 19:39
@jeffhuys, the vehicle commands all crash, we have to let Xarshi fix them.

I was just messing around working on my demo, and I accidentally made this. Useless, but cool. I could only get it up to 230 balls, though.

I shall call it The Super-Awesome Giant/Immense Tower Of Xeno Balls That Almost Goes Throught The Skybox.

Attachments

Login to view attachments
Lord Einstein
18
Years of Service
User Offline
Joined: 22nd Oct 2005
Location: Well here, of course...
Posted: 20th Apr 2010 19:49
Xeno planet!

The planet of physics!

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 20th Apr 2010 22:05
The vehicle commands are horrendous right now and I recommend staying away from them. I will, soon enough, release a version with vehicles integrated. I've had them working before (as you can see with the first pages of this thread), but alas, I messed some stuff up when transferring code. It's only about a days fix, so it should be up decently soon.

jeffhuys
17
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 20th Apr 2010 22:39 Edited at: 20th Apr 2010 22:53
Xarshi, did you try and load a model, and then make a dynamic convex out of it? It crashes for me on two different models.

Also, what are the parameters for "Xeno Make Rigid Body Static Terrain"?

Lord Einstein
18
Years of Service
User Offline
Joined: 22nd Oct 2005
Location: Well here, of course...
Posted: 20th Apr 2010 23:48
thenerd - your demo crashes after only about half a second. I see a large tower of spheres through the doorway and get time to slightly pivot my camera before it crashes.
thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 21st Apr 2010 00:00
ok, thanks. I think it has to do with how much memory available there is, what are your computer's specs?
Also, Xarshi, while making levels i've noticed that xeno gets really picky, I multiple times had to remake my level because when I loaded it the game either crashed or you just fell throught the floor... I don't know why, it seems random except that the level I couldn't get to work had cylinders in it (maybe more polygons?)...

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 21st Apr 2010 00:33
This all sounds delightfully fun.

I have a proposal for crashes. Email me at "xenophysics@gmail.com" with the crash information (ie, code you run to crash it and meshes as well). Put your forum name as the subject. In the body, detail the crash and what you think (or know) why the crash has happened (as in, your mesh crashed it).

This will make things a lot easier on me. Thenerd, do that and email me code and a mesh and I'll debug the heck out of it.

Also, the terrain functions never worked. They were kinda weird. Right now I'd like to get the entire plugin working before integration with BlitzTerrain. It will happen eventually, however.

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 21st Apr 2010 00:52 Edited at: 21st Apr 2010 00:55
Jeff, looking at it now, I should hope it doesn't work. For pretty obvious reasons. Let me post the code here:


Now obviously, as you can see, it is a very complex method. So complex that it doesn't work at all.

I'll implement it eventually. It's better to stick to primitives as they'll run faster anyways.

Also, guys, if you are calling "xeno start" with no parameters, you are running in single threaded mode. Use "xeno start 1" to run in continuous collision detection mode, and "xeno start 2" to run in multithreaded. "xeno start 0" will simply run in single threaded mode, as you might think.

Here are the possible parameters as well:


By default, the values are: 0, 1000, 0x200000. Since upgrading to Havok 7.1, the last parameter in the last function is quite redundant. I need to update the commands in that case.

Symon
20
Years of Service
User Offline
Joined: 29th Aug 2003
Location:
Posted: 21st Apr 2010 01:19
There Something missin, thats vital........ call sticking one object to another object.

Hi Xarshi, ive been following this and looking forward to creating non jittery machines.

When will we see joints, pivots, ragdolls
i wanna build a bridge /----------\

Login to post a reply

Server time is: 2024-03-28 21:46:30
Your offset time is: 2024-03-28 21:46:30