frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Show HN: I recreated 90s Mode X demoscene effects in JavaScript and Canvas

https://jdfio.com/pages-output/demos/x-mode/
94•gneissguise•4h ago
After 25 years of writing software, I was feeling nostalgic for the kinds of things that got me into programming in the first place: the old DOS demoscene. I spent a weekend seeing if I could recapture some of that INT 13H VGA magic using today's web tech, but with the old-school constraints of doing it from scratch.

The result is this portfolio of ten classic effects running in a single HTML file. It's all vanilla JavaScript writing to a <canvas> element, with no external libraries. It was a fun challenge to implement things like:

* The color palette cycling and smooth fading in the Plasma demo. * The buffer-averaging algorithm for the Fire effect to make the flames feel more natural. * The distance-based texture crossfading in the Tunnel to create the illusion of flying through different sections. * A 2D scalar field for the Metaballs to calculate the surface normals for that classic blended, metallic look (I did the best I could with the given constraints).

It was a great exercise in getting back to first principles and a reminder of how much those early demo programmers could accomplish with so little. I hope it brings back some good memories for others who grew up with this stuff.

I'd love to hear about your favorite classic demos or if there are any other iconic effects you think would be a fun challenge to add.

Cheers!

Comments

pentaphobe•3h ago
Neat! The nostalgia is palpable.

Off topic: we always referred to mode-x variants as MCGA, TIL that's more of a colloquial term than a technically accurate one [1]

[1]: https://en.m.wikipedia.org/wiki/Multi-Color_Graphics_Array

gneissguise•1h ago
Thanks for sharing, I do not believe that I was familiar with that term at the time.
guiambros•3h ago
wow, well done! Pretty solid implementation, genuinely Future Crew-worthy :)
gneissguise•1h ago
w00t! Greetz!!!1
pengaru•2h ago
Neat, but beyond the 320x240 resolution I don't have the impression you're really emulating anything uniquely mode-X here (not that it would really make sense to do so)
gneissguise•1h ago
You would be correct, it's more the appearance of the demoscene than the actual underlying mechanism.

A true in browser mode-x API would take me much longer than a weekend to implement.. But it does sound like a neat challenge!

juhanakristian•2h ago
Well done! These look very authentic. I remember creating the fire and plasma effects when I was first learning how to code in the late 90s.
gneissguise•1h ago
Oh yes, I have similar memories mixing asm and pascal together in Turbo Pascal to get interesting results!!
KingOfCoders•1h ago
More like 80s Amiga effects :-)
gneissguise•1h ago
I could see that too.

I didn't own an Amiga but a friend of mine from school did. We had a blast playing Gobliiins!

dr_dshiv•1h ago
Thanks for putting this together!

I’ve been thinking a lot about demoscene in a Vibecoding era. Demoscene was often very close to the metal; Vibecoding is often completely abstracted from it.

To explore this tension, I’m cohosting an 8bit game design workshop (pico8) in Amsterdam this summer. Just for fun.

Working with intense constraints can bring a lot of creativity. I really want to see how AI affects the workshop vibe.

gneissguise•1h ago
It was my pleasure to work on and share, glad you liked it!
elpocko•1h ago
>very close to the metal

>(pico8)

But PICO-8 with its integrated tools and Lua programming is super high level, pretty far removed from "8bit". It's only 8 bit in aesthetics, entirely artificial and forced. Why not write games for the 2600, the C64 or the NES to experience real constraints of an actual 8 bit platform, the actual "metal."

kookamamie•1h ago
Nice. Except that Mode X was not usually called 13h. The former would be 320x240 and the latter 320x200. Technically X would be a variant of the 13h, though.
ale42•1h ago
And actually, INT 13h is the BIOS interrupt to access block-based disk I/O functions (like sector read, track format, etc.). The INT used for mode-setting is 10h (with AH=00h and AL=13h as mode for 320x200 at 256 colors).
gneissguise•1h ago
Thank you both for the corrections, I was a teen in the 90s so I could have had it wrong or misremembered.

I just looked up the 13h interrupt and you are absolutely right!

QuiCasseRien•1h ago
thank for make me back to 25 years ago with the star windows screensaver ^^
gneissguise•1h ago
Anytime! I was also trying to add a Star Wars like hyperspace feature to the starfield demo but I failed miserably at implementing it!
abrookewood•1h ago
Thank you - takes me back :)
gneissguise•1h ago
You're welcome, it's my pleasure to share with ya!
luismedel•1h ago
Nice. But if I remember correctly, Mode X was a special VGA mode to squeeze a bit more performance (due to planes and full graphics memory addressing), not the "normal" MCGA 320x200x256 (13h)

If you're interested, I also implemented a few effects like lens[0] and Jare's fire[1] along with some other amusements[2]

[0] https://toys.luismedel.com/lens/index.html

[1] https://toys.luismedel.com/fire/index.html

[2] https://github.com/luismedel/js-toys

gneissguise•1h ago
Thanks for sharing the link! I remember the lense demos, and I remember downloading one or two of them from a BBS that had NSFW pictures rendered in the background.
rareitem•59m ago
Amazing, I was not born in that era but it makes me feel nostalgic too. How does on go on to learn to make animations like this?
gneissguise•45m ago
Start off small, you gotta know your underlying API. For this demo it's JavaScript and the HTML5 canvas API (which is MUCH easier to learn than the languages of the 90s except for BASIC)

https://www.freecodecamp.org/news/drawing-on-a-canvas-elemen...

From there, you'll need a good understanding of loops, control flow, data structures like arrays to store the pixels, lines, shapes, and colors, wiping and redrawing the screen between "ticks" (a single pass of the main loop), and refresh timing to control the speed of the animations.

On a side note there's actually a refresh bug in my plasma demo I just noticed a moment ago... if you leave it open for too long on plasma it starts redrawing faster and faster until it looks like glitch-art!

rollulus•13m ago
Good job. Looks authentic. But you forgot the rotozoom!
gneissguise•7m ago
D'oh! Now that I'm in my mid 40s there's so much I've forgotten!

Thank you for the reminder

leptons•4m ago
You should check out dwitter.net if you have not already.

NexusMods Changes Hands

https://www.nexusmods.com/news/15301
2•gmemstr•9m ago•0 comments

Mysterious Radio Signal Detected from Underneath Antarctic Ice

https://in.mashable.com/science/95768/mysterious-radio-signal-detected-from-underneath-antarctic-ice-puzzles-scientists
2•Bluestein•12m ago•0 comments

Show HN: Efficient `Torch.cdist` Using Triton

https://github.com/jinensetpal/triton_cdist
1•codeinassembly•12m ago•0 comments

Show HN: Swagger-mcp-server – expose your OpenAPI APIs to LLMs

https://github.com/gulbaki/swagger-mcp-server
2•bakigul•13m ago•0 comments

48GB RTX 8000 vs. 3090s for Local LLMs

https://www.hardware-corner.net/guides/quadro-rtx-8000-for-llm/
2•pietrushnic•17m ago•0 comments

Enhance Any Text on Mac with AI – Works in All Apps

https://rewrait.com
1•acaor•19m ago•0 comments

Show HN: Team Decision Making Masterclass

https://www.teamdecisionmaking.com/
2•altras•26m ago•0 comments

Turning Your Database into an MCP Server with Auth

https://zenstack.dev/blog/database-to-mcp
1•carlual•28m ago•0 comments

Anthropic's SHADE-Arena: Evaluating sabotage and monitoring in LLM agents

https://www.anthropic.com/research/shade-arena-sabotage-monitoring
1•thoughtpeddler•30m ago•0 comments

Accumulation of Cognitive Debt When Using an AI Assistant for Essay Writing Task

https://www.brainonllm.com/
32•bayindirh•32m ago•6 comments

Show HN: Struggling with complex legacy systems? Learn to rebuild your systems

https://xwiki.com/en/webinars/How-HLS-modernized-with-XWiki
1•lorinab•33m ago•0 comments

Show HN: A video walkthrough of my astrophotography galaxy processing workflow

https://www.youtube.com/watch?v=ufSRJh4lIWI
1•karlperera•34m ago•0 comments

AI Photo Sketch – Free Online Sketch Generator

https://aiphotosketch.com/
1•Yuan0918•37m ago•1 comments

The History of the Word "Ciao"

https://italyexplained.com/the-history-of-the-word-ciao-why-you-shouldnt-say-it-in-italy/
1•EbNar•38m ago•1 comments

Encrypted email now available to all Infomaniak users

https://news.infomaniak.com/en/email-encryption/
1•pm-security•38m ago•0 comments

Brain Cells Tune to Multiple Rhythms Like a Neural Radio

https://neurosciencenews.com/hippocampus-neuron-rhythm-29277/
1•isaacfrond•39m ago•0 comments

Show HN: API Driven Email Checker

https://github.com/profullstack/mcp-server/tree/master/mcp_modules/email_checker
1•cranberryturkey•40m ago•1 comments

A real fixed-point decimal crate in Rust

https://github.com/WuBingzheng/primitive_fixed_point_decimal
1•hellowub•41m ago•1 comments

Gist of Go: Race Conditions

https://antonz.org/go-concurrency/race-conditions/
1•rednafi•43m ago•0 comments

Vibetunnel

https://vibetunnel.sh
2•manmal•44m ago•0 comments

Show HN: Md2card

https://www.md2card.online
1•jsonchao•48m ago•2 comments

Spoolytics – AI-powered filament tracker for 3D print farms

https://spoolytics.com/
1•LukasKrupa•49m ago•1 comments

Trump's T1 Mobile off to a rocky start with messy pre-orders

https://www.neowin.net/news/report-trumps-t1-mobile-off-to-a-rocky-start-with-messy-pre-orders/
1•bundie•50m ago•0 comments

Do programming languages deliver on their promises? [video]

https://www.youtube.com/watch?v=V8sACAhg4vM
1•skruger•51m ago•0 comments

Email marketing project that gained 3k stars in one week

https://github.com/aaPanel/BillionMail
1•aapanel•54m ago•1 comments

"Deliver value daily" – A one-principle manifesto for agile software development

https://delivervaluedaily.dev/
1•michalc•55m ago•0 comments

Benchmark for Evaluating Text Embeddings

https://huggingface.co/spaces/embedding-benchmark/RTEB
1•fzliu•56m ago•0 comments

Fossify – A suite of open-source, ad-free apps

https://github.com/FossifyOrg
2•jalict•59m ago•0 comments

Only allows you to text in caps

https://timesofindia.indiatimes.com/world/us/only-allows-you-to-text-in-caps-donald-trump-launches-mobile-phones-social-media-reacts/articleshow/121897021.cms
1•01-_-•1h ago•0 comments

Introduction to the A* Algorithm

https://www.redblobgames.com/pathfinding/a-star/introduction.html
3•auraham•1h ago•0 comments