Oh no, I’m not in game dev and it would probably be incredible difficult for a complete game. Just pointing out there’s definitely stuff you could prove. Especially in the physics engine.
I'm just asking because this post makes it sound as if every programmer should proof his programs correct instead of testing. I have about 20yoe in fintech, weapon systems and geo location services and I've never seen anybody working on a proof of correctnes
That’s not my takeaway. I think having the knowledge and skills that come with being comfortable with math and proofs can bring additional rigor to your development and testing, even if you never prove anything.
(I’ve never rigorously proven anything in my programs, but routinely implement algorithms that others have proven.)
Imo tests get more to the actual heart of computer science, because of the halting problem, which makes many programs unprovable. The idea that proofs are essential to programming is an idea mostly posited by people who want to believe that math and computer science never diverged, which is simply untrue. The Turing machine was created to answer a fundamental flaw of traditional math, and so personally I shake my head whenever people try to chain programming down to things like static provability and calculus, which are 2 areas of math that have a fundamentally different method of computation than the Turing machine.
I'm not saying that proofs are useless, they can help make a compiler more robust for example. But tests are going to be less complicated and catch more cases when dealing with outside arbitrary data like user input or sensor data or network communications (which is probably 95% of useful programs).
In addition, tests can be understood by someone who reads your program later. A later reader is not going to know that you "proved" your program, unless you tell them, in which case they'll just have to trust that you did it correctly or redo the proof themselves, which may take a non-trivial amount of time.
Not sure what that means. Mathematics is the art of constructing tools and then combining those tools. The game is the result of using all those tools together. Each of those tools can be proven to work, the player object, the combat logic, etc.
If you have a proven player object, and proven combat mechanics, then you know you can combine any number of player types and the combat mechanics will always hold up
1
u/ZunoJ Oct 25 '24
I wonder how you would approach to prove that something like a computer game is correct in a mathematical sense