This may sound funny but I feel games would lose a lot of fun if they were all written in rust and had classes of bugs just not available to them. For better or for worse quirks and bugs in games have shaped how people approach games, and also have given games charm for decades.

Rust only prevents types of bugs where the game crashes because of invalid memory access, or exploits.

Since when are Rust programs unexploitable..

They aren't obviously, but iirc around 70% of vulnerabilities in Chrome and Windows have been memory safety bugs.

Nah it prevents all kinds of bugs that exploit things like integer overflows, invalid values, etc.

Obviously gameplay bugs are still possible in Rust, but many of them are not.

> ...that exploit things like integer overflows...

AFAIK Rust doesn't check for integer overflow in release builds, so that would still be exploitable.

Rust doesn't check for integer overflow in release builds by default (ignoring the explicitly-checked methods, of course). At least when building with Cargo whoever builds the binary sets overflow behavior.

Fortunately for gamers, Rust doesn't do anything to stop physics engines from going haywire or preventing players from clipping out of bounds. A Mario 64 written in Rust still has parallel universes (well, assuming that you carefully translated the out-of-range float-to-short cast as having modulo semantics, an operation which doesn't have any defined semantics in C).

Rust does, however, kill Missingno. No thanks.

To be pedantic, even being written in C would have killed Missingno. Pokemon Red/Blue were written in raw assembly.

C doesn't bounds check arrays. A C compiler is perfectly capable of producing the same machine code as an assembler when given a loop that writes bytes to an array and then keeps writing beyond the space allocated for the array.

Missingno wasn't the result of an array overrun, it was due to data in a set of registers (which had temporarily been used to store a string) being arbitrarily reinterpreted as structured data governing which pokemon were allowed to be encountered. It more closely resembles a compiler miscompilation than a typical logic bug that you'd encounter in a C program. An idiomatic C implementation of Pokemon Red/Blue (ignoring hardware limitations, which is of course why it was written in assembly in the first place) would have used a static array to hold the per-area pokemon encounter table, and would have used a global variable to hold the index into this array representing the player's currently-loaded encounter zone; at no point would the static encounter array have been overwritten by a string temporary (which, in our C implementation, is just a function local variable on the stack), and at no point would the global location index be overwritten with garbage, because just like in the original game it only gets updated when we load a zone where wild pokemon can be encountered (which means that surfing on the side of Cinnabar Island would result in encounters drawing from whatever encounter zone we had most recently visited).