Fake Fizziks with commercial edition (A6)

Posted By: I_M_FRUSTRATED

Fake Fizziks with commercial edition (A6) - 05/22/04 06:03

Is it possible to trick the A6 commercial edition into using more than one physics object (think I saw this somewhere but didn't get a chance to see how)?

if it is, i'll call it "Fake Fizziks"

just a yes or no question
Posted By: fastlane69

Re: Fake Fizziks with commercial edition (A6) - 05/22/04 06:14

If by "trick" you mean moving the one physics entity registration around and thus "tricking" the user to believe that more than one object has physics, then YES. I suspect you can't fake more than 5 or 6 objects using this method before it becomes unusable and it would be absolutely useless for contraints or wheels or any other kind of coordinated physics sim.
Posted By: qwerty823

Re: Fake Fizziks with commercial edition (A6) - 05/22/04 06:23

Yes, but you can't call it "Fake Fizziks". You can call it "Newton", and get it from here.
Posted By: I_M_FRUSTRATED

Re: Fake Fizziks with commercial edition (A6) - 05/22/04 06:24

ok that's good, because I have a game concept based on an unfinished book that would require more than one physics object. It would require "duplication" of a really nice flight physics law. Heres the back story so far:



In the year 2049, an 8 year old kid named Colin gets these things called "Arm Pax" for his 9th b-day, and so he decides to try them out in the middle of the night (even though his mom said not to), and as he progresses though the years, he gets better and better. But, he also has a few enemies...





So basically what i'm saying is the script needs to simulate jet-pack behavior (even though the things go on his arms ).

the reason why I need MULTIPLE physics objects is because the enemies have similar devices, so they need to be able to fly too . I was thinking about making a HUGE movement path for the enemies, but then they would be too predictable and boring.
Posted By: fastlane69

Re: Fake Fizziks with commercial edition (A6) - 05/22/04 07:49

Quote:

Yes, but you can't call it "Fake Fizziks". You can call it "Newton",




Apples and Oranges.
The Newton PE has nothing to do with 3DGS PE.
Fake Fizziks (to call it something) fakes multiple physics entities by shuffling the singular 3DGS commercial PE registration around.
While Newton is an excellent PE solution, I interpret IMFRUS's request as wanting to use his 3DGS PE to "fake fizziks"; 100% 3DGS all the way!

Quote:

the reason why I need MULTIPLE physics objects




Because of this I wouldn't bother with fake fizziks and I would jump into the A6 Pro PE or the free Newton PE.
Posted By: qwerty823

Re: Fake Fizziks with commercial edition (A6) - 05/22/04 10:04

Probably so. I think the "fake physics" he's thinking about is from the last AUM, which has a bug, since it was done with pro. Although you can fake it by alternating "who" gets the object each frame, but only one object per frame.

Like fastlane said, if you want more then one physics object, get newton, or get pro.
Posted By: I_M_FRUSTRATED

Re: Fake Fizziks with commercial edition (A6) - 05/22/04 12:24

so I guess from reading your posts "Newton" is better.

I'll take a look on the downloads page

Thankz


Posted By: Marco_Grubert

Re: Fake Fizziks with commercial edition (A6) - 05/22/04 14:16

Quote:

so I guess from reading your posts "Newton" is better.


Newton Game Dynamics and GameStudio PE offer similar features and are about equal performance-wise, the advantage of Newton Game Dynamics is that it is free (not sure under what license).
Posted By: ventilator

Re: Fake Fizziks with commercial edition (A6) - 05/22/04 20:59

the advantage of newton is its deterministic solver which makes simulations more robust compared to the other popular physics engines. the disadvantage of newton is that it isn't directly built into a6!

i think the standard ode solver is O(n*n*n) and newton is O(n*n) worst case so newton currently is faster aswell! there is a new ode solver in the works which is O(n) but i don't know how it will shape up stability-wise...
Posted By: I_M_FRUSTRATED

Re: Fake Fizziks with commercial edition (A6) - 05/23/04 01:18

I downloaded Newton Physics from the download page, and installed it. It has lots of .wdl and .mdl files, and a few pallettes (.pcx). I will need to read up on the manual (or my c-script tut) to know EXACTLY what to do with the .wdl files.

sorry i don't even know how to use the 3DGS template scripts

nvr mind, there are docs.

but the docs look like they're for A6 pro (newtonsplash.tga). aren't you only allowed to have the A6 splash screen on startup?
Posted By: PHeMoX

Re: Fake Fizziks with commercial edition (A6) - 05/23/04 03:30

Quote:

Probably so. I think the "fake physics" he's thinking about is from the last AUM, which has a bug, since it was done with pro. Although you can fake it by alternating "who" gets the object each frame, but only one object per frame.





Mmmm, so this mean it IS possible? Does anyone know how to switch this registration then, with using similar methods described in AUM? I thought actually that that's the bug in the AUM code !!?!?!! Haven't tried anything like this though, so...

Cheers
Posted By: qwerty823

Re: Fake Fizziks with commercial edition (A6) - 05/23/04 05:58

Well, the way George made the demo, he basically had the physics objects far enough apart that there would only be really one active at a time, but you could kind of do two at a time, by splitting the time for each entity between two (or more).

Kind of like this, I think:

Frame 1
Entity 1, gets physics, does its thing, releases physics
Entity 2, does nothing, or just uses ent_move

Frame 2
Entity 2, gets physics, does its thing, releases physics
Entity 1, does nothing, or just uses ent_move

Frame 3
Same as frame 1

Basically each entity is under physics control every other frame. This might work for some things, but would fail in some instances (like shooting a would be physics object in the frame that it wasn't under physics control). The more objects that you tried to split the time between, the worse it would be.
Posted By: I_M_FRUSTRATED

Re: Fake Fizziks with commercial edition (A6) - 05/23/04 06:06

I think that one physics object per frame can do wonders. If the game runs at 60 fps then that would be ideal for a fake physics engine. At 60 fps, one object would get the physics properties for one of those frames.



I get the picture, the user would think that the game ACTUALLY has a physics engine, when it's really one object per microsecond. This is because the human brain cant pick out what happens every microsecond of time, thus giving the illusion of a real physics engine. Sorry if I'm being too repetitive.

Just a theory
Posted By: fastlane69

Re: Fake Fizziks with commercial edition (A6) - 05/23/04 06:50

Quote:

i think the standard ode solver is O(n*n*n) and newton is O(n*n) worst case so newton currently is faster aswell! there is a new ode solver in the works which is O(n)




What does this mean? I scoured the newton site to get a fix on what their mehtodology and only found this, which sounds like what Ventilator is basing his quote on.
From the Newton Forums:

Quote:

Newton solver goes for acuracy rather than speed. The statistic order of the newton solver is best case linear O(N), worst case quadratic O(N*N). on average you get 0(N * log(N)). Where N is the number of restrited DOF.





I've done all manner of physics simulations and I admit my statistics are weak, but the above makes little sense to me. The Statistic Order is a SORTING techinique and those numbers somewhat represent diffrent how many diffrent comparasons are done until you get the result you were searching for. So I'm gathering they are sorting the DOF and then what, applying a physics update based on this sort? From my ignorance or their lack of facts, I just don't see where the claims of "accuracy" or "speed" are based on.

I've done runge-kutta integration, monte-carlo simulations, set up terabyte lattices, and even had a brief stint with quantum computing, but I've never done anything like a game physics engine, so the above I'm at a loss as to what the number above mean.

Long story short, I don't see how these arguments prove anything about speed since I don't understand how sorting and numerically integrating are related. I could make a million guesses related to matrices, taylor series expansion cut off, etc, but thats all PHysics and not game ODE, so could someone give me some insight as to what the above means?
Posted By: ventilator

Re: Fake Fizziks with commercial edition (A6) - 05/23/04 08:08

if i understand this correctly this O() stuff simply is a way of describing how an algorithm scales performance-wise.

for example:

O(n) means that 10 constraints will take 10 times longer to process than 1 constraint.

O(n*n) means that 10 constraints will take 100 times longer to process than 1 constraint.

i am not really a programmer or computer scientist so please correct me if i am wrong!
Posted By: qwerty823

Re: Fake Fizziks with commercial edition (A6) - 05/23/04 08:20

Quote:

if i understand this correctly this O() stuff simply is a way of describing how an algorithm scales performance-wise.

O(n) means that 10 constraints/contacts will take 10 times longer to process than 1 constraint/contact.

O(n*n) means that 10 constraints/contacts will take 100 times longer to process than 1 constraint/contact.

and so on. the worst algorithms are the ones which's performance scales exponentially.

i am not really a programmer or computer scientist so please correct me if i am wrong!




Pretty close definition. Here's a better one (with some more details):

http://en.wikipedia.org/wiki/Big_O_notation
Posted By: fastlane69

Re: Fake Fizziks with commercial edition (A6) - 05/23/04 09:17

Thank you, yes, I'm aware of the Big O notation (never knew to call it that though LOL) and like I said I could guess at it's usage. In the context I was familiar with, you classify the error of your calculations as O(h), where h is the stepsize of your numerical integrator. I think n-order runke-kutta has cuttoff errror on the Order O(h^(n+1)); hence I my initial confusion.

What I'm trying to get at is that sorting constraints is only one factor in a PE; thus how much faster one sorts than the other is one factor. The actual numerical algorythem's used are just as important when you want to compare one engines performance next to another.

All that aside, please note that on the Newton forums, they are quoted with going for "accuracy over speed", thus, wouldn't it be the 3DGS PE that is the overall faster beast??

Or is it? Like I said, I've never programmed a PE....
Posted By: ventilator

Re: Fake Fizziks with commercial edition (A6) - 05/23/04 09:32

currently most popular physics engines like tokamak, novodex, meqon,... seem to use linear time (O(n)) iterative solvers. compared to those newton is a bit slower but more robust (which is the more important thing with a physics engine in my opinion because it avoids lots of frustration)... ode currently uses an O(n*n*n) solver. i am sorry to say that but this solver isn't only much slower (do some simple stacking experiments) but this slowness also doesn't seem to have any stability advantages compared to the other engines (but there are other things like suboptimal collision detection which could make physics unstable)... as always i might talk nonsense!
Posted By: fastlane69

Re: Fake Fizziks with commercial edition (A6) - 05/23/04 10:38

Quote:

tokamak, novodex, meqon,... seem to use linear time (O(n)) iterative solvers



Quote:

compared to those newton is a bit slower but more robust



Quote:

ode currently uses an O(n*n*n) solver




So by your quotes, we have three diffrent "categories" of engines. Problem is I went to the tokamak, newton, and ode sites and can't for the life of me find ANY information that addresses the above.
Where are you getting this info from? I have not reason to doubt the above, I just can't seem to find ANYTHING like the above in any of the sources I'm looking at. Is it books or mags or what? I'd be interested in comparing the "guts" of all these free (and mostly open source) engines. I'm not looking forward to actually having to decipher this info from looking at the code....brrrrrr.....:(

I guess I'm looking for equations or something less code related and more as to HOW THEY DO THE PHYSICS and not just estimates. Saying that ODE uses an O(n^3) solver says nothing to me without some context or proof of where this comes from.
Posted By: ventilator

Re: Fake Fizziks with commercial edition (A6) - 05/23/04 10:59

for example i sometimes follow discussions about physics engines on several forums and mailinglists. read this post of the ODE author: http://q12.org/pipermail/ode/2004-May/012806.html

i know that such discussions aren't reliable sources but together with the conclusions i drew from my own experiments with several physics engines many of these things seem to make sense. if you do some stacking experiments you will see how fast you will bring a6's physics engine to its knees and that O(n^3) is plausible.
Posted By: fastlane69

Re: Fake Fizziks with commercial edition (A6) - 05/23/04 13:26

Ahhh, that looks meaty. Thanks!

Again, I have no reason to doubt that the 3DGS, ODE are slower than Newton; just want to know why.
Thanks again!

EDIT: Read it and interestingly enough, it's apperantly headed in the same O(n) direction Newton is supposedly already on...did I read that right?
Posted By: Marco_Grubert

Re: Fake Fizziks with commercial edition (A6) - 05/24/04 06:42

Quote:

EDIT: Read it and interestingly enough, it's apperantly headed in the same O(n) direction Newton is supposedly already on...did I read that right?


Hard to say, since Mr Jerez does not explain how his algorithm works, which IMO makes stability and accuracy claims somewhat dubious.
I am assuming that the O(n*log(n)) is number of total constraints thrown in and not number of constraints per island or something else. The other interesting thing to look at (and again, no documentation or source) would be behavior with near-singular matrices.
Here are some black box box stacking speed comparisons (please note that "Stepfast1" is currently in GameStudio Beta, Quickstep is scheduled for Fall 2004): http://q12.org/pipermail/ode/2004-May/012851.html

Some general information about ODE: http://ode.org/ode-0.039-userguide.html and the Stepfast1 explanation: http://ode.org/ode-0.039-userguide.html#ref58

Quote:

I get the picture, the user would think that the game ACTUALLY has a physics engine, when it's really one object per microsecond. This is because the human brain cant pick out what happens every microsecond of time, thus giving the illusion of a real physics engine. Sorry if I'm being too repetitive.



That was the idea behind George's code. However, it does not work thar way since the object's velocity is reset to 0 whenever you switch objects. That prevents continuous motion. A better way would be to switch objects once it no longer moves or at least have longer switching cycles.
Posted By: fastlane69

Re: Fake Fizziks with commercial edition (A6) - 05/24/04 06:52

Thanks for the links Marco. I had seen the manual, but was at a loss as to what was what. Thanks again, will check out.
Posted By: ventilator

Re: Fake Fizziks with commercial edition (A6) - 05/24/04 17:32

if i remember correctly i read a post by julio in which he stated that ngd has no problems with singular matrices. we don't know much about newton's internals but fact is that while working with it you will curse less than with other physics engines.

btw. -> http://www.physicsengine.com/forum/viewtopic.php?t=376&highlight=

...the other physics engines shouldn't call themselves rigid body dynamics but spongy body dynamics or something like that!
Posted By: Marco_Grubert

Re: Fake Fizziks with commercial edition (A6) - 05/25/04 04:26

Quote:

other physics engines shouldn't call themselves rigid body dynamics but spongy body dynamics or something like that!



So I take it the inital Newton demo has been fixed so that the alien no longer keeps bouncing on the floor and the fan doesn't explode when shooting at it repeatedly?

I am thinking about moving Newton Game Dynamics related posts to General Tools since technical questions are better answered in your forum ventilator and ideological statements don't aid in finding answers to GameStudio's physics engine here.
Posted By: Doug

Re: Fake Fizziks with commercial edition (A6) - 05/25/04 04:46

A physics question *I* can answer.

Quote:

but the docs look like they're for A6 pro (newtonsplash.tga). aren't you only allowed to have the A6 splash screen on startup?




You are required to have the A6 splash screen first (one second), after that you can show as many splash screens as you want.
Posted By: fastlane69

Re: Fake Fizziks with commercial edition (A6) - 05/25/04 04:54

LOL
When Doug steps in to start answering questions on SPLASHSCREEN is when the thread has all but fizzled out, eh?

Posted By: ventilator

Re: Fake Fizziks with commercial edition (A6) - 05/25/04 07:21

...i agree that newton related stuff belongs to the newton forum and i am sorry for the posts which contain too much silly badmouthing!
© 2024 lite-C Forums