Nekomancer - Game

image

Link


Hello, my name is Alex. Um, this is my first attempt at a cat-themed videogame. I’m nervous, but I’m excited at the same time.

Made with meep engine. Graphics is three.js

Any feedback is very much appreciated! :person_bowing:

2 Likes

History

End of September in 2023 I was working on a prototype of a horde navigation system, using flow maps and fluid dynamics.

I worked on the prototype for about a month, achieved what I wanted, thought about making into a game, but ultimately put it on ice

Fast forward to about 2 months ago, when I got a was thinking about this prototype one day, and got an idea:

What would it take to bring this to a complete game with the help of the current AI tools?

This game is the answer to that.

It cost about 9,000$ in tokens so far, and ~ 504 commits. If someone tells you that you can just type

make game, no mistakes plx

We’re not there, and arguably you don’t want to be there, as there are a lot of judgement calls and artistic decisions that need to be taken along the way


Process

Code

First the code, there’s very little code that I wrote or even edited by hand here since the original prototype. Only small adjustments. Majority of the code is written by the AI.

This is a little deceptive, because the game makes a very heavy use of meep, so things like lighting, decals, trails, physics, tooltip system, audio engine, fog of war etc are all done by meep and the game only uses these.

Art

I chose grimdark setting, as I find it to be quite attractive, and it fits with the theme of a horde shooter, at least in my mind.

The art is generated using FLUX.1 with a LoRA, I’m not going to go into detail about how to set it up and how to do the adaptation.

I’m running the model locally, it took about 6 hours to do the training and it took about 6 hours in total to generate the images as well.

I asked the AI to create prompts for images, keeping the description of the element as well as the theme in mind. The results are decent, but only in the sense that you can say that the images look good and the overall theme shines through. But honestly there’s very little coherence that way.

So beyond that, I asked the AI to generate me 5 variant for each element, and create a tool for me to select a variant

AI makes an initial pick, and I go through and refine it manually. If I don’t like any of the variants - I ask the AI to add 5 more

I had a certain aesthetic in mind, mimicking TCG cards, but I didn’t want to commit to developing an elaborate style. So initially I just went with square icons, generated as 256x256

but after a while I was feeling more comfortable with the tooling, so I tried going a bit further and incorporating art more deeply, using a rectangular 256x160 images instead

which worked out very well.

The 3d assets come from licensed asset kits that I already had purchased from a long while ago, but, I used the AI to sift through the assets, classify them, filter them and build a metadata table for them

This saved me a ton of time. I still had to go through and manually adjust sizes, offsets and rotations, as well as re-categorize a few assets or throw some away.

There are some 3d assets that I needed to create, and for that I relied on very basic code-based geometric modelling, again using mostly AI with minor tweaks and many revisions. Nothing mind-blowing, but it takes surprising amount of effort to get things to look right and be consistent with one another

Level Design

This one was quite easy. Meep has a powerful level generator, so all I had to do was teach the AI how to use it and iterate on its work. Making custom tooling helped dial in the results

There are a bunch of basic rules here, such as not crowding obstacles too much, because kiting is a core game mechanic, and about where and how to place objectives and player spawn point. Things like that.

The generator builds a few data layers internally to help with prop placement:

  • moisture levels
  • soil fertility
  • wind levels
  • desolation
  • rockiness

This is enough to provide a lot of clues for the generation process. Actual generator runs in under a second typically, so we can afford to generate each level just in time.

To provide extra variety to the player, there are 8 distinct “biomes”, that is - generator configs, that provide an additional axis of generation.








I decided to throw in fog of war into the mix, which works as a game mechanic, whereby enemies can spawn inside the fog, making exploration more dangerous, but giving you extra safety space in return. It also goes well with the oppressive atmosphere I wanted to build.

I didn’t quite like the look, as it just looked dark, but not interesting. So I threw together a very stripped-down implementation of volumetric fog

That turned out to be too perf heavy, I didn’t want to give it up though, so I worked through a number of improvements, including strategic loop parameter tweaking, heavy use of LDS and finally about 1:3 upscaling.

The fog interacts with light in a very visually pleasing way, and offers a lot of visual variety. Because meep implement Forward+ rendering and supports huge number of lights, I was able to take advantage of that with the fog as well. Light because a very useful mechanic here. Points of interest emit light, and fog becomes colored as a result. It’s hard to properly explain just how much value the fog adds visually.

Sound

Initially, I asked AI to generate sounds using sine waves, that worked OK for chip tune sounds, but I later went the route of a full neural network to generate sound effects. They are still not tuned properly, but the model that’s use is Small SFX by Stability AI.

Here, again, custom tooling was key

Gameplay

This one benefited from AI the least, I did ask the AI to tune certain formulae for desired shape, or to build a graph here and there, but not much else.

I decided very early on to freeze the core gameplay features or having ballistic weapons only, having flying and ground enemies, having elemental attributes and those attributes behind differentiated as well as the infinite progression.

Balance

This is a fun one. I asked the AI to build me tools to view enemies, weapons, objectives, player classes and loot drops

This gave me an easy way to review individual gameplay elements without having to load into the game every time.

The most valuable tool, however, was headless simulator. I asked the AI to write me a simulator with very basic behavior that can be configured with a given starting condition of the game, and let it play out. This allowed me to figure out which classes we under or overpowered. The simulation collects a lot of telemetry along the way and is able to run ~100x faster than real time on my CPU, meaning I can simulate over an hour of gameplay within a minute. The fact that the simulator is headless means that it doesn’t need to wait on the renderer and the UI elements.

I am able to get a complete balance breakdown across all classes with their default starting loadouts with 20 playthroughs of up-to 1 hour within about 20 minutes of real time. That’s 16 classes, 20 playthroughs each for a total of 320 playthroughs. I can inspect what the pilot picked, how much time they spent on each level, how much damage they put out etc, and all of the info is statistically aggregated at the end.

Actual manual play is invaluable, but this tooling gets you very far and speeds up the process immensely.

For example, I know that doing basic evasion and picking random perks the player can beat the first boss on every class at least 20% of the time. That’s a very powerful piece of information, and being able to re-generate that information after a change within 20 minutes is hard to overestimate.

3 Likes

Me seeing this : “omg i said something nice?” … of course mate, kudos.

Does the 9k bill include the game engine or just the usage of your game engine tooling?

May I also ask where you created the software? Like cursor/claude/windsurf? did u do it local/cloud or mixture?

was it ever multi convos at once, or 1 convo at a time? How did you manage the window of context? Like do you start a new convo based on any best practices or keep cooking one the entire time?

Sorry to ask so many questions… interested to know how you hit that $9k. Very.

1 Like

Hey @tyler_garrett , thanks for the kind words!

It was mostly Opus 4.8 with about 30% going to Fable 5.

1 Like

Sure

the engine cost is 0 for me, since it’s my engine :sweat_smile:

So just the tokens

Mostly Claude desktop app on Window. I use WebStorm from JetBrains as an IDE for “manual” work.

All local, if you discount the fact that the AI model is from the cloud.

Oh, that’s an interesting one, many many conversations, mostly one per one logical topic, sometimes it made sense to go into a long session, but mostly over tuning and smaller bugfixes related to the larger topic because context was very useful. Probably a couple of hundred separate conversations, maybe 300

For the most part I didn’t, Opus and Fable had 1M context by default by this point, and it was enough almost always. When it wasn’t I used /compact strategically

The key, I found, is to point it in the right direction with right files and framing, otherwise it spends a ton of tokens figuring things out and polluting the context.

This may be a bit of a tangent, but I use very high effort values, this is a major contributing factor.

I find that when using a model, you can get decent results with a cheaper model and lower effort, but the risk of it giving up too early and assuming it understand when it really doesn’t goes down as effort goes up. It turns more sloppy the lower the effort.

Similar story with cheaper models. Yes, a cheaper model might do just as good of a job, but the probability that it won’t is much higher, and we’re at the point where that probability is far from trivial.

Another thing is the long-term horizon, the more “sloppy” your project is - the harder it is to move it forward. Adding more feature is harder and more error-prone, there are more bugs. Heck, even AI trying to figure out what’s going on and where to look for things becomes harder.

I often find myself asking AI to refactor the code and restructure it in specific ways when reviewing the work by hand, and I find that it helps keep disasters low.

All that consumes a lot more tokens than if you tread an economic and happy path, assuming AI will be correct and manage your codebase well for you, and using strategic effort and cheaper models.

It might sound elitist, but honestly my philosophy has always been that

cost(human_time) > cost(computer_time)

and this brave new world of AI, we find ourselves in, fits that framing still.

If I only had free models that I could run locally to rely on, I’d still push for the best quality model, even if it takes “longer” to think.

1 Like

do you have the hardware for that? eg.. rtx pro 6000 blackwell WS or above? running hq models locally isn’t as cheap as it sounds, it’s doable and there are some decent open source models but reliability essentially boils down to hardware limitations…

1 Like

The answer is “no”, I have 24 Gb of VRAM, which is plenty for FLUX.1, but I something like Kimi K3 needs ~700 Gb VRAM, this is not something you’re likely to have at home, unless you just happen to be collecting 50,000$ GPUs in bulk

1 Like

Sorry if my wording of “local” made it appear as if I was speaking towards offline LLMs, which to my knowledge wouldn’t be any help for this level of depth. I know because i built the first local LLM code editor, and lets just say it’s not something we should be discussing when discussing vibe coding with frontier models. I believe i used local in context that is not related to local LLMs, and if I did not, just want to apologies for derailing.

Kimi k3 is more of a cyber security risk that a logical next step from my humble experience, and at 120+ gigs of ram possible here local, I still believe people are going to be eating a pile of “should have researched more” before thinking local, will be the path, for iterative code editing in a realm of HMR lol

1 Like

Spent half my time building my game engine to be hyper efficient, and I’d love to compare it with yours. I also went all js build. My inspirations though are entirely different and in all just seems to resonate a lot. I come from doing efficient coding stuff for 3decades actually, and feel like what I created might not be the most efficient but it’s def some wheels.

I to, did an asset insertion tool, and where i went granular, you went another direction and did granular. perhaps combining the power, could be a fruitful fork in our future.

1 Like

wow so cool!:smiley:

1 Like