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.

DarkBASIC Professional Discussion / Looking for Sonic

Author
Message
Guyon
23
Years of Service
User Offline
Joined: 6th Jun 2003
Location: United States
Posted: 30th Sep 2003 01:07
Sonic,
I was on nuclearglory and heard that you were the one that converted the Collision DLL to work with BDpro. THANK YOU!!! It works really well.

Can you also take a look at the Matrix Molder and convert that to DBpro too?
http://www.nuclearglory.com/developer/db/
Sonic
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: UK
Posted: 30th Sep 2003 04:23
@Guyon hi

The Matrix editor seems to be open source DB code. I'd guess that the matrixes it would create would be DB/DBPro matrixes anyway and all the code is already in DB.

Forgive me if i'm missing something here but the DBPro box says "Run DarkBASIC V1 programs". So what you really need is a DB guru who understands the process of converting DB code to DBPro. I'd help if I could but that just ain't me mate!

I did have a quick look at the code and noticed lots of instances of the String "$" sign at the wrong end of the variable, which I think even DB would have choked at. So I did a few global replaces but I'm afraid ended up with code that just didn't compile, apparently this line has irregular brackets?:

FOR z=0 to int(mdepth#/dstepratio#)

And then...and then....I ran out of compiles and can't find my DB Pro disk LOL!

Oh cool and I think the dustbin men have already been...lol....

As I say, I think you need someone with experience of DBPro coding pitfalls and so on.

"My ignorance amuses me..."
Guyon
23
Years of Service
User Offline
Joined: 6th Jun 2003
Location: United States
Posted: 30th Sep 2003 05:04
Thanks Sonic
David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 1st Oct 2003 20:29
Sonic, do you still have a link to the converted code for the collision DLL?

Thanks

c:/dos
c:/dos run
run dos run
Sonic
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: UK
Posted: 2nd Oct 2003 06:07
@Guyon - Exeat posted this link to a util that converts DB to Pro - thought it might be what you're after
http://www.colorarts.de/dbprotools/

@David89 - http://www.nuclearglory.com/developer/db/kdll.html now points to the updated V1.5 (for pro) version.

"My ignorance amuses me..."
EddieRay
23
Years of Service
User Offline
Joined: 28th Feb 2003
Location: USA
Posted: 2nd Oct 2003 08:42 Edited at: 2nd Oct 2003 08:46
The KDLL works pretty nicely. I'm impressed.

Can I somehow use it to detect collision between an object (like a vehicle) with the "world" (the .X)? Can I check collision for several objects against the world or just one "player" object?

The hit normal - is that the normal of the world surface that the player is hitting? It seems like it... usually the hit vector seems to be something close to 0,1,0 in the demo.

Can the player be rotated relative to the world (the vehicle is tilted after jumping off a ramp or something, then hits the ground at an angle)?

Thanks,

Ed

AMD900/256MB/Radeon 8500 64MB/Win98SE/DX9.0b
P3-850/384MB/GeForce2 Go 16MB/WinXP Pro/DX9.0b
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 2nd Oct 2003 18:14 Edited at: 2nd Oct 2003 18:25
Hi EddieRay,

As I recall, you should be able to detect multiple objects against the collision mesh. You would just call the collision routine once for each object you're testing.

Currently, the collision system only supports sphere to mesh collision, so rotation is totally ignored, as it wouldn't do any good anyway.

BUT! We're (Sonic & Myself) are creating a new version of the collision system. Just to give you a sneak peak...

It's going to have sphere & ellipsoid (egg shaped) to mesh collision. Also, it now supports moving meshes. So for doors, elevators, etc... will push things around when they move.

The egg shaped collision will NOT rotate with the collision object. As it would get into "bending space" when the object rotated, and that gets nasty fast, lol.

Also, accurate "sphere to sphere" collision will be implemented. Multiple spheres can be moving and sliding collision between them works beautifully. It'll work with ellipsoids to, but the ellipsoids must be the same dimensions.

And there's more! Lol. We're working to implement AABBs (Axis Aligned Bounding Boxes) This means you can put a bounding box around an object and it will rotate with the object.

This AABB collision is planned to work against meshes. And to set the sights up higher, we're gunning for AABB to AABB collision, so you can have bounding boxes around players and enemies etc. set for collision against each other. The benefit here, is the dudes don't have to have boxes of the same dimension.

Now, to apply this to your problem above... You could set an AABB around the body of your vehicle, and then use sphere collision for each tire. That would allow the body of your vehicle to collide with the world and at the same time you get feedback on each tire from the collision system. So you could have it go off a jump and slowly nose up or down (depending on the vehicle) and then the body smashes into a wall or something.

One more thing too, the new system uses a DataBase style system to store the object/world data so it's not all shoved in RAM.

Kevin (Sonic) and I are going to have some fun this time

All you nice people on the forum will help us work the bugs out of it right?

BTW, I'm Matthew from NuclearGlory.com, if you were wondering, lol.


--Matrix molder
Yes, it is open source. And, hmm, I'm thinking it deserves a code re-write, as I recall the code being rather "unclean" and a pain to read and modify. And I can say that, cause I wrote it, haha.

I'm feelin' power motivated, so I'll prolly look into making the code easier to understand so you can port it. And ya know what! If it were used in conjuction with the collision system... it'd become super fast and error free.

Now that I posted this, I better get it done before you all start rioting and sending me viruses or something, haha, jk


P.S. The collision normal data will now be stored as a list, as you can collide with more than one surface at any frame. Which may be why you're experiencing a problem with the normals.
Guyon
23
Years of Service
User Offline
Joined: 6th Jun 2003
Location: United States
Posted: 4th Oct 2003 00:24
Thanks Sonic,
I really like the dbprotools. but it wasn't much of a help.

My initial stab into converting the "Matrix Molder" has gotten be to the point where the program run but I am far from finishing it.

Anyone want to give a hand I can explain what I have done so far.
mimesis
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Norway
Posted: 4th Oct 2003 20:30 Edited at: 4th Oct 2003 20:31
@nuclearglory

Thats fantastic news! I've been using you're DLL for a while now
and I'm very happy with it.

I can reccomend it to all DBPro users which are having problems
with Pro own collision-detection system.

Whats even better, Matthew has agreed to my wish of including a
function in the DLL to return the index number of the poly collided
with.

AABB collision sounds great! cant wait for the release of the new
DLL.

Keep up the excelent work !

Me, You, DBP and everything else, were made in the same place. The Stars!
I wonder what kind of matter DBP bugs are made of ... antimatter ??
EddieRay
23
Years of Service
User Offline
Joined: 28th Feb 2003
Location: USA
Posted: 5th Oct 2003 08:00
@nuclearglory:

AABB sounds very nice... I'm anxious to try it out.

Only sphere to mesh collisions? I thought the player.x file was a cube? Is it just automatically using the minimal bounding sphere of the specified player object in the DLL routines?

Your idea about switching between player "objects" to collide more than one thing against the world - wouldn't it require a "MAKE MESH FROM OBJECT" and "MAKE MEMBLOCK FROM MESH" and a call to the DLL from DBPro for each collision check? Could that be done fast enough (those commands in DBPro sound "expensive"... i.e., something you wouldn't want to call the main loop in a game)?

Thanks!

AMD900/256MB/Radeon 8500 64MB/Win98SE/DX9.0b/Catalyst 3.7
P3-850/384MB/GeForce2 Go 16MB/WinXP Pro/DX9.0b/Detonator 45.23
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 5th Oct 2003 09:31 Edited at: 5th Oct 2003 09:53
Hi EddieRay,

I think the "just" of what I was trying to say was missed, but thanks for posting as other people probably had similar questions.

Let's see if I can describe it better, using an example...

Let's say you were making a First Person Shooter style game.

This consists of your main player, a set of enemies, and the world mesh(s)...

Now, let's say we wanted to make collision work. We would tell the collision system that for the main player, we want to use ellipsoid (egg-shaped) collision against the world mesh. That way, when he moves around the world, he'll nicely go over things like stairs, etc. So, we tell the DLL something like this:

`------ CODE ------

Constant TYPE_PLAYER=10, TYPE_WORLD=11

SetCollisions(TYPE_PLAYER,TYPE_WORLD,2)

CollisionType(MY_PLAYER_OBJ, TYPE_PLAYER)
CollisionRadius(MY_PLAYER_OBJ, 3, 8, 3)

CollisionType(MY_WORLD_MESH_OBJ, TYPE_WORLD)

`------ END CODE ------

What's this say in English? First, we setup some constants to prevent confusion, and use them whenever we want to represent a "type" of collision object. (Invent your own)

Then, the "SetCollisions" function tells the system that we want to test all "TYPE_PLAYER" objects against all "TYPE_WORLD" objects using ellipsoid to poly collision, hence collision type "2"

Then, we set the "Collision Type" of our player object to be a "TYPE_PLAYER" collision object. Then we tell the DLL the dimension of the ellipsoid we want to use in X/Y/Z format. So, we call function "CollisionRadius" for the object and set the ellipsoid size to "3" wide, "8" tall, and "3" deep.

Then, the code tells the DLL to make the World Object as a "TYPE_WORLD" Collision object.

And... as per our settings in the beginning, all "TYPE_PLAYER" objects are tested against all "TYPE_WORLD" objects using ellipsoid to poly collision.

NOTE: All collision shapes mentioned here (sphere, ellipsoid, AABB, etc.) are all imaginary and you send the dimensions thereof to the DLL. The shapes are not actually created in DBPro, and therefore, you *DO NOT* need to convert them to a mesh/memblock first and send them through. And a set of functions are going to be made to hopefully make communication with the DLL as painless as possible. Hence the functions listed here.

Now, if you wanted to used AABB to AABB collision (for collision with your player against the enemies) you'd just make another definition at the top of the program:

SetCollisions(TYPE_PLAYER,TYPE_ENEMY,3)


Also, objects can have multiple definitions at the same time:

SetCollisions(TYPE_PLAYER,TYPE_WORLD,2)
SetCollisions(TYPE_PLAYER,TYPE_ENEMY,3)
SetCollisions(TYPE_PLAYER,TYPE_BALLS,1)

All of these set the definitions for collision of the player against the target objects using different styles of collision.

As you can well imagine, this is incredibly powerful. Don't miss something here though. Multiple objects can have the same "Collision Type" for example:

CollisionType(WORLD_MESH_OBJ, TYPE_WORLD)
CollisionType(DOOR_OBJ, TYPE_WORLD)
CollisionType(TABLE_OBJ, TYPE_WORLD)
etc....

the first parameter is the "ID" of the object in DB. So, you can send it through a loop if you have an array of objects, for example:

For myobj=1 to 100
CollisionType(myobj, TYPE_WORLD)
next myobj

I hope this explains it better. Also, a full set of tutorials are going to be posted on the website walking people through the very basic usage and then expanding upon that, etc.

Let me know if you have any more questions.

Also, functions name calls my vary, as I've got some implementation work to do for the DB engine, and things are bound to change.
David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 5th Oct 2003 18:58
@David89 - http://www.nuclearglory.com/developer/db/kdll.html now points to the updated V1.5 (for pro) version.

Thank you very much [originally a typo but i think it looks good!)

c:/dos
c:/dos run
run dos run
EddieRay
23
Years of Service
User Offline
Joined: 28th Feb 2003
Location: USA
Posted: 6th Oct 2003 21:45
@nuclearglory: Thanks for the more detailed description! I'll have to play around with it...

Desktop: AMD900/256MB/Radeon 8500 64MB/Win98SE/DX9.0b/Catalyst 3.7
Laptop: P3-850/384MB/GeForce2 Go 16MB/WinXP Pro/DX9.0b/Detonator 45.23
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 8th Oct 2003 11:58 Edited at: 8th Oct 2003 12:01


In case you're all wondering, that's what's slowing me down ^

Notice the error is from the DB EXE file and not from the DLL. I think what I'll do is release a beta version of the collision system to see if any of you have trouble with it.

Everything is still in the pipe as promised, but a flurry of errors are slowing progress tremendously. Anyone have any idea as to what could be causing the above error?

Maybe that's an error because it can't read return data from the DLL. I don't know, it comes out of nowhere. The program is running fine then it just bails, like something "slipped".

And I'm not using any DB pointers or anything. All I'm using is an arrayed type to handle all of the moving objects. And, of course, the function calls to get data back from the DLL. But if it was a problem on my end, wouldn't it slip immediately? Weirdness.

The only logical thing I can think of is that something happened to where the return data from the DLL got garbled and confused the application.
las6
23
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Finland
Posted: 8th Oct 2003 12:12
I heard someone got the same error when trying to use bump mapping in DBpro. that doesn't make any sense, though. Confusing, eh?
I'd say it's a DBpro problem.

..are you using dynamic array?

nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 8th Oct 2003 12:20
Nope, just a standard array. I don't have my copy of DBPro yet though so I'm probably running an unpatched crippled Lite version that is giving me errors that were fixed in the patches, lol.

Hey, I'm going to upload the example and the DLL to the server and put it here for download. Would one of you test it for me please?

You have to let it run for say 30 seconds to 3 minutes. Anywhere in that time window it dies on my computer.

I'll put the link in the next post.
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 8th Oct 2003 12:28
Ok, here's the link:

http://www.nuclearglory.com/images/temp_pics/sphere_swarm.zip

Make sure the include file is included with the "sphere_swarm" file or it won't work.

You move with the arrow keys and look with the mouse.

Thanks for your help
las6
23
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Finland
Posted: 8th Oct 2003 12:46
sorry, can't test it as I'm not home. But I'll try to remember it when I do get home. (~3½h)

mimesis
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Norway
Posted: 8th Oct 2003 16:42
@nuclearglory

I tested you're demo and it runs nicely on my machine without crash.

Hardware
cpu: amd xp1700
ram: 256Mb ddr
display: Gforce3 TI200

Software
WinXP Pro
DBP5.1b retail
dx9.1b

Me, You, DBP and everything else, were made in the same place. The Stars!
I wonder what kind of matter DBP bugs are made of ... antimatter ??
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 8th Oct 2003 23:21
Thanks mimesis,

I'll bet in touch. I'm going to try a few more things.
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 9th Oct 2003 01:36 Edited at: 9th Oct 2003 01:41
Ok, I'm running:

cpu: Intel P4 - 2.0 GHz
ram: 512 MB DDR
gcard: Intel Integrated Xtreme 3D Graphics

WinXP Home
DB Trial (for right now)
DX 9.0b

I'm hoping this problem will go away when I get the boxed version. I've tried a series of different things to prevent the error, all to no avail.

It's good to hear that it ran on your machine. Usually it takes a few minutes to die. If my hopes are correct, the boxed version of DB will resolve this problem.

If a few other DBP users could test that example for me I would appreciate it.

I'm going to move forward now and implement the other systems.
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 9th Oct 2003 02:28
Yes, I would say this is terribly frustrating. I'm going to try this out on a different engine and see if it gives me the same problem. Then we'll "know" if it's DB. I'll keep you posted.
Sonic
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: UK
Posted: 9th Oct 2003 04:27
CPU: AMD Athlon XP2100+
ram: 512MB DDR
Card: Geforce 4 MX 420/64MB
OS: XP Pro
DarkBASIC Version: 1.04

I'm getting the same memory access error after 30+ seconds as you Matthew Nice while it lasted though..

"My ignorance amuses me..."
http://www.victory-road.co.uk
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 9th Oct 2003 05:03 Edited at: 9th Oct 2003 05:06
Thanks Sonic,

Well, I've made substantial progress in tracking down "the bug". I got the DLL loaded up into blitz and after modding a few things, it crashed and the blitz debugger revealed to me that it was crashing somehwere during the collision routines. May have to do with the feedback system I put in place for DB.

But, it's a start! DB just closes and doesn't tell me anything.

I am REALLY hoping the problem is on my end when it comes to DB.

BTW, that's the other bug I'm having, the "silent close" thing.

I'm going to comment out a section of code and see if it gives me that read error again in blitz.

I'll keep you all posted.
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 9th Oct 2003 05:23
Well, bad news guys.

The blitz version of the example up there ^ runs indefinitely. No read-error crash or anything. So that means it has to be DBP.

In any case, we'll press forward and try to finish the system. Hopefully they'll release a patch to fix this issue.
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 9th Oct 2003 06:10 Edited at: 9th Oct 2003 06:12
Here's the gameplan, so everyone's on the same page. I'm going to finish Matrix Molder tonight, using version 1.5 of the collision system.

Then, I'm going to begin rewriting the DLL structure from the ground up. As currently their are malfunctioning file I/O operations, etc. It began to do intermittent stuff like this when I began to port it to the DB platform.

And, being that this system will be released as a C++ lib, it should be constructed in such a way that it can be ported to any platform with minimal effort, etc.

My apologies for the delays. Look for updates next week. And mimesis, the Matrix molder app should be on the site tomorrow.
mimesis
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Norway
Posted: 9th Oct 2003 07:43 Edited at: 9th Oct 2003 07:44
Quote: "
Well, bad news guys.

The blitz version of the example up there ^ runs indefinitely.
No read-error crash or anything. So that means it has to be DBP.
Hopefully they'll release a patch to fix this issue.
"


The demo run fine on my system, remember? It's probably
your DBPro lite.

Quote: "
And mimesis, the Matrix molder app should be on the site tomorrow.
"


Matrix? Thanks but no thanks, I stop using them a long time ago,
I prefer x meshes for my levels.

Me, You, DBP and everything else, were made in the same place. The Stars!
I wonder what kind of matter DBP bugs are made of ... antimatter ??
Guyon
23
Years of Service
User Offline
Joined: 6th Jun 2003
Location: United States
Posted: 9th Oct 2003 07:58
No apologies necessary nuclearglory, you are awesome! My offer still stands to compile any DBpro you need.
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 9th Oct 2003 11:14 Edited at: 9th Oct 2003 11:19
Sorry bout that mimesis, I got you crossed with another person who had requested the matrix app.

Also, knowing that the current state of the DLL is unstable (on both Sonic and I's machine, as Sonic has DBP) I don't feel right releasing it. We will release a working version however.

Thanks Guyon! I will probably contact you to help test the system as it undergoes development. Also, I just completed the DBP matrix app, it will be on the site shortly.
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 16th Oct 2003 04:22 Edited at: 17th Oct 2003 10:59
Ok people. Here it is. A link to a direct download of the newest version:

EDIT: http://www.nuclearglory.com

I will replace the link in this post to a webpage once I get a page up. Some things can act a little jumpy with ellipsoid collision, but all in all it's complete.

We will be releasing a series of updates.

Login to post a reply

Server time is: 2026-07-26 09:30:50
Your offset time is: 2026-07-26 09:30:50