How does Spring make Deterministic Physics? - Page 2

How does Spring make Deterministic Physics?

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

jpthek9
Posts: 18
Joined: 07 Feb 2015, 23:30

Re: How does Spring make Deterministic Physics?

Post 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#.
Super Mario
Posts: 823
Joined: 21 Oct 2008, 02:54

Re: How does Spring make Deterministic Physics?

Post by Super Mario »

May I ask on what your trying to do?
jpthek9
Posts: 18
Joined: 07 Feb 2015, 23:30

Re: How does Spring make Deterministic Physics?

Post by jpthek9 »

I'm making a deterministic physics engine for my RTS game.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: How does Spring make Deterministic Physics?

Post 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?
jpthek9
Posts: 18
Joined: 07 Feb 2015, 23:30

Re: How does Spring make Deterministic Physics?

Post 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.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: How does Spring make Deterministic Physics?

Post 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.
jpthek9
Posts: 18
Joined: 07 Feb 2015, 23:30

Re: How does Spring make Deterministic Physics?

Post 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.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: How does Spring make Deterministic Physics?

Post by smoth »

you could always fork the engine but sometimes working from scratch is better.
jpthek9
Posts: 18
Joined: 07 Feb 2015, 23:30

Re: How does Spring make Deterministic Physics?

Post 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.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: How does Spring make Deterministic Physics?

Post 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:
jpthek9
Posts: 18
Joined: 07 Feb 2015, 23:30

Re: How does Spring make Deterministic Physics?

Post 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.
Super Mario
Posts: 823
Joined: 21 Oct 2008, 02:54

Re: How does Spring make Deterministic Physics?

Post by Super Mario »

Hey c# for game code(for spring) sounds great! That something that I will support one.
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: How does Spring make Deterministic Physics?

Post by Anarchid »

"make a fork that uses C# as game logic language instead of lua"
Super Mario
Posts: 823
Joined: 21 Oct 2008, 02:54

Re: How does Spring make Deterministic Physics?

Post 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.
Last edited by Super Mario on 11 Feb 2015, 22:07, edited 1 time in total.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: How does Spring make Deterministic Physics?

Post 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.
Super Mario
Posts: 823
Joined: 21 Oct 2008, 02:54

Re: How does Spring make Deterministic Physics?

Post 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.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: How does Spring make Deterministic Physics?

Post by abma »

it was sarcasm...

-> back to topic
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: How does Spring make Deterministic Physics?

Post 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.
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: How does Spring make Deterministic Physics?

Post 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.
jpthek9
Posts: 18
Joined: 07 Feb 2015, 23:30

Re: How does Spring make Deterministic Physics?

Post 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
Post Reply

Return to “Game Development”