Page 2 of 3

Re: How does Spring make Deterministic Physics?

Posted: 09 Feb 2015, 19:20
by jpthek9
Oh, that's too bad. I'll look into using fixed point math but I can't seem to find a good library in C#.

Re: How does Spring make Deterministic Physics?

Posted: 09 Feb 2015, 19:59
by Super Mario
May I ask on what your trying to do?

Re: How does Spring make Deterministic Physics?

Posted: 09 Feb 2015, 20:25
by jpthek9
I'm making a deterministic physics engine for my RTS game.

Re: How does Spring make Deterministic Physics?

Posted: 10 Feb 2015, 00:58
by smoth
jpthek9 wrote:Determinism is if the same input is replayed, the same result comes out so the command can be sent instead of positions, as abma suggested.
Why would the spring physics NOT be deterministic by your definition. even debris is synced because the debris causes damage. I am not sure if what you mean. or all physics synced among all players, sure or is it something else?

Re: How does Spring make Deterministic Physics?

Posted: 10 Feb 2015, 01:57
by jpthek9
I never said it wasn't. That's why I'm modeling my deterministic engine after Spring's. All the physics will be synced among players which is why I need the same calculations across all platforms. Unfortunately, fixed point math libraries are hard to come by and streflop has no port to C# I can find. I think I'll end up just using decimals for everything. The performance might take a hit but the engine is very bare bones so I don't think it'll be a big deal.

Re: How does Spring make Deterministic Physics?

Posted: 10 Feb 2015, 02:19
by smoth
Ah, I get it, sorry, see when you posted in game development, I assumed you were looking to develop a game in spring. My bad.

Re: How does Spring make Deterministic Physics?

Posted: 10 Feb 2015, 02:27
by jpthek9
No problem. You guys've been a great help :). I've actually considered using Spring but the thing I want above all is customizability and control over my project so I had to take a different route.

Re: How does Spring make Deterministic Physics?

Posted: 10 Feb 2015, 02:46
by smoth
you could always fork the engine but sometimes working from scratch is better.

Re: How does Spring make Deterministic Physics?

Posted: 10 Feb 2015, 03:30
by jpthek9
I think I'll try to create most of the parts from scratch but if there's ever something I hit a wall with, I know I have a great example to look towards.

Re: How does Spring make Deterministic Physics?

Posted: 10 Feb 2015, 03:33
by gajop
jpthek9 wrote:I think I'll try to create most of the parts from scratch but if there's ever something I hit a wall with, I know I have a great example to look towards.
We'll still be here when you realize the magnitude of what needs to be done and give up on your own thing in favor of Spring.
We're a caring bunch like that :twisted:

Re: How does Spring make Deterministic Physics?

Posted: 10 Feb 2015, 03:37
by jpthek9
gajop wrote:
jpthek9 wrote:I think I'll try to create most of the parts from scratch but if there's ever something I hit a wall with, I know I have a great example to look towards.
We'll still be here when you realize the magnitude of what needs to be done and give up on your own thing in favor of Spring.
We're a caring bunch like that :twisted:
Thanks xD
Most of the work is already done by the Unity3D engine. The networking was pretty straight forward as there wasn't any damn math imprecision in it.

Re: How does Spring make Deterministic Physics?

Posted: 11 Feb 2015, 02:24
by Super Mario
Hey c# for game code(for spring) sounds great! That something that I will support one.

Re: How does Spring make Deterministic Physics?

Posted: 11 Feb 2015, 11:52
by Anarchid
"make a fork that uses C# as game logic language instead of lua"

Re: How does Spring make Deterministic Physics?

Posted: 11 Feb 2015, 21:57
by Super Mario
Anarchid wrote:"make a fork that uses C# as game logic language instead of lua"
There no need to make a fork, as there is nothing preventing spring from having multiple language wrappers.

Re: How does Spring make Deterministic Physics?

Posted: 11 Feb 2015, 22:01
by abma
@Super Mario:

nobody here was talking about changing spring to use C# instead lua. read the first post again:
viewtopic.php?p=565921#p565921 its about a new/foreign engine.

Re: How does Spring make Deterministic Physics?

Posted: 11 Feb 2015, 22:09
by Super Mario
abma wrote:@Super Mario:

nobody here was talking about changing spring to use C# instead lua. read the first post again:
viewtopic.php?p=565921#p565921 its about a new/foreign engine.
Then Anarchid should be a little more specific on what he meant by "forking" without quoting anyone.

Re: How does Spring make Deterministic Physics?

Posted: 11 Feb 2015, 22:13
by abma
it was sarcasm...

-> back to topic

Re: How does Spring make Deterministic Physics?

Posted: 11 Feb 2015, 22:16
by PicassoCT
Well.. it is horrible... but the truth is- to get determinism from a computer- you need to sacrifice a cat.

So at the heart of spring - is the buildserver, which is connected to a animal farm.
Everything goes to false or dominant zero, if a cat dies.

Re: How does Spring make Deterministic Physics?

Posted: 11 Feb 2015, 22:38
by Anarchid
Then Anarchid should be a little more specific on what he meant by "forking" without quoting anyone.
I was actually talking about forking because running a Lua environment together with a .net environment while also staying cross platform might possibly be a bit hard and a bit expensive.

Re: How does Spring make Deterministic Physics?

Posted: 11 Feb 2015, 22:49
by jpthek9
PicassoCT wrote:Well.. it is horrible... but the truth is- to get determinism from a computer- you need to sacrifice a cat.

So at the heart of spring - is the buildserver, which is connected to a animal farm.
Everything goes to false or dominant zero, if a cat dies.
The God of Determinism must be pleased for him to shed his favor on game. On a serious, I made a type that's deterministic with rounding. In case anyone wants to check it out, here it is: https://www.dropbox.com/s/sd30muyx916v17v/Mathd.cs?dl=0