With Haxe, you can write the application once, target both win32 and linux by compiling to C++ (which then you compile using the platform specific tooling for each paltform), and then target html by compiling to javascript. Then use the same concatenation mechanism and header abuse as described in the article to have all three targets merged into one file that can then be run on all platforms!
This game is a single 13 KiB file that runs on Windows, Linux and in the Browser
51–60 of 93 posts
Re: This game is a single 13 KiB file that runs on Windows, Linux and in the Browser
#52Earlier quoted context omitted.
Hmm, Windows 11 25H2 here as well. Redbean works so there must be something about this particular approach combined with some unknown setting on my install. Edit: Got it working, was DEP.
What's DEP?
Re: This game is a single 13 KiB file that runs on Windows, Linux and in the Browser
#53Re: This game is a single 13 KiB file that runs on Windows, Linux and in the Browser
#54Reminds me of the Cosmopolitan project: https://github.com/jart/cosmopolitan
Re: This game is a single 13 KiB file that runs on Windows, Linux and in the Browser
#55Not cross-platform, but I'm reminded of the kkrieger game for Windows which was a 96k FPS game that looked visually impressive for the time. https://web.archive.org/web/20100304155706/http://www.thepro...
I wonder what kinds of modern games we could make with these same ideas.
Re: This game is a single 13 KiB file that runs on Windows, Linux and in the Browser
#56Re: This game is a single 13 KiB file that runs on Windows, Linux and in the Browser
#57I extracted the linux executable and was surprised to find that both readelf and objdump choke on it despite it loading and running correctly. Some investigation reveals that the name of the dynamic linker was shoved into the "unused" fields in the PT_DYNAMIC header entry to save space: Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align INTERP 0x0000000000000088 0x0000000000010088 0x00000000000…
saw some comments about DEP on windows and this and honestly i wouldnt touch this thing with a 10ft stick. if the creator want ppl to play it they can provide a normal binary. not some obfuscated mess.
Re: This game is a single 13 KiB file that runs on Windows, Linux and in the Browser
#58On a related note -- when I see the minuscule filesize of the original Zelda game on emulators, I marvel at how little text/code/information could produce how much wonder, how far-reaching impact, and how many hours of enchantment for me. https://en.wikipedia.org/wiki/The_Legend_of_Zelda_(video_gam...
Indeed, magic. How about the Commodore 64, there was a game (Eindeloos, Radarsoft, 1985) within 64kb that has a huge map. Someone recently (after 40 years!) extracted the map (500 screens) and the png alone is 800kb. See the story an zoom in and try finding the little heart in the map! https://adayinthelifeof.nl/2025/03/07/endless.html
Re: This game is a single 13 KiB file that runs on Windows, Linux and in the Browser
#59The binary relies on the runtime, so yes it is nice. Forma instance, a static compiled and linked "hello world" in C on Linux is around ~785KB
> a static compiled and linked "hello world" in C on Linux is around ~785KB Huh? $ musl-gcc -xc -static -Wl,-z,norelro -Wl,-z,nosectionheader -Wl,-z,noseparate-code -s - int main(void) { static const char s[] = "Hello, World!\n"; fwrite(s, (sizeof s)-1, 1, stdout); } eof $ ./a.out Hello, World! $ ls -l a.out -rwxr-xr-x 1 oguz oguz 4976 Jan 12 09:38 a.out And if that's not enough $ musl-gcc -xc -static -nostdlib -fcf-…
Re: This game is a single 13 KiB file that runs on Windows, Linux and in the Browser
#60The binary relies on the runtime, so yes it is nice. Forma instance, a static compiled and linked "hello world" in C on Linux is around ~785KB