GenRealms | Powered by AI
Take charge of your favorite fictional universe. Make decisions that shape its destiny. You're free to do a great job or a terrible one—it's all up to you.
✨ Please rate the game and add any comments if you have ideas! ✨
How it works
This prototype is driven by ChatGPT 4o and takes inspiration from the classic 2002 web game "NationStates." This is the first prototype of a concept I've been interested in for a while where I handle the frontend and basic logic and GPT acts as game master.
Common errors
- You will get a '400 Bad Request' error if you have entered text which doesn't pass the OpenAI moderation checks. If this happens just click back in the top left and start over.
- The game might hang if it can't connect to the GPT API for some reason. It calls the API every time you request a new issue or get a result.
- The bars go from 0 to 1 with 1 being good and 0 being bad. GPT controls the bars so any unexpected behaviour will be due to GPT not following orders.
- I'm a newbie when it comes to configuring servers. Please let me know if you encounter any CORS errors.
--
🆕 GenRealms: Desktop
Download GenRealms: Desktop for Windows or Mac below. GenRealms: Desktop allows you to enter your own OpenAI API key and select an endpoint - or enter a custom endpoint.
- The desktop version will only work if you enter your own API key. You can get one by signing up for the OpenAI API.
- Only Chat endpoints will work.
- You will need to choose 'More info -> Run anyway' to get the .exe to work on the Windows popup.
- Your API key will not be transmitted to me, or saved in any way. It will be used in the web request to OpenAI. This means your OpenAI account will be charged for any usage.
--
Originally created in 1 week for the "GAME-A-WEEK" jam
What went right?
Thanks to the plugin Chat GPT for Games, Chat GPT integration was seamless and relatively simple to use. I already knew how to securely manage the server interactions for ChatGPT requests.
What went wrong?
Getting ChatGPT 3.5 to produce the kind of questions and evaluations I wanted was a bit of a struggle. It often gave extreme 'good or bad' judgments. Additionally, I ran into CORS issues when I launched the game on Itch, an obstacle I hadn't encountered before. Thankfully, it was a quick fix.
And what did I learn?
I had GPT-4 fine-tune the prompts I was sending to GPT-3.5, and the results were impressively refined. I also learned how to resolve CORS issues for deploying a server-connected game on Itch. But perhaps the biggest takeaway was discovering how effective GPT-4 can be as a coding collaborator.
Updated | 4 days ago |
Status | Released |
Platforms | HTML5, Windows, macOS |
Rating | Rated 4.3 out of 5 stars (25 total ratings) |
Author | lem |
Genre | Simulation, Interactive Fiction |
Made with | Unity |
Tags | 2D, AI Generated, artificial-intelligence, Endless, Fangame, Management, Narrative, Text based |
Average session | A few minutes |
Languages | English |
Inputs | Mouse |
Development log
- Web version back up, moderation endpoint implemented4 days ago
- Web version taken down for now due to OpenAI warning12 days ago
- GPT-4o-Mini now implementedJul 20, 2024
- GenRealms: Desktop - use your own API key and OpenAI endpointJun 09, 2024
- New name: GenRealmsJun 07, 2024
- History turned back on + updatesApr 13, 2024
- Back onlineNov 25, 2023
- GPT costs = changesOct 10, 2023
Comments
Log in with itch.io to leave a comment.
let gay ppl into hogwarts :D
I liked the game, until I got repeating questions. Still like it, but felt like I “finished” it without finishing it.
Thanks for this fun and enjoyable piece!
I turned into a dictator invaded with hobbits killed all that disagreed made only one culture also
I basically became hiter\
It was mentioned by someone else before, but support with Ollama would be nice so this could be messed with for free locally using our own models.
I like the idea of this, its basically like Reigns but with whatever content you like. It'd be need to see a little bit more development to the mechanics to make decisions have more long term impacts and maybe borrow the concept of Reigns in that you can continue on after you lose as the next person in charge.
Either way, neat project, I look forward to more games that use AI in creative ways.
The "Your own answer" option is awesome. It really generates some funny content. For example, I in response to whether the hobbits should start a postal service, I said "have the eagles do it." The result was that watching the eagles pick up and drop packages was like magic, but sometimes the eagles mistook flowers or vegetables for packages, leaving gardens in shambles :D.
Love it! It’d be great if there was a way for your choices to permanently impact the rest of the game—even just by getting logged—, otherwise all playthroughs are a bit same-y, but other than that, fantastic job! I’m looking forward to more games like this in the near future.
+1 yes! i regularly see the very cats ive put on curfew bypass it and cause mischief
So much fun as it picks up any custom setting, from historical countries to Imperium from Warhammer 40k, and even party house with friends. I was even able to make it write everything in different language by asking for it in description. Sorry for eating big number of credits, tho. It becomes a bit stale as there is only 4 parameters and no custom flags, but it is great proof of concept that LLM could take reigns of game mechanics. I am a bit disingenuous - AI sometimes mentions past decisions, but it only affects the narration. Can't wait when in future LLM would bake a whole plot with cumulative story where past choices not just shape the story, but also intertwine in meaningful way. But it would probably require whole location simulation with NPC's.
I'm glad you had fun with the game! It would definitely be interesting to see how far using an LLM to run a game could be pushed. Hopefully some studio out there is doing just that.
Hello, great project, I loved and it's fun too!
I was wondering if you're able to add support for Ollama and KoboldCPP?
Ollama has a different api than OpenAI uses, so it won't work through "custom OpenAI endpoint".
When I try to use KoboldCPP(Which has an OpenAI compatible api port), I get "Error: http/1.1 401 unauthorized".
Thank you for your time. (And sorry for my bad English.)
Thank you for your kind comment! I will look into those models you mentioned. Right now I am making a direct request to OpenAI's servers and just substituting in the model name, so anything more advanced than that won't work.
Yo, I've been working on a similar game idea since April. This looks amazing, the type of game I wanted enough to start learning how to code. Don't want to link to what I made because it's not good and this is your thing, but same idea, yours is just a much more sensible approach, and actually a game.
Played for a while, it'd be nice if it told you how much of each value you have and if you could spend like all your money on one thing if you've got piles and piles of it and are struggling for peace points or just want to throw money around because you can.
Interesting to hear of someone with the same idea! Honestly I'm surprised there aren't more games like this (ie AI gamesmaster). I'll bear in mind your ideas for new features, I haven't added much in the way of game features since I made it - mostly been focusing on improving the backend.
Я построил российскую империю и создал автономную страну которая не нуждается в других
Cool game, but loading new choices often freezes after some time of gameplay
Thanks, I've had a few reports of this. Will take a closer look.
"rich get richer, we're all just taylor swifts background dancers."
deep
We're all a part of a simulation lol
sex land succeeds through BALANCE. I am the avatar.
I abolished slavery and gave women rights then immediately lost because my peace reached 0.
10/10
realistic LMAO
I keep getting "gpt is tired, try again later" pls hel
Thanks for letting me know, I'll investigate it tonight. I'm getting the same error.
Hey, the problem should be fixed now!
It is thanks!
okay this is really cool esp the game of thrones one imo, I just got to season 7 in it though so not sure if I should have tried it without finishing the show xD didn't give any spoilers per say, but it mentioned something about a "great war" which hasn't came up in the show so idk. either way really cool and fun it's like sort the court but infinite and generated by ai and with custom choices!
What is the reason for this error?
Hi, did you download the file rather than trying to play it on itch.io? I don't think it will run locally because it communicates with a server to fetch the GPT results.
Can you add a place to use my own api key so it doesnt cost you?
I updated it a while ago to use a lower cost GPT, so feel free to use it as much as you want! I should remove that line about the cost from the description.
You are amazing!
Also really cool game + idea! I loved playing Nationstates, awesome influence!