5 ms·
Doomgeneric: Make porting Doom easier
- ggerganov 4y agoGreat project! I used it to create a Twitter bot that posts Doom videos (@tweet2doom). Back then it didn't have sound support, but it is great to see that it supports it now. Edit: I just realised it uses the modifications that I made for my bot to support SDL audio :) Funny thing is, I took these from some other Doom project - ah, the joys of open-source!
- Waterluvian 4y agoSo kind of like having a D-Machine then?
- nielsbot 4y agoIn the vein of a Z-Machine or SCUMM? My first thought was also: why not run it in a VM? (I guess providing a Doom HAL like this allows one to remove the real time interpreter...)
- qbasic_forever 4y agoThe zdoom/gzdoom port has a ton of programmability including the original ACS (action code script) from Hexen and a newer scripting language called zscript. It's basically a fully scriptable doom engine--enemies/actors, events in the level, etc. can all do custom stuff.
- lightedman 4y agoThe current epitome of this currently being Complex Doom Invasion.
- AnIdiotOnTheNet 4y agoMan I really hope the spec for those functions is fleshed out somewhere else to actually-useful detail. I didn't see anything at a cursory glance. What format is the frame buffer in? What kind of "key events" need to be passed?
- deathanatos 4y ago> I didn't see anything at a cursory glance. > What format is the frame buffer in? It's a pointer to a screen-sized number of u32s. I'd hazard a guess that it's either RGBA or ABGR, and if you render one and everything looks wrong, it's the other. (Where the A channel is unused, as it's a framebuffer.) Certainly not fool-proof and vulnerable to endian swaps if you somehow ended up on a big endian device. But this is also a port-doom-to-my-toaster level thing?
- rzzzt 4y agoThe SDL code snippet on the last screenshot says SDL_PIXELFORMAT_RGB888, which is in XRGB order (not a 24-bit format, that would be RGB24).
- schemescape 4y agoQuick, open a PR to add this documentation ;)
- slj 4y agoWouldn’t be too hard to check out the existing implementations already using doomgeneric and write them for your own requirements!!
- anyfoo 4y agoThis is one of those things where if you actually plan to port DOOM, you will figure it out pretty quickly on your own, by just glancing at the actual code. It's pretty common at that level to "just read the source", or to at least look how others use the interface.
- anthk 4y agohttps://freedoom.github.io https://freedoom.github.io Free as in freeDooM data.
- genpfault 4y ago> Ported platforms include Windows, X11, SDL, Soso. "Soso"? EDIT: This[1] I guess? [1]: https://github.com/ozkl/soso https://github.com/ozkl/soso
- rzzzt 4y agoSerenityOS as well: https://youtu.be/a0P_bB6wjhY https://youtu.be/a0P_bB6wjhY
- deleted 4y ago[deleted]
- morcheeba 4y agoyep, same author: https://github.com/ozkl?tab=repositories https://github.com/ozkl?tab=repositories
- ozkl 4y agoDev here. When I was trying to port doom to my OS soso, I tried to keep it generic and doomgeneric was born!
- eatonphil 4y agoI noticed this project also today. From zserge's latest post: https://zserge.com/posts/fenster/ https://zserge.com/posts/fenster/. He uses it along with a minimal cross-platform graphics library to get doom running. Really impressive.
- TheDudeMan 4y agoDoom is the new Hello World.
- dleslie 4y agoStrange, they left in platform-specific code: https://github.com/ozkl/doomgeneric/blob/bec8ced5887df55b818f5da1a01f32a7c7d89e49/doomgeneric/d_iwad.c#L78-L144 https://github.com/ozkl/doomgeneric/blob/bec8ced5887df55b818... Why not strip that out? And it leads me to wondering what sort of gotchas are throughout, and what basic system assumptions are being made. Ie, it's a little surprising that math routines aren't stubbed out, as well.
- deleted 4y ago[deleted]
- tadfisher 4y agoThat code comes from Chocolate Doom, itself a project to create a portable "vanilla" Doom engine.
- flohofwoe 4y agoJust because it's inside an platform-ifdef doesn't mean it's not useful in a cross-platform application. That code would only be active when built on Windows and provide some optional functionality that probably isn't worth writing a cross-platform abstraction layer for (especially since this is accessing the Windows registry, which doesn't have an equivalent on other platforms).
- kreelman 4y agoThis is a great idea. It would be even better if there was a Makefile for the Linux/BSD folk. Might be able to open the .sln in VS Code though? Thanks for putting this together. I like the comment lower down Doom is the new 'Hello World!!'
- deleted 4y ago[deleted]
- LukeShu 4y agoThere is, in the 'doomgeneric/' directory.
- flohofwoe 4y agoI started my DOOM port to the cross-platform sokol headers (https://floooh.github.io/doom-sokol/ https://floooh.github.io/doom-sokol/) from doomgeneric which was helpful at first, but since I had to 'slice' the various modal loops in Doom in order to make it work in a frame-callback app model (mainly for WASM without Emscripten's ASYNCIFY) it wasn't all that helpful in the end unfortunately since I had to rip out the original frame loop anyway. My porting notes for anyone interested: https://github.com/floooh/doom-sokol#porting-notes https://github.com/floooh/doom-sokol#porting-notes
- smcl 4y agoI clicked around your Github profile. You've implemented heaps of cool wee projects! I particularly linked "tinyemus" :D edit: maybe I should actually link the page in case people think you're trying to create a smaller pet-sized Emu through selective breeding: https://floooh.github.io/tiny8bit https://floooh.github.io/tiny8bit
- a3f 4y agoI had used Doomgeneric as basis for bareDOOM; DOOM running within the barebox bootloader. Back then there was no sound, but it was fun adding support for PWM PC speakers. If curious, here's the online demo: https://www.barebox.org/jsbarebox/?graphic=1 https://www.barebox.org/jsbarebox/?graphic=1
- jiffygist 4y agoThere's a game called Anarch, that has a similar API for porting. It also provides functions for handling mouse, sound and save/load. https://news.ycombinator.com/item?id=25168549 https://news.ycombinator.com/item?id=25168549
- ozkl 4y agoDev here! I've just realized that you shared this. Thanks for sharing doomgeneric!