NHacker Next on Rails
  • top
  • new
  • best
  • ask
  • show
  • jobs
login
GuidelinesFAQListsAPISecurityLegalApply to YCContact

Hacker News on Rails, powered by React on Rails Pro. Open the source on GitHub by ShakaCode.

Commit 06fc0df

Rendered at 09:05:15 GMT+0000 (Coordinated Universal Time) with Rails + React on Rails RSC.

C64 3D first person game written in assembly by an LLM (github.com)

119 points by cyril-crutches 13h ago | 45 comments

LogicFailsMe 10h ago
Probably in the training set...

https://en.wikipedia.org/wiki/Wayout

Lerc 10h ago
Possibly but I doubt there are any implementation details shared between them.

I found a clip of it online. https://www.youtube.com/watch?v=8tc0OOkQ_Rk&t=318

It's a much more expected c64 performance level.

qingcharles 10h ago
My first thought was Wayout as there were a number of pioneering 3D games on the 8-bit Atari computers back then.

It is heavily windowed, though:

https://www.youtube.com/watch?v=wWvF0_6DZiI

cmiles74 6h ago
Reminded me of Tunnel Runner for the Atari 2600.

https://youtu.be/Mhtr6wvHmxQ?is=4PhkUt5nFmBz5Shp

jchamp 6h ago
Indeed, every 8-bit 3D game I played growing up was in my training set ;)
vunderba 12h ago
See also SquareDoom - an AI assisted port of Doom for the C64.

https://github.com/Kweepa/SquareDoom

JonathanFly 9h ago
There's also Quake for C64, including all shareware levels https://www.youtube.com/watch?v=1Qyk-lacG8E

https://kweepa.itch.io/quake64

qingcharles 10h ago
Video here:

https://www.youtube.com/watch?v=zELI0ql5Cas

e1ghtSpace 10h ago
I got a few levels in, and had a fun time. Quite a good game if I do say so myself.
mysterydip 13h ago
I had wondered for a while if it would be possible to do this with a carefully crafted character map and a text mode, but I never found time to check. Thanks for sharing!
Lerc 11h ago
I have a huge list of things in the back of my brain like that. Possibilities where the time investment to explore them vastly exceeds my lifetime budget.

Passing the ideas to a coding agent to do a lot of the grunt work has let me pull a few of those ideas off the stack for implementation.

There were a few sprite multiplexing ideas that I would have loved to have tried but they would have required keeping half a brain dedicated to managing the restrictions at all times. That has always been the big difference between demoscene works and games. A demo effect only needs to manage the conditions required for a set piece. A game has to either stick to one set of abilitiesband restrictions or dynamically adjust based upon the circumstances.

This is doable, but arduous. Mayhem in Monsterland was one of the best for putting in the effort required and the result showed the rewards.

I have been a little tempted to try an idea via coding agent on the c64 where even numbered scanlines had a scrollx of 0 and odd numbered scanlines had a scrollx of 7. So you have multicolour but alternating lines are half a multicolour pixel offset to break up the steps. Alternating scanlines get the colour attribute from the cell next door.

This gives you a bunch of restrictions on where pixel edges can be and what their colour options are. Utilised well,working within the restrictions, you can display more colourful images with less blockiness. You'd lose horizontal scrolling of course but vertical scrolling and paged games would be fine.

jchamp 6h ago
Yep. To get it right we sampled millions of views from a "perfect" JavaScript version of the maze, then whittled it down to the most common ~240 or so. It was a bit more complicated because we had to come up with an indexing system that described ramps at different angles and grid alignment, plus any steps and corners where walls ended, in a way that near misses got you to the right bucket.
neko_ranger 12h ago
esdf? what is this
afn 12h ago
I never understood wasd —- your fingers naturally rest on esdf!
aidenn0 3h ago
You want to have extra buttons you can press adjacent to the "arrows". You also want to be able to press them simultaneously with any of WASD without ghosting.

Even cheap PC keyboards pretty much guarantee shift and control working with each other and with other keys. Q/A/Z are somewhat less likely to work with ESDF.

zamadatix 11h ago
WASD rotates your hand so the thumb naturally rests over the spacebard and your pinky naturally rests near the shift/control/caps key and your ring finger is still given the leftmost column of letter keys to navigate.

On a C64 the spacebar is an extra row below, so WASD doesn't have as many advantages.

timbit42 10h ago
> On a C64 the spacebar is an extra row below

Wut?

zamadatix 7h ago
Oops - I meant to say "... row below the lower left corner key,".

Or perhaps, more sanely :) - "the lower leftmost key is a row higher than the spacebar, so".

tom_ 7h ago
I was wondering about this too.

Obviously the row thing is just nonsense, but: the C64 space bar looks like it might be mechanically mildly questionable. The rests are quite far in, so for best results you do possibly do need to be tapping it closer to the centre than you'd think. WASD might put your thumb in the right place to hit the key, but perhaps ESDF is better for getting actual good response.

mjuarez 11h ago
I was laughing out loud, because I had the same reaction, even though like a sibling comment says, esdf is naturally easier.
pjmlp 11h ago
Yep, the fifth generation of programming languages is taking place, regardless of how we feel about it in general.
aidenn0 3h ago
For those who do not get the reference: the fifth generation was "the future" in the 1980s where you just specify the constraints of the problem, and the language "solves" the constraints. Vibecoding meets the definition better than many of the attempts made when 5GL was all the buzz.

https://en.wikipedia.org/wiki/Programming_language_generatio...

lichenwarp 11h ago
Like when people say the language or framework doesn't matter as much anymore what do you mean by this?
pjmlp 10h ago
https://www.kevinkinnett.com/posts/fifth-generation-programi...
emkoemko 11h ago
no we are not going back to assembly, compilers solve a problem
pjmlp 10h ago
Who said otherwise?

https://www.kevinkinnett.com/posts/fifth-generation-programi...

radarsat1 10h ago
love the music in the demo video, was it also generated? sounds like not but I'm curious
jchamp 6h ago
Hi - game designer here! It's a combination of original work and generated. I came up with the chord progressions and sonic ideas myself, but GoatTracker (a powerful SID music utility) was much too hard for me to get used to, so I would feed detailed descriptions to Claude, who would make them into GoatTracker .sng files for the game.

So getting started on a song would be something like "Bass notes A, F, B♭, E on voice one, one note per measure with a short glide between notes. Use a pulse waveform at 80% duty cycle, run through a low pass filter with cutoff at $80. After one loop through the notes, add 1/8th note chord arpeggios with voice 2 using a triangle waveform" and then listening and tweaking from there.

elbistec24 8h ago
What madness lead you to use ESDF instead of WASD for movement controls
jchamp 6h ago
I aim to disorient.

Just kidding -- it's a longstanding crusade I've been on as a touch-typist. I dislkike having to slide my hand over to switch between coding and playtesting. Even back when I was a Counter-Strike guy I always remapped my keys to ESDF. It's a strange hill to die on, I admit.

elbistec24 5h ago
Very interesting! I can't get my "game playing" muscle memory to adapt to ESDF no matter how hard I try. My hand just instinctively repositions over WASD.
somewatson 12h ago
I'm trying to parse the title. What's the noteworthy thing here:

- C64 + 3D?

- 3D game in assembly?

- Assembly written by an LLM?

Like, I think these things are supposed to be impressive but then I click the link and look at the screenshot and I'm not really sure who this is for.

egypturnash 12h ago
"High-speed 3d maze on stock c64" is the impressive part, look at the video (https://www.youtube.com/watch?v=kMK4kG7PcVM) and compare it to, say, Way Out (Synapse, 1983) (https://www.youtube.com/watch?v=Y35euiYjxXE) with its much smaller display area and slower framerate.
cognitivegears 11h ago
Yeah having done some coding on the C64 I was super impressed by the frame rate, there must have been a lot of time (or, well, tokens anyway) on performance.

There were other full (or almost full) screen 3D games at least on other platforms, Dungeons of Daggorath for the CoCo for example, but not with that kind of free motion and smooth animation.

somewatson 12h ago
So it's a technical demo?
cyril-crutches 11h ago
My friend is the author. Passion project from a lover of C64.

He messaged me, “I spent four months of my sporadic downtime on this. Wild for an AI assisted project, yeah? Level design and playtesting was probably the most time consuming. And it’s only 10 levels!”

I think if it more like a small but complete game than a technical demo

jchamp 2h ago
It's a complete game. The technical aspects were a fun challenge, but 90% of my time went into level design and playtesting.
krige 11h ago
Comparing a 3 color maze with small sprites and no gameplay to a 1983 actual game is hardly impressive. Check out something modern like, say, Escape from PETSCII Planet https://www.youtube.com/watch?v=3RJ-9Eso1X4

Or Gates of the Ancient, a fast Elite-like game with 3D models https://www.youtube.com/watch?v=cHuUaDKT1uc

Or at least Stunt Car Racer https://www.youtube.com/watch?v=5Rdd1bCeNnI

But we should hold off comparisons and especially talking about speed until this project actually has something going on besides walking.

jchamp 6h ago
It's a completed game -- give it a try!

I looked around at a lot of 3D games on the c64 before starting. The PETSCII games were particularly impressive! However the things I noticed were they were all low resolution (< 160x200 mode), had a limited screen area (the rest HUD and chrome), or had slow frame rates (<10 fps). So I played around to see if the C64 could do better. When I saw it could, that was when the fun began, because then I got to design the game itself :)

cyril-crutches 11h ago
Passion project for a full-time father of four who loves the C64. For me, it’s for lovers of the C64 and those who like seeing what can be accomplished in places you wouldn’t normally expect. In included LLM in the title to defensively head off low value criticims. Also, it’s just fun! Try the the “play it in your browser” option if you haven’t tried it.
ilkkao 12h ago
The graphics are much better than those in any other C64 3D Wolfenstein clone attempt I've seen.
slowin 12h ago
Excellent. LLMs are going to unlock the latent ability of every piece of hardware (that still runs). Time to code and abstractions required for humans to reason (but adding layers of complexity and computation) can dissolve away when ever more powerful models can just rapidly write assembly/machine code.
svachalek 10h ago
Interestingly the C64 and machines of its generation were nothing like the timesinks that today's machines are when it comes to coding. You quite often did a project until it's all you could do with the resources available and then you were done. Most commercial games at the time were done by a single person, usually graphics and sound included.
deadbabe 9h ago
creepy ass game, I have real questions about the type of individual who would make this game
jchamp 2h ago
Have I been summoned?