5 ms·
respectfully you haven’t written enough games > real game turn-based and real-time games have different kinds of complexity, so a platformer won’t expose you
by ape_key 3y ago
respectfully you haven’t written enough games
> real game
turn-based and real-time games have different kinds of complexity, so a platformer won’t expose you to all of it.
turn-based games are roughly going to give you an easier time separating the game code, but the UI code is going to feel like a debilitating slog.
> Many games are 100% deterministic
Until you use floating points, networking, or different platforms.
This is more likely to be true in turn-based games, and super unlikely in anything real-time and multiplayer.
Most games like that periodically sync state instead of relying on applying actions on each client
- amelius 3y agoAre you saying that IEEE 754 floating point (which everybody is using) is not deterministic?
- politician 3y agoYou have to be careful with comparisons. In JavaScript, for instance, `(0.1 + 0.2) != (0.3)`.
- amelius 3y agoWell that doesn't make it non-deterministic in behavior.
- ape_key 3y ago(a+b)-a doesn’t always equal (a-a)+b It’s different behavior if the order of operations are non-deterministic. Plenty of room for such things in games. Most of the time the effects are too small to notice. They can chaos-theory out of control, though. So real time games nearly universally sync state instead of relying on deterministic synchronization via events/actions. For a good read, look up lockstep deterministic networking. There’s way too much nuance here to be so dismissive
- bowsamic 3y agoChaotic behaviour is deterministic
- ape_key 3y agoWeird how I write complete thoughts and supply references but this site full of tech geniuses mostly produces downvotes and single-sentence drivebys. Come back when you have things worth contributing.
- bowsamic 3y agoI’m a theoretical physicist, not a tech genius. Perhaps that’s the mode matching problem here. I don’t trust your 23 hour old account though :)
- thaumasiotes 3y ago> I don’t trust your 23 hour old account though :) This might explain why you aren't a genius. He's not saying anything that hasn't been featured on HN before. This is a popular article: https://www.gamedeveloper.com/programming/1500-archers-on-a-28-8-network-programming-in-age-of-empires-and-beyond https://www.gamedeveloper.com/programming/1500-archers-on-a-... It details how Age of Empires decided to make the game deterministic, how this had significant benefits, and how it's extremely difficult to do: > At first take it might seem that getting two pieces of identical code to run the same should be fairly easy and straightforward -- not so. The Microsoft product manager, Tim Znamenacek, told Mark early on, "In every project, there is one stubborn bug that goes all the way to the wire -- I think out-of-sync is going to be it." He was right. The difficulty with finding out-of-sync errors is that very subtle differences would multiply over time. A deer slightly out of alignment when the random map was created would forage slightly differently -- and minutes later a villager would path a tiny bit off, or miss with his spear and take home no meat. Do you think you look good by announcing that, since you don't know the subject you're discussing, you're not going to trust someone who does?
- deleted 3y ago[deleted]
- 10000truths 3y agoSimple operations like addition and multiplication are generally bit-for-bit deterministic, even across different architectures. More complex operations like fused multiply-add can have slightly different rounding behavior. But the big issue is with the more complicated operations, like trigonometric functions or non-integer exponentiation. Those often have differing implementations between platforms, and the only way to guarantee determinism is to essentially roll your own sin/cos/tan/sqrt/etc.
- o11c 3y agoFor 32-bit x86 it's certainly not. The C standard permits intermediates to preserve excess precision, and the only way to avoid that is by flushing to memory, which is slow. On Windows you usually get 64-bit intermediates and on other OSes usually 80-bit. 64-bit x86 and modern non-x86 architectures are usually deterministic for primitive operations at least, but libm differences abound.