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 / Free physics library written in C needs conversion to DBpro

Author
Message
Cpt Caveman
23
Years of Service
User Offline
Joined: 29th Aug 2002
Location: New Zealand
Posted: 26th May 2003 12:31
If anyone has the skill to convert this it would be great for everybody. It has been done for B***Z3D and people are using it. And as noone appears to be too concerned with physics in DBpro this could help alot of people, especially me This has rigid body physics perfect for car games, well most games that require any type of physics. If it can't be done then I will be very surprised.


http://opende.sourceforge.net/
Nigel
23
Years of Service
User Offline
Joined: 15th Apr 2003
Location:
Posted: 26th May 2003 12:41 Edited at: 26th May 2003 12:49
Yes this would be very much appreciated!!

MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 26th May 2003 12:52
The problem is we dont have direct access to the 3D format, which, until then we cant implement a physics system - although IanM's module will be able to call the native commands in C

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 26th May 2003 13:11
Hubdule did some work on this library at the end of last year.

He didn't use a TPCDLL though, he worked out how to do it all using the old LOAD DLL/CALL DLL commands.

Try to contact him, and ask.
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 26th May 2003 15:21
you could do it with IanM's Interface... setup a DBpro function to pass the model numbers, you could then use the memblocks to get the data you need (even in native FVF format for DirectX coding) then use that.

its how i've been getting the data for Karma, only problem really is the latency timings - but i'm sure after some optimisation and rethinking of the structures you could get that down low enough.
i mean remember the interface allows you to use DBpro's functions as if you were using DBpro itself, and when the program is running you can use the global structure to retrieve the core data the functions need to work as DBpro uses them with the same data

though that physics system uses OpenGL stuff, so i'm not entirely sure how you'd get that.

failing using the interface you can always do a runtime memblock that loads all the major data and then setup a pointer table to each instance ... you load the memblocks main pointer and load all the data in a form that the DLL will read and instantly you can get the information you need by storing it all within VertexBuffer arrays

probably a few more ways to achieve getting the data and then passing it back in that case would probably be just the task of a memory pointer but you get the idea.

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th May 2003 02:05
Lovely ... another plug for my Interface library

One of the reasons I didn't have a go at this in the first place, is that I didn't understand it, and didn't have time to understand it.

Unfortunately, the situation hasn't changed much

It's designed to *not* rely on any particular graphics library - it's purely a physics library. It doesn't even really need my stuff.

Also, this library (as far as I can remember) uses the LGPL, which effectively boils down to you either having to ship your source with it, shipping your object files with your release, or building the library as an external DLL. The user has to be able to update the library at will - that's LGPL for you!

This is a place that blitz is ahead - they have had an interface to this library for a long time.
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 27th May 2003 15:13
Surely it requires access to the (example) .X data format in order to manipulate the graphics...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 27th May 2003 15:27
i've got the source now, gonna take a look later tonite ... interesting its by the same guy who developed the origina Karma instruction set - wonder how similar they really are

but your right Toady i'd expect it to need atleast the current vertex buffer data for the possible faces

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
Cpt Caveman
23
Years of Service
User Offline
Joined: 29th Aug 2002
Location: New Zealand
Posted: 28th May 2003 10:57 Edited at: 28th May 2003 10:57
If nothing can be done is there anyone who wants to collaberate in making a physics library for all to use, so we can show those blitz3d people what DBpro can really do. By the way Im absolutely useless at physics so the "we" means "people besides me"
TeJero
23
Years of Service
User Offline
Joined: 21st Feb 2003
Location: Unknown planet south of Earth
Posted: 28th May 2003 11:00
As I said beore, I dont think its possible yet...

Good news everyone! I really am THAT good...
http://www.google.com for great searches - oh my, yes!
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 28th May 2003 15:49
Thats me again...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 28th May 2003 20:28
well we've not said it can't be done... just that there isn't really anyone with the freetime and knowlage to try.
i mean your welcome to, but it might be a pain to get around certain setups

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
Codingallmylife
23
Years of Service
User Offline
Joined: 22nd May 2003
Location:
Posted: 28th May 2003 20:32
Wrong again. you don't want to convert it at all. the part people want is the physics. the physics are simple a set of mathematical caculations to determine how the car acts. the rest of the code is to aplly these effects. all you have to do is extract the physics then use the curent DBpro comands to act out these effects on your car model you don't want to convert it straiht because how wants some one else interface and models in there game. we just simple want to create our own car games and use the physics so we get things like skiding round coners.
unless of course you are talking about a different thing this is how i see it.
as for car physics i have a of easy to understand tutorial and C++ code for car physics which can be made straight into a libary for DBpro. if any one wants it

Programmers don't program because they can program but because they like too program
Codingallmylife
23
Years of Service
User Offline
Joined: 22nd May 2003
Location:
Posted: 28th May 2003 20:36
not meaning to brag but if people want one i and a friend will make a physics module. we can creat the physics and put it into a libary. but it will really only be a function as we don't know how to write in comands or enough of C++. if any body wants us to work on it then please say so. i ahve already created a car game i DB and have good physics so i will take it from there and convert it but i need to know if people want this done.

Programmers don't program because they can program but because they like too program
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 28th May 2003 23:01
Convert away...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Cpt Caveman
23
Years of Service
User Offline
Joined: 29th Aug 2002
Location: New Zealand
Posted: 28th May 2003 23:13
If someone can do it then go right ahead
Codingallmylife
23
Years of Service
User Offline
Joined: 22nd May 2003
Location:
Posted: 29th May 2003 13:12
okay ill start but you might have to wait because im am a bit busy for the next 2 weeks so ill tell you how far we get in 3 weeks untill then well c.

Programmers don't program because they can program but because they like too program
Eddie Gordo
23
Years of Service
User Offline
Joined: 14th Jan 2003
Location: Ohio - USA
Posted: 30th May 2003 02:21
Explain this to me you want a C source file that controls DX object automatically?
im lost

Artifact Basic-5%
Epic Crossings RPG-25%
Codingallmylife
23
Years of Service
User Offline
Joined: 22nd May 2003
Location:
Posted: 30th May 2003 13:27
no we create a C++ libary file that plugs into Dbpro. itll probaly have 3 comands. one to inistalise the calculation with variables about weight of car. then itl return 2 values of how far the car will move round its x and z cordenate and angle of the car. bellow is an example of how your source code might look.

Programmers don't program because they can program but because they like too program
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 31st May 2003 00:30
you seem to have missed the point in the physics engine, perhaps it is a misnomer... but what it actually means really is physics AND collision interaction.

any baffoon can pickup a physics book and create mathematical phsyics on an object based on real world data, the point in the physic engine is to use that data to interact realistically with every other object in the scene with the properties based around it.
the point put across before about not getting the data needed into the DLL for this action was actually one of the biggest problems with creating an interface to a current physics engine.

and yes i mean interface not conversion

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
Codingallmylife
23
Years of Service
User Offline
Joined: 22nd May 2003
Location:
Posted: 31st May 2003 14:05
ahh i c i think im got it the wrong end of the conversation. i think on it and then tell you what i think

Programmers don't program because they can program but because they like too program
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 31st May 2003 14:29
... or you could do what I've done. Get onto Amazon and there are some very nice 3D physics and computing books which give you formulae and principles. Its quite easy to take the parts that work for you and apply them to your own physics engine which is optimised for your program and only does what you need doing.

It's all still pretty useless without proper working free flight rotation though. I can get a car to flip and role and tumble realistically, but only directly along the z-axis, otherwise it all goes tits up. As soon as you change the y-rotation from zero, it all begins to look very wrong.

Machine: P4 2200, 1GB RAM, GeForce4 64MB, Audigy Platinum
http://www.kontact-kru.com for my own personal drum'n'bass creations.
Coming soon: http://www.breakbeat-terrorism.co.uk
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 31st May 2003 21:18
yeah a real Shifting Centre of Graivity in the engine is quite hard, kinda why i'm using a premade physics engine rather than working on my own ... saves alot of time too

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 31st May 2003 22:09
Does it actually modify the 3D graphics ?

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 31st May 2003 22:14
you mean add stuff like Soft Body Dynamics for cloth?
if so then yes
there ain't no way in hell i wanna code that in DBP including collision

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 31st May 2003 22:26 Edited at: 31st May 2003 22:27
I meant does it modify the actually 3D structure (ie modifying the DBO data) ? This is why I feel a physics library can't be done (because we dont know the format of DBO and thus cant modify much internally).

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 1st Jun 2003 02:34
nope doesn't edit any 3D data... what it does is it'll take buffered data from the objects you want to interact and then output the value changes.

for what i'm doing are 3 versions of the interface minimum, extended & advanced.

minimum will be stuff like:

Set Karma On Object [object]
Set Karma Gravity [X],[Y],[Z] | [vector3]
Set Karma Object Dynamics [object],[dynamic type],[weight],[flex]
Set Karma Object Collision [object],[object2]

the extended interface will include stuff like:

Set Karma Dynamics On [object]
Set Karma Collision On [object]
return pointer=Get Karma Object Memblock( [object] )
return float=Karma Object Vertex [X/Y/Z/W]( [object],[vertex] )

and the Advanced will be stuff like
Set Karma Air Density [float]
return vector3=Karma Object Normal Force [object]
return dword=Karma.MaxBodiesCount :// #include "karma.inc.dba"
retrun vector3=Karma Object Gravity Force [object]

the hope is to extend on dbp with similar syntax to allow people to understand its intergration. personally i hope that the new IDE will have better inclusion similar to that of VSIDE

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
Cpt Caveman
23
Years of Service
User Offline
Joined: 29th Aug 2002
Location: New Zealand
Posted: 1st Jun 2003 02:48
Raven:- Am I right in reading you are trying to integrate the Karma Engine into Dark Basic so that its library can be used
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 1st Jun 2003 03:03
yup... but the keyword in that sentace is trying i do have some basics already working, just some simple collision and gravity.
see if i can't show something interesting soon,

what i'm worried about is licensing it though - i mean i want the community to have this for free as a plugin, but i'm not sure if an interface plugin would be considered a single title. have a feeling i have some email to write

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
Nigel
23
Years of Service
User Offline
Joined: 15th Apr 2003
Location:
Posted: 1st Jun 2003 13:27
Raven: Why dont you try the ODE pshysics package?, then you wont have to worry about any licensing issues?
If you can get karma to work surely ODE will too?

Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 1st Jun 2003 15:37
i've not checked out ODE much yet, but i'd have to actually write the entire interface for that rather than just paser the current interface for DBP use.
that and i have about a years experience using Karma 1.2.1 already - i'll probably get around to checking it out but for now i want to stick with Karma

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
Cpt Caveman
23
Years of Service
User Offline
Joined: 29th Aug 2002
Location: New Zealand
Posted: 3rd Jun 2003 12:46
Question for Raven or anyone who may know,

If someone did manage to incorporate a commercial library into DBPro, and a game was made that was good enough to be published(I mean true commercial quality, unlike most crap these days) and a big publisher like EA or Activision saw it/was sent it and thought "that will make us millions", would they/do they have connections/licenses to allow use of commercial libraries in their titles, or does each developer have to pay for the license themselves??
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 3rd Jun 2003 14:54
Well if the Library is given away free, then it is a good chance that the developer hasn't paid for the License fee, so you or your publisher would no doubt have to cough up the money.
if you are charged for it, then it's a good bet that unless the company is retailing illegally that they've already purchased the license meaning you don't have to worry about it.

There is a certain amount of trust about these things though because alot of libraries you can get free yet they cost to license, and if you don't fully follow up by asking for each library you use then you could be in real trouble down the line.
thankfully using DirectX or OpenGL as graphic libraries you don't have this kinda Licensing scheme, DirectX makes its money from being packaged with Windows & OpenGL isn't really developed by a single entity rather its a bit like Linux and everyone add thier own bit for thier cards.

(i know you're not using either Dx or Ogl they're just good examples)

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
Kjelle
23
Years of Service
User Offline
Joined: 29th Sep 2002
Location:
Posted: 13th Jun 2003 17:51
How is the work with the physics engine going ?
Kjelle
23
Years of Service
User Offline
Joined: 29th Sep 2002
Location:
Posted: 13th Jun 2003 18:21 Edited at: 13th Jun 2003 18:22
Rigid Body physics, a very interesting theme !!
Kjelle
23
Years of Service
User Offline
Joined: 29th Sep 2002
Location:
Posted: 13th Jun 2003 18:21
I found this interesting summary concerning physics engines on the web:

http://www.cs.rpi.edu/~trink/sim_packages.html
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 13th Jun 2003 18:41
slowly .. i'm working on like 3-4 plugins at once, this will mean they're all out at the same time, but does mean they go slow - especially as the people that are helping me don't seem to ever seem to make themselves available.

a moot point but is really pissing me off how people say they'll help me and then just f**k off not tell me why, i mean if they're gonna help they should help if they're not then why say they will ya know ... i just end up over stretched and over stressed as a result meaning that it takes 3-4x as long for everyone too see results.
sorry to offload but this has really been pissing me off, because i've being working on these plugins for a few months now here'n'there with people saying they'll help and i've still not had the time to help Sam out with something i promised him because people just keep flaking on me and i'm getting bloody sick of.

wouldn't believe how stressed i am right now working on 4 seperate plugins + 2 games what seems to be all by myself because of these people. Even worse are the ones that say they'll help and then wait 6years for me to produce something to start something themselves, even though what they have to work on has bugger all to do with what i'm suppose to be so what the hell they wait for i don't know.
I give them all the materials they need and still come up with bugger all ...
:: rubs his temples :: "Calm blue oceans - Calm blue oceans..."

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 13th Jun 2003 20:35
Its best to do everything yourself, I'm afraid...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!

Login to post a reply

Server time is: 2026-07-17 19:33:06
Your offset time is: 2026-07-17 19:33:06