|
2 registered members (Grant, AndrewAMD),
911
guests, and 9
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Off-Screen Physics Processing
#340072
08/31/10 16:28
08/31/10 16:28
|
Joined: Jul 2010
Posts: 13
Zergling103
OP
Newbie
|
OP
Newbie
Joined: Jul 2010
Posts: 13
|
Hi.
I'm working on a game that requires unique usage of the physics engine in order to work. Here is one example:
Normally, the physics engine makes one simulation step per frame. But the project I'm working on demands more flexibility than this. I need to have the physics engine save states (a state is a complete description of the position, velocity, etc. of every physics object), restore states, and perform any number of physics simulation steps per frame, all of which according to a script or DLL.
Here is a simple scenario: Suppose you wanted to simulate a physics object. You'd have a green cube, and a blue cube. The green cube is a normal physics object, but the blue cube represents where the green cube will be N frames into the future.
When programmed successfully, here are some things you'd see: - The green cube's movement would generally match that of the blue cube. - If the blue cube came to a stop, the green cube would come to a stop and land in the exact same position as the blue cube. - If the user altered the green cube's trajectory, perhaps by pushing it in mid-flight, the blue cube would suddenly move to compensate for the new trajectory.
Here is how it would be programmed: For each frame: The physics engine would simulate the green cube, at state X, for N steps and then go back to it's original state X. The position of the green cube after N steps would be where the blue cube will be rendered.
Lite-C is evaluated on the fly, which makes it slower than a pre-compiled DLL. Therefore I'd need this sort of flexibility for DLL-based behaviors, not just for Lite-C.
Is this possible? Please let me know anything you'd think is helpful.
Thanks,
Steve
Last edited by Zergling103; 08/31/10 17:11.
|
|
|
Re: Off-Screen Physics Processing
[Re: Zergling103]
#340073
08/31/10 16:47
08/31/10 16:47
|
Joined: Nov 2007
Posts: 2,568 Germany, BW, Stuttgart
MasterQ32
Expert
|
Expert
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
|
i think you can do this with A8, because you can calculate your physics with PhysX i don't know how, but it should work Lite-C is evaluated on the fly, which makes it slower than a pre-compiled DLL i don't think so, Lite-C is also compiled and no interpreter language
|
|
|
Re: Off-Screen Physics Processing
[Re: MasterQ32]
#340075
08/31/10 17:18
08/31/10 17:18
|
Joined: Jul 2010
Posts: 13
Zergling103
OP
Newbie
|
OP
Newbie
Joined: Jul 2010
Posts: 13
|
Lite-C is also compiled and no interpreter language So it is compiled into binary instructions, in other words? I need clarity on this issue since this is a fairly intensive project programming wise, and I need to make sure I start working with the right language. I'll look through the forums myself, but I'd appreciate input if anyone has any.
|
|
|
Re: Off-Screen Physics Processing
[Re: Damocles_]
#340222
09/01/10 23:04
09/01/10 23:04
|
Joined: Jul 2010
Posts: 13
Zergling103
OP
Newbie
|
OP
Newbie
Joined: Jul 2010
Posts: 13
|
You could also use the C++ SDK to run the engine. I'm planning on using Visual Studio 08 for this. I'm still not 100% sure on how I'd go about doing this but so far it seems fairly clear.
Last edited by Zergling103; 09/01/10 23:05.
|
|
|
Re: Off-Screen Physics Processing
[Re: Zergling103]
#340566
09/05/10 16:52
09/05/10 16:52
|
Joined: Jul 2009
Posts: 1,198 Berlin, Germany
Liamissimo
Serious User
|
Serious User
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
|
But how would you do this? I mean there are endless possibilites with a physic object. I mean, if you drag the object that is existing in the real time, not the future one: How should the future one move? It doesn't know if you drag it around for a few seconds or if you let it drop, so there are endless ways, how should you future object should now what is going to happen? Or maybe I dont get the point 
"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen." -JCL, 2011
|
|
|
Re: Off-Screen Physics Processing
[Re: Liamissimo]
#340585
09/05/10 20:58
09/05/10 20:58
|
Joined: Apr 2008
Posts: 650
Sajeth
User
|
User
Joined: Apr 2008
Posts: 650
|
its for the user to see whats going to happen if he leaves everything as is, I guess. propably some sort of prediction stuff
Teleschrott-Fan.
|
|
|
|