4 ms·
Nice job. I've also experimented with an invisible AI overlord in conjunction with a hand-built interactive fiction environment mainly intended to graft a much
by vunderba 8mo ago
Nice job. I've also experimented with an invisible AI overlord in conjunction with a hand-built interactive fiction environment mainly intended to graft a much more powerful and expressive "text parser" than older games had.
Are you at least caching the image gen in something like S3? Even with cheaper models, I would think that would add up fast.
- tommywilczek 8mo agoNice! And I'm running the image models through Replicate which gives back an ephemeral link. Those images then get saved to the client so I'm not paying to host them.
- deleted 8mo ago[deleted]
- vunderba 8mo agoVery cool! Depending on your local hardware, you could also run something like Z-Image Turbo or Klein locally, then use a daily CRON to pre-compute a bunch of new images for the game and serve them online as well~ That way you've got a fallback when credits run out, or if the 3rd party API takes too long to generate a new image, etc.
- tommywilczek 8mo agototally. to get it out the door I kept it in the cloud but that would be a good optimization. Honestly the biggest issue I've been facing is google's ability to host its 3 flash/3.1 flash-lite models. They CONSTANTLY return 503: model unavailable due to high usage... Next step will be to play with a more reliable LLM that's still fast and smart enough.
- tommywilczek 8mo agoFor the images that I do want to cache, I use Cloudflare's r2 which is basically S3 with no egress fees (as in no charge for reads). I'm well within the free tier with a few dozen users of the game.