videoAL Developmentcommunity - not Microsoftreviewed - checked by Opus

... but can it play DOOM? (In Business Central)

Erik Hougaard shows DOOM running in Business Central through a user control host page, with the game engine translated to about 45,321 lines of AL by a custom C2AL tool. JavaScript handles only WebGL rendering, music and input, and the frame rate is about 10 fps.

  1. 0:00 Playing DOOM in Business Central
  2. 4:45 Architecture overview and page structure
  3. 7:39 Controller and JavaScript implementation
  4. 10:50 DOOM engine ported to AL code
  5. 13:16 Data storage in tables and Doom AL code structure
  6. 15:48 JavaScript rendering and frame rate limitations
  7. 17:04 Doom gameplay demo with frame rate metrics
  8. 18:51 Code modifications and cheating in Doom
  9. 21:41 Second cheat implementation and damage immunity
  10. 23:48 C2AL tool for translating C code to AL
  11. 27:43 Direct code translation and AL output
  12. 28:42 Examining translated spawn missile function
  13. 29:55 Summary and game compatibility
video Erik Hougaard · 2026-10-12Watch on YouTube

Overview

The video demonstrates playing DOOM, DOOM 2 and shareware or registered versions inside Business Central. A page built as a user control host loads a JavaScript component of under 530 lines for WebGL rendering, SpinSynth MIDI music, keyboard and mouse input and CRT filters. The game logic itself is the Pure Doom engine translated function for function into AL. WAD files are deserialized into a table (ID 666), and save games are stored in tables.

Erik also shows editing the AL code to change A_FirePistol so it fires plasma missiles, adds cheats, and explains the C2AL tool. C2AL uses the Sick C compiler parser and a Python-based tool to convert C to AL. It works best when the C code has few dependencies. Generated code should not be edited by hand, and memory manipulation in C becomes integer lists in AL.

Key points

  • The DOOM page is a user control host. The game logic runs in AL, and JavaScript only renders frames, plays music and captures input.
  • The AL code is a line-for-line, function-for-function translation of Pure Doom, about 45,321 lines.
  • The frame rate is about 10 fps. The main bottleneck is the round-trip latency between JavaScript and Business Central.
  • WAD files must be embedded in the extension. Their content is stored in the Doom Bad Lump table (ID 666), and save games are also stored in tables.
  • Publishing AL changes took a couple of seconds. Erik changed A_FirePistol to fire plasma missiles and added a damage-immunity cheat.
  • C2AL translates C to AL via the Sick C compiler parser and a Python tool. It needs few dependencies and a custom header for standard library functions.
  • Games based on the original Doom engine work. Games based on enhanced Doom engine versions do not.

Features

Every feature below: status not stated, demoed.

Feature At
DOOM page user control 0:34
Pure Doom engine translated to AL 12:19
JavaScript-based rendering and input handling 8:26
WAD file storage in tables 5:17
Save game persistence 2:59
Code modification during runtime 18:51
C2AL code translation tool 23:48

AL objects mentioned

As heard in the captions. A name that matches one object page by exact type and name links to it; the others stay as named.

  • page “Doom page” at 4:56
  • other “user control host” at 5:06
  • table “Doom bad lump” at 13:29
  • codeunit “controller in” at 7:50
  • codeunit “A_FirePistol” at 19:34
  • codeunit “P underscore damage M object” at 21:54
  • other “P_spawn_missile” at 28:42
  • other “spawn_missile” at 29:02

Not found in BC28-30: page “Doom page”, table “Doom bad lump”, codeunit “controller in”, codeunit “A_FirePistol”, codeunit “P underscore damage M object”.

Quotes

  • 0:00 “whenever you have a computing platform, uh doesn’t matter if you if it’s your microwave or your car or your watch or your accounting”
  • 5:17 “all game assets, the maps, the sprites, the the sound, everything is stored in a bad file.”
  • 6:42 “Doom runs at 35 ticks per second.”
  • 10:31 “Well, Eric, you’ve just made Doom in in JavaScript. No, this is not.”
  • 12:31 “I took something called Pure Doom, which is a portable friendly um version of Doom. And and I’ll show you in a second how,”

Presenters (as heard): Eric.