3 ms·
This code is surprisingly readable. For a Gameboy Advance, I expected piles of assembler. Many years ago, early in my career, I implemented a Minesweeper clon
by kogus 3y ago
This code is surprisingly readable. For a Gameboy Advance, I expected piles of assembler. Many years ago, early in my career, I implemented a Minesweeper clone in Delphi. It's still there, a testament to how terrible code can be, and how much fun it is anyway:
https://sourceforge.net/projects/delphisweeper/files/delphisweeper/version1.5.1/ https://sourceforge.net/projects/delphisweeper/files/delphis...
- twaw 3y agoYou can rewrite the code and add a "Russian mode", when a cleared area will be remined again after a random period of time.
- Frictus 3y agoSo now you could rewrite it for the gba with very high level libraries like for exemple Butano in C++ (no assembly, no registers) : https://gbadev.net/getting-started.html#high-level-development https://gbadev.net/getting-started.html#high-level-developme...
- akdas 3y agoAll things considered, the GBA is a pretty powerful machine. Running an ARM processor is helpful too, as high-level language compilers that output high-quality ARM code are common. It's for this reason the GBA is one of my favorite machines, since it hits that sweet spot between simplicity and power. It's the Gameboy and the NES, running a Z80-style and a 6502-style processor respectively, that typically need more hand-holding from manually written assembly code. It's not just the processor but the lack of hardware features (such as lacking multiple background layers, the relatively low number of sprites that can be on screen at a time, etc.) that result in squeezing out extra performance to overcome these limitations in creative ways. Compare that to the minesweeper game just rendering all the board cells as sprites!