project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

Im(ai)gine

Im(ai)gine is an Imagination Engine that lets players explore unknown worlds, dreamed up by AI.

Im(ai)gine

Created At

Autonomous Worlds

Project Description

Im(ai)gine is an Imagination Engine, and a game. Players create their character and from there on continue spawning the multiplayer game universe, helped by ChatGPT and Leonardo.ai which respond to their choices and constantly add new locations, interesting characters, items and adventures to go on.

Nothing is generated by the developers, which makes the game extremely refreshing and sticky. The beautiful illustrations of characters, locations and items make the experience immersive.

The gameplay is based on experiencing the content, illustrated text, and choosing your next move from dialog or actions, which can have an effect on different stats such as health, karma, currency or inventory. The goal of the game is to reach either Absolute Enlightenment or Total Darkness, by choosing a path in either direction.

The idea was born out of a desire to explore the Mud framework, but at the same time finally get some experience with "AI" prompt engineering. We had a great time discovering the new technologies and hope to continue with all this!

How it's Made

We built Im(ai)gine with Optimism, Mudv2, Foundry and Hardhat for blockchain, React with Tailwind for the Ui and Node Express for the AI oracle.

The main game interface is a (Vite) React application, with MudV2 with ethers-js to store and retrieve game state. It uses Tailwind for styling, and talks to the AI Oracle over a Rest API.

The AI oracle is currently tightly coupled to OpenAI's ChatGpt for text-based content and Leonardo.ai for graphics content, but we intend to decouple in the future. The logic is implemented in Typescript and Node Express.

Solidity contracts and Mudv2 logic are developed with Foundry and Typescript.

The project itself is a monorepo using pnpm (part of the MudV2 starter kit), and deployment of the Client and Server is implemented as an rsync command.

Hosting of the Client and Server is on a DigitalOcean droplet running Docker Compose, using Traefik as SSL termination and nodemon as the base for the server. The Client is built to dist and served from nodeExpress as flat files.

The images and extended text logs are stored on IPFS, we use the Pinata SDK and pinning service for this.

background image mobile

Join the mailing list

Get the latest news and updates