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
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 21st Apr 2010 02:06
Quote: "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."

Aha, that's how you get CCD!

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 21st Apr 2010 02:57
Quote: "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 /----------\"

You are correct, there is not support for joints as of right now. This will happen when it happens. I'm finishing up high school this month so I'm doing a lot, but I'll try to get done what I can.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 21st Apr 2010 03:05
Stick to working on the simple commands until they are working without issue.

When you get around to it, though, perhaps you could expand the gravity points so we can define distance of influence on its own. Increasing the power to attract objects further away makes the objects at the center flip out due to the high amount of gravity there. But I do like how it works. I've been able to get objects into perfect orbit around gravity points. Had an asteroid belt going on for a little bit.


The one and only,


ShaunRW
DBPro Developer
16
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 21st Apr 2010 16:21
BMacZero: Thanks for the idea, I didn't get it to work though i'm closer.

Here's something cool i made with the gravity points.


Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 21st Apr 2010 22:06
Quote: "Stick to working on the simple commands until they are working without issue.

When you get around to it, though, perhaps you could expand the gravity points so we can define distance of influence on its own. Increasing the power to attract objects further away makes the objects at the center flip out due to the high amount of gravity there. But I do like how it works. I've been able to get objects into perfect orbit around gravity points. Had an asteroid belt going on for a little bit. "

Well generally if you wanted to have planetary gravity the current system works well. Just expand the size of the planet to get less jittering.

BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 22nd Apr 2010 02:22
Speaking of large values, there seems to be a sort of a boundary beywond which objects seem to freeze and not respond to anything. You can see it if you use Plystire's demo , set the velocity up to 100-150, and shoot high. You'll see the spheres get stuck in an invisible wall a ways out.

This isn't really a bug, but it would be nice to be able to set that world boundary.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 22nd Apr 2010 04:40
Speaking of boundaries, you can also see in my demo that the boxes that make up the wall are not exactly the same size as their physics box.

I also noticed with the character controller you made in the first demo that the character box representation was slightly taller than the physics box and the box that you see sticks into the ground a little bit. It can be seen easier if you jump on top of the box and move off to the side of it. Though, I think this could be countered by adjusting the character controller parameters, I'm not sure how one would adjust it for normal boxes.


The one and only,


Lord Einstein
19
Years of Service
User Offline
Joined: 22nd Oct 2005
Location: Well here, of course...
Posted: 22nd Apr 2010 16:07 Edited at: 22nd Apr 2010 16:08
There is a world size variable you have to set on the xeno start command

xeno start Flag, BroadPhaseWorldSize

I don't know what the flag values are but increasing the broadphaseworldsize value seems to prevent this invisible wall problem. When objects leave the area defined by Xeno physics the engine stops calculating for them and they just kind of get stuck.
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 22nd Apr 2010 16:41
Thanks, Lord Einstein!

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 23rd Apr 2010 22:28 Edited at: 23rd Apr 2010 22:31
Xarshi
There is a bug in BlitzTerrain which means that the vertexdata scale is usually alot bigger than the actual object. This was solved by scaling the object with DBPro. This has now been removed and the object now gets scaled inside BlitzTerrain. But this does mean an extra entry to the vertexdata structure.

Heres an updated structure for you:


The Scale value is the number which you have to multiply every x and z of vertexdata positions by to get the actual positions of the vertexdata. This doesnt apply for the y axis. Vertex FVF is no longer used. Use FVF size to find offsets to vertices and the positions will always take up the first 12 bytes of each vertex.

jeffhuys
18
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 26th Apr 2010 20:07
@Xarshi
How's it coming along, mate? Everything ok?

How about a "Xeno Set Rigid Body Scale ID,X,Y,Z" command?
This, because the bodies seem to be too big for the models

thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 26th Apr 2010 21:58
agreed. Also, if it's possible, an xeno enable debug command that shows the wireframe world according to xeno, so we can debug specific meshes ourselves.

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 26th Apr 2010 22:04
Quote: "@Xarshi
How's it coming along, mate? Everything ok?

How about a "Xeno Set Rigid Body Scale ID,X,Y,Z" command?
This, because the bodies seem to be too big for the models "

That command would literally just be recreating the rigid body with a new size. You can't scale rigid bodies dynamically. I would suggest modifying your graphical objects to fit Havok personally. And, if I haven't mentioned this before, Havok works in a 1 unit = 1 meter. Remember that. So if you have your cube say, 500 units large, then you have a 500 meter^3 cube. Not exactly normal.

Quote: "agreed. Also, if it's possible, an xeno enable debug command that shows the wireframe world according to xeno, so we can debug specific meshes ourselves."

I had thought I made XenoPhysics use Havok's visual debugger. Whoops. I'll implement that. But that does mean you have to download Havok. Which you should do anyways since it's awesome and so is C++.

jeffhuys
18
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 26th Apr 2010 22:50
Quote: "That command would literally just be recreating the rigid body with a new size. You can't scale rigid bodies dynamically. I would suggest modifying your graphical objects to fit Havok personally. And, if I haven't mentioned this before, Havok works in a 1 unit = 1 meter. Remember that. So if you have your cube say, 500 units large, then you have a 500 meter^3 cube. Not exactly normal."


Yeah, well, if I load an object (say, a crate), and I scale it BEFORE making a Xeno rigid body out of it, Xeno still uses the default sizes.
It would be stupid to have to remodel everything just to fit in the game, won't it?

Thanks!

thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 26th Apr 2010 23:20
I think, instead of having a scaling command and making things more complicated, just have xeno take into account the current object scale when an object is turned into a rigid body.

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 27th Apr 2010 03:22
Quote: "Yeah, well, if I load an object (say, a crate), and I scale it BEFORE making a Xeno rigid body out of it, Xeno still uses the default sizes.
It would be stupid to have to remodel everything just to fit in the game, won't it?

Thanks!
"

Actually you generally do want to have everything to scale with content. But I actually think you can specify size with rigid bodies. You can use these commands:


You would use any one of the shape functions with these two commands:


Note - I'm not sure if the list commands work.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 27th Apr 2010 05:27
Hey, Xarshi, not sure how busy you are right now, but was wondering what the chances are of us getting an update?

Perhaps one with a "Delete Rigid Body" command? I think the system right now would be usable for mild projects if that was implemented.


The one and only,


jeffhuys
18
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 1st May 2010 23:46
@xarshi

Any progress as of now?
I am using this plugin to it's fullest at the moment, and got it set up for multiplayer, it works perfectly! The character controller is awesome, although I think the crouch function doesn't work properly?

Thanks!

Jeff

Zaibatsu
18
Years of Service
User Offline
Joined: 1st May 2006
Location: Lost in Thought
Posted: 3rd May 2010 00:56
I downloaded the DLL and ran into a problem almost immediately. I tried to make a character controller move around a map made in 3D World Studio, but the character controller just fell through the floor. I swapped out the map for a box, and the character controller didn't fall through. How do I get the map from 3D World Studio to act 'solid'?

CSGames94
16
Years of Service
User Offline
Joined: 27th Dec 2007
Location:
Posted: 3rd May 2010 06:03
Quote: "I downloaded the DLL and ran into a problem almost immediately. I tried to make a character controller move around a map made in 3D World Studio, but the character controller just fell through the floor. I swapped out the map for a box, and the character controller didn't fall through. How do I get the map from 3D World Studio to act 'solid'?"
use
on your 3D World Studio Map.

The Pokemon Engine is still alive.
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 3rd May 2010 06:06
I don't think that command is functional yet, it doesn't work on BlitzTerrains at least.

CSGames94
16
Years of Service
User Offline
Joined: 27th Dec 2007
Location:
Posted: 3rd May 2010 06:09 Edited at: 3rd May 2010 06:10
Quote: "I don't think that command is functional yet, it doesn't work on BlitzTerrains at least."

Oh... Well I guess Zaibatsu might just be out of luck .

The Pokemon Engine is still alive.
The Viking
16
Years of Service
User Offline
Joined: 21st Oct 2008
Location: Asgard
Posted: 3rd May 2010 07:57 Edited at: 3rd May 2010 08:13
Hey, this looks great! Works good too! Though, I had one question. When I used the character commands with my current code. It seems that rotating the character and camera together doesn't work nicely. Either it doesn't rotate at all, or it just spins around. Does this plugin not like the mousemove commands?

Using the xeno rotate character controller works when increased by 1, but when increased by a mousemove value, it gets very choppy and turns occasionally.

www.myspace.com/norseblod
gwheycs62egydws
15
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 3rd May 2010 20:09
umm there are some commands that do not work

on page

http://forum.thegamecreators.com/?m=forum_view&b=8&t=162138&p=8

they are listed in the string table but not in
"xenophy_alpha.ini"

the following commands

xeno set character controller position
xeno set rigid body position
xeno disable character controller

xeno get camera point
xeno get camera position

xeno set character controller rotation

xeno move character controller forward
xeno move character controller backward
xeno move character controller left
xeno move character controller right


I know it's just a matter of
knowing how to put in them in

"xenophy_alpha.ini"

I'm going to take a shot at trying to get them to work

Resourceful@shaw.ca

If a thought is Just a thought whats the main thought ?
The Viking
16
Years of Service
User Offline
Joined: 21st Oct 2008
Location: Asgard
Posted: 3rd May 2010 21:05
Ok, thanks. I know some don't work, and some do. I found that any command that involves mousemove ie:



doesn't really work. Oh, that isn't the code I used, I am away from my comp so i don't have it right now, but it's similar to it. This either only starts to rotate the object when the mousemove is very large, like from one side of the screen to the other, or it will just continuously spin the object as soon as the mouse moves and doesn't stop for a long time, only speeds up.

i'll post what i'm using when i get home.

www.myspace.com/norseblod
thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 3rd May 2010 22:51
Quote: "xeno make rigid body static mesh"


It's functional, but extremely buggy, and I only ever got one of my levels to work with it. Definitely something that needs work.

gwheycs62egydws
15
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 3rd May 2010 23:39
I tried to fill in the missing commands in
"xenophy_alpha.ini"

attached to this is what I thought was the correct
layout but it seems I am still not knowing the exactly
what it is after

maybe some one else can help fill in the missing info

Resourceful@shaw.ca

If a thought is Just a thought whats the main thought ?

Attachments

Login to view attachments
Zaibatsu
18
Years of Service
User Offline
Joined: 1st May 2006
Location: Lost in Thought
Posted: 4th May 2010 00:58
Quote: "xeno make rigid body static mesh"


I used Dark Physics before this. so that was familiar code to me, so I did that and it still didn't work. I guess I'll just wait for a fix/patch.

BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 4th May 2010 01:57
Quote: "I guess I'll just wait for a fix/patch."

Or, you know, an actual release that isn't a pre-alpha version .

The Viking
16
Years of Service
User Offline
Joined: 21st Oct 2008
Location: Asgard
Posted: 4th May 2010 04:30
Does anyone know why mousemove doesn't like to work with this? Here is what I have, and it works only when I make large movements with the mouse.



It seems like it's not picking up decimals or something. I have Angy# set up as a float, i don't understand why it wouldn't work. Anyone have this problem, or know why?

www.myspace.com/norseblod
Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 4th May 2010 12:59
Sorry guys, really busy lately as school is coming to an end.

TheViking, it is weird that it won't work as my personal tests have made use of that. I would venture to guess that angy# is much too large. Try passing in a lower value just to test it out. Soonish I will post what I did probably.

The Viking
16
Years of Service
User Offline
Joined: 21st Oct 2008
Location: Asgard
Posted: 16th May 2010 03:44 Edited at: 16th May 2010 04:43
Ok, well, I finally figured out that it REALLY depends highly on the order you put the codes in. So, I just needed to rearrange it.

Although, now I have a new question: I have multiple planes which I put together to form a large map, though, once I move off the initial plane I fall through the others. Does this only support collision against 1 of these at a time?

Just in case it's the code, here's what I am using:


EDIT: DUH!... Forgot to set the world size... Nevermind! haha

www.myspace.com/norseblod
thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 16th May 2010 05:38
Hm, still having problems With static level meshes, any chance of xeno having a debug command?

The Viking
16
Years of Service
User Offline
Joined: 21st Oct 2008
Location: Asgard
Posted: 22nd May 2010 16:40
One thing that I think you may have missed, which would be useful, is to be able to adjust the settings on the character controller, so that you can change the speed in game, or the mass in game.

www.myspace.com/norseblod
thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 22nd May 2010 16:51
Remember, this is still an early release, so a lot of things are left out or buggy, hopefully xarshi is still working on this...

The Viking
16
Years of Service
User Offline
Joined: 21st Oct 2008
Location: Asgard
Posted: 22nd May 2010 16:52
I realize that, just mentioning it as it can be a vital command, if Xarshi potentially overlooked something like that.

www.myspace.com/norseblod
jeffhuys
18
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 22nd May 2010 16:54
@thenerd

I think he is still working on this, but not at the moment, because of exams (just like me).

thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 22nd May 2010 18:30
Yeah, he hasn't been online in msn for a few months, he also said he was working on a project for school...

JoeOh
15
Years of Service
User Offline
Joined: 25th Feb 2009
Location:
Posted: 23rd May 2010 14:00
Xarshi, do you plan to add a "make dynamic rigid from mesh MeshID, XenoID" command in the future? The project I'm working on will be using the CSG commands built in with DBPro. You say that you are plenty busy so I'm not expecting this to happen anytime soon. Just asking is all.

Home is where my souped-up computer is...
Mr Bigglesworth
16
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 24th May 2010 07:14 Edited at: 24th May 2010 07:17
Hey Xarshi, this pluggy is AWESOME. If you could possibly release the source for this wrapper, I'd be happy to take a look at adding some features and fixing some bugs...
binsky
15
Years of Service
User Offline
Joined: 6th Feb 2009
Location:
Posted: 24th May 2010 21:56
Quote: "
Xarshi, do you plan to add a "make dynamic rigid from mesh MeshID, XenoID" command in the future? The project I'm working on will be using the CSG commands built in with DBPro. You say that you are plenty busy so I'm not expecting this to happen anytime soon. Just asking is all.
"


I use havok myself and im pretty sure havok doesnt support dynamic meshes. The reason for this is because using dynamic meshes takes up a ton of cpu and will greatly slow down the engine to almost a dead halt. To replace dyanmic meshes, he will most likely create a command to make convex hulls. Its almost the same thing as a mesh, just less accurate and takes less cpu.
Conor B
19
Years of Service
User Offline
Joined: 10th May 2005
Location: Dublin, Ireland
Posted: 25th May 2010 21:16
This is looking amazing, I'm sure to use this for my game when a stable release is availible! Thanks for your work Xarshi.

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 29th May 2010 00:44
Sorry guys, was finishing up high school.

I'm now graduated So yay. I'll probably be very bored, so I will work on this more!

kordman916
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location:
Posted: 29th May 2010 00:52
Dude, you're in high school?


Dell Optiplex GX280, 3.4 GHZ Pentium 4 processor
1 Gig DDR2 ram, Geforce 8500 GT 512mb
jeffhuys
18
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 29th May 2010 01:17 Edited at: 29th May 2010 01:17
Quote: "I'm now graduated"

Congrats! I have one exam to go... Chemistry, my worst one.

Quote: "Dude, you're in high school?"

I am too...

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 29th May 2010 02:29
Quote: "Dude, you're in high school?"

Yup.

Quote: "Congrats! I have one exam to go... Chemistry, my worst one. "

Hah, fun thing, seniors at my school didn't have to take exams... just had to finish up the actual school days.

thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 29th May 2010 03:32
lucky, i've still got 2 weeks left and a bunch of exams...
glad you've got the time now to work on this, I really am looking forward to using it in my game.

kordman916
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location:
Posted: 29th May 2010 08:37
I just said that because I never would've expected a senior to be able to program some thing like this.................. I myself am a sophomore.


Dell Optiplex GX280, 3.4 GHZ Pentium 4 processor
1 Gig DDR2 ram, Geforce 8500 GT 512mb
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 29th May 2010 09:06
congrats Xarshi! (i also am in high school =p)

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 29th May 2010 18:01
I am also in high school. Except I still have an entire year left .

Login to post a reply

Server time is: 2024-11-24 18:36:58
Your offset time is: 2024-11-24 18:36:58