Skip to main content
deleted 1382 characters in body
Source Link
jvn91173
  • 624
  • 1
  • 6
  • 10

I'm creating a physics game involving rigid bodies in which players move pieces and parts to solve a puzzle/map. A hugely important aspect of the game is that when players start a simulation, it runs the same everywhere, regardless of their operating system, processor, etc...

There is room for a lot of complexity, and simulations may run for a long time, so it's important that the physics engine is completely deterministic with regards to its floating point operations, otherwise a solution may appear to "solve" on one player's machine and "fail" on another.

How can I acieve this determinism in my game? I am willing to use a variety of frameworks and languages, including Javascript, C++, Java, Python, and C#.

I have been tempted by Box2D (C++) as well as its equivalents in other languages, as it seems to meet my needs, but it lacks floating point determinism, particularly with trigonometric functions.

The best option I've seen thus far has been Box2D's Java equivalent (JBox2D). It appears to make an attempt at floating point determinism by using StrictMath rather than Math for many operations, but it's unclear whether this engine will guarantee everything I need as I haven't built the game yet.

Is it possible to use or modify an existing engine to suit my needs? Or will I need to build an engine on my own?

EDIT: Skip the rest of this post if you don't care about why someone would need such precision. Individuals in comments and answers seem to believe I'm seeking after something I shouldn't, and as such, I'll further explain how the game is supposed to work.

The player is given a puzzle or level, which contains obstacles and a goal. Initially, a simulation is not running. They can then use pieces or tools provided to them to build a machine. Once they press start, the simulation begins and they can no longer edit their machine. If the machine solves the map, the player has beaten the level. Otherwise, they will have to press stop, alter their machine, and try again.

The reason everything needs to be deterministic is because I plan to produce code that will map every machine (a set of pieces and tools that attempts to solve a level) to an xml or json file by recording each piece's position, size, and rotation. It will then be possible for players to share solves (which are represented by these files) so that they can verify solves, learn from one another, hold competitions, collaborate, etc... Of course, most solves, particularly the simple or quick ones, won't be affected by a lack of determinism. But the slow or complex designs that solve really hard levels might, and those are the ones that will likely be the most interesting and worth sharing.

I'm creating a physics game involving rigid bodies in which players move pieces and parts to solve a puzzle/map. A hugely important aspect of the game is that when players start a simulation, it runs the same everywhere, regardless of their operating system, processor, etc...

There is room for a lot of complexity, and simulations may run for a long time, so it's important that the physics engine is completely deterministic with regards to its floating point operations, otherwise a solution may appear to "solve" on one player's machine and "fail" on another.

How can I acieve this determinism in my game? I am willing to use a variety of frameworks and languages, including Javascript, C++, Java, Python, and C#.

I have been tempted by Box2D (C++) as well as its equivalents in other languages, as it seems to meet my needs, but it lacks floating point determinism, particularly with trigonometric functions.

The best option I've seen thus far has been Box2D's Java equivalent (JBox2D). It appears to make an attempt at floating point determinism by using StrictMath rather than Math for many operations, but it's unclear whether this engine will guarantee everything I need as I haven't built the game yet.

Is it possible to use or modify an existing engine to suit my needs? Or will I need to build an engine on my own?

EDIT: Skip the rest of this post if you don't care about why someone would need such precision. Individuals in comments and answers seem to believe I'm seeking after something I shouldn't, and as such, I'll further explain how the game is supposed to work.

The player is given a puzzle or level, which contains obstacles and a goal. Initially, a simulation is not running. They can then use pieces or tools provided to them to build a machine. Once they press start, the simulation begins and they can no longer edit their machine. If the machine solves the map, the player has beaten the level. Otherwise, they will have to press stop, alter their machine, and try again.

The reason everything needs to be deterministic is because I plan to produce code that will map every machine (a set of pieces and tools that attempts to solve a level) to an xml or json file by recording each piece's position, size, and rotation. It will then be possible for players to share solves (which are represented by these files) so that they can verify solves, learn from one another, hold competitions, collaborate, etc... Of course, most solves, particularly the simple or quick ones, won't be affected by a lack of determinism. But the slow or complex designs that solve really hard levels might, and those are the ones that will likely be the most interesting and worth sharing.

I'm creating a physics game involving rigid bodies in which players move pieces and parts to solve a puzzle/map. A hugely important aspect of the game is that when players start a simulation, it runs the same everywhere, regardless of their operating system, processor, etc...

There is room for a lot of complexity, and simulations may run for a long time, so it's important that the physics engine is completely deterministic with regards to its floating point operations, otherwise a solution may appear to "solve" on one player's machine and "fail" on another.

How can I acieve this determinism in my game? I am willing to use a variety of frameworks and languages, including Javascript, C++, Java, Python, and C#.

I have been tempted by Box2D (C++) as well as its equivalents in other languages, as it seems to meet my needs, but it lacks floating point determinism, particularly with trigonometric functions.

The best option I've seen thus far has been Box2D's Java equivalent (JBox2D). It appears to make an attempt at floating point determinism by using StrictMath rather than Math for many operations, but it's unclear whether this engine will guarantee everything I need as I haven't built the game yet.

Is it possible to use or modify an existing engine to suit my needs? Or will I need to build an engine on my own?

deleted 1016 characters in body
Source Link
jvn91173
  • 624
  • 1
  • 6
  • 10

I'm creating a physics game involving rigid bodies in which players move pieces and parts to solve a puzzle/map. A hugely important aspect of the game is that when players start a simulation, it runs the same everywhere, regardless of their operating system, processor, etc...

There is room for a lot of complexity, and simulations may run for a long time, so it's important that the physics engine is completely deterministic with regards to its floating point operations, otherwise a solution may appear to "solve" on one player's machine and "fail" on another.

How can I acieve this determinism in my game? I am willing to use a variety of frameworks and languages, including Javascript, C++, Java, Python, and C#.

I have been tempted by Box2D (C++) as well as its equivalents in other languages, as it seems to meet my needs, but it lacks floating point determinism, particularly with trigonometric functions.

The best option I've seen thus far has been Box2D's Java equivalent (JBox2D). It appears to make an attempt at floating point determinism by using StrictMath rather than Math for many operations, but it's unclear whether this engine will guarantee everything I need as I haven't built the game yet.

Is it possible to use or modify an existing engine to suit my needs? Or will I need to build an engine on my own?

EDIT: Skip the rest of this post if you don't care about why someone would need such precision. ManyIndividuals in the comments and answers seem to believe I'm seeking after something I shouldn't, and as such, I'll further explain how the game is supposed to work. 

The player is given a puzzle or level, which contains obstacles and a goal. Initially, a simulation is not running. They can then use pieces or tools provided to them to build a machine. Once they press start, the simulation begins and they can no longer edit their machine. If the machine solves the map, the player has beaten the level. Otherwise, they will have to press stop, alter their machine, and try again.

The reason everything needs to be deterministic is because I plan to produce code that will map every machine (a set of pieces and tools that attempts to solve a level) to an xml or json file by recording each piece's position, size, and rotation. It will then be possible for players to share solves (which are represented by these files) so that they can verify solves, learn from one another, hold competitions, collaborate, etc... Of course, most solves, particularly the simple or quick ones, won't be affected by a lack of determinism. But the slow or complex designs that solve really hard levels might, and those are the ones that will likely be the most interesting and worth sharing.

Could this need for precision lead to instances where the game is tedious? Sure, but in other cases it won't be so bad, and will involve adjusting pieces until a good "launch angle" or "power level" is achieved.

If you're thinking of making an answer or comment aiming to convince me that I shouldn't do what I'm trying to do, please don't. My game is loosely based off another game that has similar needs, so I've already seen how this lack of determinism can play out in the real world. If you think there aren't games that would need this, then you haven't done any serious research; a couple examples have already been mentioned in this thread (see Contraption Maker). I don't have the time or space to delve into every aspect of how the game will work, so the community will have to trust me here and realize that it's a valuable discussion regardless of my specific game.

I'm creating a physics game involving rigid bodies in which players move pieces and parts to solve a puzzle/map. A hugely important aspect of the game is that when players start a simulation, it runs the same everywhere, regardless of their operating system, processor, etc...

There is room for a lot of complexity and simulations may run for a long time, so it's important that the physics engine is completely deterministic with regards to its floating point operations, otherwise a solution may appear to "solve" on one player's machine and "fail" on another.

How can I acieve this determinism in my game? I am willing to use a variety of frameworks and languages, including Javascript, C++, Java, Python, and C#.

I have been tempted by Box2D (C++) as well as its equivalents in other languages, as it seems to meet my needs, but it lacks floating point determinism, particularly with trigonometric functions.

The best option I've seen thus far has been Box2D's Java equivalent (JBox2D). It appears to make an attempt at floating point determinism by using StrictMath rather than Math for many operations, but it's unclear whether this engine will guarantee everything I need as I haven't built the game yet.

Is it possible to use or modify an existing engine to suit my needs? Or will I need to build an engine on my own?

EDIT: Skip the rest of this post if you don't care about why someone would need such precision. Many in the comments seem to believe I'm seeking after something I shouldn't, and as such I'll further explain how the game is supposed to work. The player is given a puzzle or level, which contains obstacles and a goal. Initially, a simulation is not running. They can then use pieces or tools provided to them to build a machine. Once they press start, the simulation begins and they can no longer edit their machine. If the machine solves the map, the player has beaten the level. Otherwise, they will have to press stop, alter their machine, and try again.

The reason everything needs to be deterministic is because I plan to produce code that will map every machine (a set of pieces and tools that attempts to solve a level) to an xml or json file by recording each piece's position, size, and rotation. It will then be possible for players to share solves (which are represented by these files) so that they can verify solves, learn from one another, hold competitions, collaborate, etc... Of course, most solves, particularly the simple or quick ones, won't be affected by a lack of determinism. But the slow or complex designs that solve really hard levels might, and those are the ones that will likely be the most interesting and worth sharing.

Could this need for precision lead to instances where the game is tedious? Sure, but in other cases it won't be so bad, and will involve adjusting pieces until a good "launch angle" or "power level" is achieved.

If you're thinking of making an answer or comment aiming to convince me that I shouldn't do what I'm trying to do, please don't. My game is loosely based off another game that has similar needs, so I've already seen how this lack of determinism can play out in the real world. If you think there aren't games that would need this, then you haven't done any serious research; a couple examples have already been mentioned in this thread (see Contraption Maker). I don't have the time or space to delve into every aspect of how the game will work, so the community will have to trust me here and realize that it's a valuable discussion regardless of my specific game.

I'm creating a physics game involving rigid bodies in which players move pieces and parts to solve a puzzle/map. A hugely important aspect of the game is that when players start a simulation, it runs the same everywhere, regardless of their operating system, processor, etc...

There is room for a lot of complexity, and simulations may run for a long time, so it's important that the physics engine is completely deterministic with regards to its floating point operations, otherwise a solution may appear to "solve" on one player's machine and "fail" on another.

How can I acieve this determinism in my game? I am willing to use a variety of frameworks and languages, including Javascript, C++, Java, Python, and C#.

I have been tempted by Box2D (C++) as well as its equivalents in other languages, as it seems to meet my needs, but it lacks floating point determinism, particularly with trigonometric functions.

The best option I've seen thus far has been Box2D's Java equivalent (JBox2D). It appears to make an attempt at floating point determinism by using StrictMath rather than Math for many operations, but it's unclear whether this engine will guarantee everything I need as I haven't built the game yet.

Is it possible to use or modify an existing engine to suit my needs? Or will I need to build an engine on my own?

EDIT: Skip the rest of this post if you don't care about why someone would need such precision. Individuals in comments and answers seem to believe I'm seeking after something I shouldn't, and as such, I'll further explain how the game is supposed to work. 

The player is given a puzzle or level, which contains obstacles and a goal. Initially, a simulation is not running. They can then use pieces or tools provided to them to build a machine. Once they press start, the simulation begins and they can no longer edit their machine. If the machine solves the map, the player has beaten the level. Otherwise, they will have to press stop, alter their machine, and try again.

The reason everything needs to be deterministic is because I plan to produce code that will map every machine (a set of pieces and tools that attempts to solve a level) to an xml or json file by recording each piece's position, size, and rotation. It will then be possible for players to share solves (which are represented by these files) so that they can verify solves, learn from one another, hold competitions, collaborate, etc... Of course, most solves, particularly the simple or quick ones, won't be affected by a lack of determinism. But the slow or complex designs that solve really hard levels might, and those are the ones that will likely be the most interesting and worth sharing.

Tweeted twitter.com/StackGameDev/status/1159298544060260354
Mod Moved Comments To Chat
added 2 characters in body
Source Link
jvn91173
  • 624
  • 1
  • 6
  • 10

I'm creating a physics game involving rigid bodies in which players move pieces and parts to solve a puzzle/map. A hugely important aspect of the game is that when players start a simulation, it runs the same everywhere, regardless of their operating system, processor, etc...

There is room for a lot of complexity and simulations may run for a long time, so it's important that the physics engine is completely deterministic with regards to its floating point operations, otherwise a solution may appear to "solve" on one player's machine and "fail" on another.

How can I acieve this determinism in my game? I am willing to use a variety of frameworks and languages, including Javascript, C++, Java, Python, and C#.

I have been tempted by Box2D (C++) as well as its equivalents in other languages, as it seems to meet my needs, but it lacks floating point determinism, particularly with trigonometric functions.

The best option I've seen thus far has been Box2D's Java equivalent (JBox2D). It appears to make an attempt at floating point determinism by using StrictMath rather than Math for many operations, but it's unclear whether this engine will guarantee everything I need as I haven't built the game yet.

Is it possible to use or modify an existing engine to suit my needs? Or will I need to build an engine on my own?

EDIT: Skip the rest of this post if you don't care about why someone would need such precision. Many in the comments seem to believe I'm seeking after something I shouldn't, and as such I'll further explain how the game is supposed to work. The player is given a puzzle or level, which contains obstacles and a goal. Initially, a simulation is not running. They can then use pieces or tools provided to them to build a machine. Once they press start, the simulation begins and they can no longer edit their machine. If the machine solves the map, the player has beaten the level. Otherwise, they will have to press stop, alter their machine, and try again.

The reason everything needs to be deterministic is because I plan to produce code that will map every machine (a set of pieces and tools that attempts to solve a level) to an xml or json file by recording each piece's position, size, and rotation. It will then be possible for players to share solves (which are represented by these files) so that they can verify solves, learn from one another, hold competitions, collaborate, etc... Of course, most solves, particularly the simple or quick ones, won't be affected by a lack of determinism. But the slow or complex designs that solve really hard levels might, and those are the ones that will likely be the most interesting and worth sharing.

Could this need for precision lead to instances where the game is tedious? Sure, but in other cases it won't be so bad, and will involve adjusting pieces until a good "launch angle" or "power level" is achieved.

If you're thinking of making an answer or comment aiming to convince me that I shouldn't do what I'm trying to do, please don't. My game is loosely based off another game that has similar needs, so I've already seen how this lack of determinism can play out in the real world. If you think there aren't games that would need this, then you haven't done any serious research; a couple examples have already been mentioned in this thread (see Contraption Maker). I don't have the time or space to delve into every aspect of how the game will work, so the community will have to trust me here and realize that it's a valuable discussion regardless of my specific game.

I'm creating a physics game involving rigid bodies in which players move pieces and parts to solve a puzzle/map. A hugely important aspect of the game is that when players start a simulation, it runs the same everywhere, regardless of their operating system, processor, etc...

There is room for a lot of complexity and simulations may run for a long time, so it's important that the physics engine is completely deterministic with regards to its floating point operations, otherwise a solution may appear to "solve" on one player's machine and "fail" on another.

How can I acieve this determinism in my game? I am willing to use a variety of frameworks and languages, including Javascript, C++, Java, Python, and C#.

I have been tempted by Box2D (C++) as well as its equivalents in other languages, as it seems to meet my needs, but it lacks floating point determinism, particularly with trigonometric functions.

The best option I've seen thus far has been Box2D's Java equivalent (JBox2D). It appears to make an attempt at floating point determinism by using StrictMath rather than Math for many operations, but it's unclear whether this engine will guarantee everything I need as I haven't built the game yet.

Is it possible to use or modify an existing engine to suit my needs? Or will I need to build an engine on my own?

EDIT: Skip the rest of this post if you don't care about why someone would need such precision. Many in the comments seem to believe I'm seeking after something I shouldn't, and as such I'll further explain how the game is supposed to work. The player is given a puzzle or level, which contains obstacles and a goal. Initially, a simulation is not running. They can then use pieces or tools provided to them to build a machine. Once they press start, the simulation begins and they can no longer edit their machine. If the machine solves the map, the player has beaten the level. Otherwise, they will have to press stop, alter their machine, and try again.

The reason everything needs to be deterministic is because I plan to produce code that will map every machine (a set of pieces and tools that attempts to solve a level) to an xml or json file by recording each piece's position, size, and rotation. It will then be possible for players to share solves (which are represented by these files) so that they can verify solves, learn from one another, hold competitions, collaborate, etc... Of course, most solves, particularly the simple or quick ones, won't be affected by a lack of determinism. But the slow or complex designs that solve really hard levels might, and those are the ones that will likely be the most interesting and worth sharing.

Could this need for precision lead to instances where the game is tedious? Sure, but in other cases it won't be so bad, and will involve adjusting pieces until a good "launch angle" or "power level" is achieved.

If you're thinking of making an answer or comment aiming to convince me that I shouldn't do what I'm trying to do, please don't. My game is loosely based off another game that has similar needs, so I've already seen how this lack of determinism can play out in the real world. If you think there aren't games that would need this, then you haven't done any serious research; a couple examples have already been mentioned in this thread (see Contraption Maker). I don't have the time or space to delve into every aspect of how the game will work, so the community will have to trust me here and realize that it's a valuable discussion regardless of my specific game.

I'm creating a physics game involving rigid bodies in which players move pieces and parts to solve a puzzle/map. A hugely important aspect of the game is that when players start a simulation, it runs the same everywhere, regardless of their operating system, processor, etc...

There is room for a lot of complexity and simulations may run for a long time, so it's important that the physics engine is completely deterministic with regards to its floating point operations, otherwise a solution may appear to "solve" on one player's machine and "fail" on another.

How can I acieve this determinism in my game? I am willing to use a variety of frameworks and languages, including Javascript, C++, Java, Python, and C#.

I have been tempted by Box2D (C++) as well as its equivalents in other languages, as it seems to meet my needs, but it lacks floating point determinism, particularly with trigonometric functions.

The best option I've seen thus far has been Box2D's Java equivalent (JBox2D). It appears to make an attempt at floating point determinism by using StrictMath rather than Math for many operations, but it's unclear whether this engine will guarantee everything I need as I haven't built the game yet.

Is it possible to use or modify an existing engine to suit my needs? Or will I need to build an engine on my own?

EDIT: Skip the rest of this post if you don't care about why someone would need such precision. Many in the comments seem to believe I'm seeking after something I shouldn't, and as such I'll further explain how the game is supposed to work. The player is given a puzzle or level, which contains obstacles and a goal. Initially, a simulation is not running. They can then use pieces or tools provided to them to build a machine. Once they press start, the simulation begins and they can no longer edit their machine. If the machine solves the map, the player has beaten the level. Otherwise, they will have to press stop, alter their machine, and try again.

The reason everything needs to be deterministic is because I plan to produce code that will map every machine (a set of pieces and tools that attempts to solve a level) to an xml or json file by recording each piece's position, size, and rotation. It will then be possible for players to share solves (which are represented by these files) so that they can verify solves, learn from one another, hold competitions, collaborate, etc... Of course, most solves, particularly the simple or quick ones, won't be affected by a lack of determinism. But the slow or complex designs that solve really hard levels might, and those are the ones that will likely be the most interesting and worth sharing.

Could this need for precision lead to instances where the game is tedious? Sure, but in other cases it won't be so bad, and will involve adjusting pieces until a good "launch angle" or "power level" is achieved.

If you're thinking of making an answer or comment aiming to convince me that I shouldn't do what I'm trying to do, please don't. My game is loosely based off another game that has similar needs, so I've already seen how this lack of determinism can play out in the real world. If you think there aren't games that would need this, then you haven't done any serious research; a couple examples have already been mentioned in this thread (see Contraption Maker). I don't have the time or space to delve into every aspect of how the game will work, so the community will have to trust me here and realize that it's a valuable discussion regardless of my specific game.

added 821 characters in body
Source Link
jvn91173
  • 624
  • 1
  • 6
  • 10
Loading
added 1072 characters in body
Source Link
jvn91173
  • 624
  • 1
  • 6
  • 10
Loading
Became Hot Network Question
added 483 characters in body
Source Link
jvn91173
  • 624
  • 1
  • 6
  • 10
Loading
"What library to use" is off-topic here, but "how can I achieve this end" is not, and can attract library suggestions.
Source Link
DMGregory
  • 140.8k
  • 23
  • 257
  • 401
Loading
Source Link
jvn91173
  • 624
  • 1
  • 6
  • 10
Loading