3 ms·
Serious question: If I want to write small games in assembly code, such as minesweeper, solitaire and maybe simple 2d RPGs, which modern platform is the easies
by markus_zhang 2y ago
Serious question:
If I want to write small games in assembly code, such as minesweeper, solitaire and maybe simple 2d RPGs, which modern platform is the easiest to approach? Must be in assembly, not in C or other higher languages.
Candidates: Windows X64, Mac Mx ARM, others.
- einpoklum 2y agoOff-the-top-of-my-head answer: Either of vim and emacs (with appropriate variant + choice of add-ons of course) would probably work, because those have a lot of generic tools for programming language support: syntax highlighting, tagging, language server etc. It might not be as convenient (for many) as the graphic IDEs, but a lot of people swear by either one of these for higher-level languages.
- markus_zhang 2y agoSorry for the confusion, by saying platform I meant OS and architecture, not tools.
- imachine1980_ 2y agoI would recommend windows x86 or Linux x86 or arm/riscv (emulator ) Linux mostly because you probably have hundreds of resources instead of couple of them whit the other platforms
- AnotherGoodName 2y agoAbsolutely Windows. The win32 API is easy to use in assembly and is an easy one line call to createwindow. The message loop isn't hard to work with either. Lots of tutorials. eg. https://www.codeproject.com/Tips/1035362/Simple-Window-With-Assembly https://www.codeproject.com/Tips/1035362/Simple-Window-With-... I wouldn't go too far past that if your goal is to get the hang of it. SDL and the various GUI libraries abstract more away but the Win32 API is easy to work with and a good starting place. X11 has another layer of complexity as it works via sockets and that should be ruled right out. Having said all of the above i also wouldn't do it beyond learning. I've made my own game engines from scratch, i've written games in assembly, got them down to a few KB in size. No one plays them and i'd have to link to webarchive to find them. No one wants to play a very simply game that took a lot of effort to make that doesn't even work without emulation these days. It doesn't even look good on a resume. You know what i actually use for productivity these days? Unreal or Unity.
- markus_zhang 2y agoThanks! Yeah I believe Windows asm is probably my best bet as the UI part is also well integrated. This is just for learning purpose. I have a fetish about assembly language and want to use it as a daily drive for a certain project. Definitely not for work or anything money related!
- Kenji 2y ago[dead]
- favorited 2y agoI'm currently learning assembly programming for the original Nintendo Game Boy handheld. There is an actively maintained cross-platform toolchain[0] (a few actually, but I believe I'm using the most common one), and the instruction set is very simple (it's a subset of the Z80) so it's not overwhelming. The tooling is actually outstanding – from within VS Code I'm able to build my ROM, launch it in an emulator, and even remotely debug it using VS Code's debugger. I started by following along with a tutorial[1] where you follow along and build a couple games, then moved on to working on my own little project. It has been extremely fun and rewarding so far. [0]https://rgbds.gbdev.io https://rgbds.gbdev.io [1]https://gbdev.io/gb-asm-tutorial/ https://gbdev.io/gb-asm-tutorial/
- markus_zhang 2y agoThanks! It's definitely a very good target architecture. My case is a bit different as I'm learning to make a dynarec, so I need to learn client assembly which is x64 or arm, depending on which laptop I'm using :)
- Saigonautica 2y agoI enjoy AVR Assembly a lot. A big reason is that Atmel has very good datasheets. However if having an audience for your games matters, this is maybe a bad choice. On the other hand, if you would like to use LEDs, buttons, and sensors (or just like making physical hardware in general) it's very good fun. Another word of warning, I find Microchip Studio bloated and buggy. To the point where I'll code ASM in literally anything except that, then paste it in to simulate. Also there's a bug in the Atmel-ICE. One of the programming headers is soldered in upside down (or at least it is on mine). This is no problem if you buy the full cable assembly (where they reverse it again in the cable). However if you cheap out and buy the raw PCB only like I did, knowing this will save you a frustrating puzzle. Anyway these minor frustrations aside, its the main language I've always returned to when I want to make something just for the fun of it.