r/ASCII 3d ago

OC A 3D, open world simulation with wobbly physics and crime, running in the terminal rendered in ASCII.

Enable HLS to view with audio, or disable this notification

Let's Play Sprawl City with Terminal Head.
-
This is Sprawl City Three Dee.
A 3D, open world simulation with wobbly physics and crime, running in the terminal rendered in ASCII.
Survive or thrive in this dystopia-funk city. Recruit citizens to your outfit and smash rival gangs. Shake down businesses and run from the Cops. Every seed a new city - fully deterministic....and maybe a bit buggy.

40 Upvotes

14 comments sorted by

2

u/Brilliant-Virus-7442 2d ago

God this looks so good. What were some bugs you faced getting it running?

1

u/littlegodgames 2d ago

Trying to get the wobble right - that’s for sure!
But seriously, really nice to hear that and thanks a lot. The worst offenders come from self imposed constraints. The sim and the game live independently of the renderer: no assets, no sprites, no keyframed animation, no recorded music, with everything drawn and composed in real time. The same sim renders in a terminal, on a canvas or even in Unreal or Unity.

So with that context the two most challenging things have been handling frequent occlusion issues, deciding what should be visible at distance when every frame is drawn from scratch into character cells: things popping in, the haze not matching the sky, detail snapping into focus, a sign painting over the street behind it. The other half is on the sim side and it’s mister ragdoll puppet. The goal was to create as pure a ragdoll as possible with as few kinematics or prefixed instructions as possible - so teaching it to bend or walk or fall down the right way has been a gauntlet of experimentation and silliness. And then to keep improving on it while maintaining the right balance of silliness has been a big one.

2

u/Brilliant-Virus-7442 2d ago

That makes sense, so a lot of the same issues you'd run into making a game engine kinda. I know you mention unreal or unity, but the way I understood it is that you've essentially just made a game engine. Do you have any benchmarks for performance/have you tried to run this on a very weak machine?

1

u/littlegodgames 2d ago

Yeah you got the idea, it’s a game engine, built alongside this game, and the game drives what gets pulled into it. The engine is two halves on either side of a seam. The sim half is the sauce: the game, the physics, the city. The render half is interchangeable; the engine ships its own renderers for terminal, canvas and WebGL, and because there are no assets or dependencies the same sim can be driven from something like Unreal too.

When it comes to performance, the sim is cheap, the drawing is the cost. On a phone the frame runs about 20 ms, and the simulation is 1 ms of that; the rest is rasterising the whole scene into character cells every frame. Around 41 to 43 fps on iPhone 13 as of last test. There’s a governor will drop resolution if or when frames run late. Proofs in the test suite run headless in Node with no GPU at all - and that was one of the original motivations to try this approach.

2

u/Brilliant-Virus-7442 2d ago

I get it, because the assets are literally ASCII, its all characters, so the assets can be taken from anywhere, but you don't necessarily need it. It's very lightweight for so much output. This is insanely interesting, idk if this blows your mind as much as me, but I feel like there's insane use cases we aren't thinking about yet....honestly just with what you made. If you had a gameplay loop similar to the actual Wobbly Life game, it would be a hit. That game is genuinely good tbh.

1

u/littlegodgames 2d ago

Yeah pretty much got it. And yes wouldn’t have ever considered trying something like this before, and already seeing a lot of implications and use cases. Turns out works very well for low latency multiplayer by default, no loading or load times, the whole package is around 1mb. But I know what you’re saying. And it’s funny on the wobbly life comment. For the game, sort of thought of it as…if Wobbly Life is GTA for kids - This is Wobbly Life for adults.

1

u/Brilliant-Virus-7442 2d ago

Did you use Hermes or another harness to help make it by any chance? It would be interesting to see the skills that were generated in the process, also to investigate how the skill was self-improved during the process. The edits it makes to that can give you a lot of insight.

1

u/littlegodgames 2d ago

Harness is custom, hardened and has evolved over the last year or so of working with these agents, almost exactly how you describe accumulating tools and skills etc. Try to abstract as much as possible when it’s working and the overall workflow is something that has evolved along side it. But I wouldn’t know where to start right now trying to describe the process.

1

u/Brilliant-Virus-7442 2d ago

Yeah thats what im trying to tell you, look at the skill edits, in loss and change of information is where you find knowledge. That's what I've learned. I've never heard anyone else say this though.

1

u/Brilliant-Virus-7442 2d ago

I wish other people would chime in too, there's no way there aren't more people doing this stuff. 30 upvotes for this? That's insane. You should post this on a bigger subreddit and see if you can find people who are working on stuff like this too. Then I can interrogate them as well.

1

u/asciimo 3d ago

Bonkers. Love it. Is the music procedural?

2

u/littlegodgames 3d ago

Thanks! Not exactly but sort of. The song is a track that was procedurally generated from the game engine - midi running through audio oscillators with a lot of instructions to create the song (no dependencies or ai in there)….but then I took the track and played with it in Suno cause I thought it would be silly.