stardance has been extended another month! the new deadline is october 31 :)

You are browsing as a guest. Sign up (or log in) to start making projects!

AI-Powered Adventure Text Game

Hardware
  • 21 Devlogs
  • 31 Total hours

This is an AI-powered text adventure device using ESP32, e-paper display and rotary encoder. It is powered by Gemini to generate infinity stories and choices.

Ship #1 Pending review

This is an AI-powered text adventure device using an ESP32, an e-paper display and a rotary encoder. It is powered by Gemini to generate infinite stories and choices.

It uses ESP32-C3 microcontroller to connect to WiFi and query the Gemini API. Gemini generates an interactive story segment and choices for the player in JSON format. Then the text is shown on the e-paper display. The user can use the rotary encoder to scroll through the text and select their next action. Each choice is returned to the history buffer on the ESP32 and is sent back to Gemini to generate the next story segment.

Personally the most enjoyable part is when the PCB worked after i soldered them, however the coding part is hell cuz i sucks at coding lol. It haven’t got an enclosure yet, i will work on it soon! Now I can play this in my free time!

  • 21 devlogs
  • 31h build
Video of Project → See source code →
Open comments for this post

4h 53m 14s logged

Spent the last few days implementing gemini api into the code and formatting json data like text, choice into the e paper display :) I’ll take a break from this project as i have joined other competition. so stay tuned!

0
0
56
Open comments for this post

2h 53m 18s logged

GAH DAMN MY PCB IS WORKING!!! Timelapse below!

I spent the last few hours carefully soldering my new PCB. I decided to use 0805 for all smd component cuz in my last project, I used 0603 ones and it was PURE TORTURE to solder them all lol. lessen learnt!

Overall, I absolutely love the pcb outcome its nicer than I expected especially the ws2812b led and all those smd resistor (they look so sci-fi xD).

However there was one flaw, I forgot about the ESP32 antenna. I’m forced to awkwardly fit the antenna on the pcb back (right beside my Great Wave silkscreen print). Luckily it didn’t block it lol. This is something I needa keep in mind the next time!

You might be wondering what’s that tiny pin header I used there. It’s just a pin header, but for the design, I wanted it to be ultra slim, so I designed a PCB sandwich layout. The battery fits perfectly between the e-paper pcb and my pcb. However the problem with normal pin headers is that they are super chunky, they have like 9mm gap. That instantly ruin the whole vibe…

So after hours of digging in aliexpress, I found those low profile pin header. They are SUPER PERFECT for my project (6mm gap), which is exactly my battery thickness!!! Anyways the low profile pin header was NOT CHEAP at all… well at least its so worth it.

Other than soldering the PCB, I did a few adjustment to the firmware, including: rotary encoder logic improvement - I used interrupt pin logic to read it, they place the rotary encoder at the toppest priority (if theres any changes in pin state, the esp32 instantly ignore everything and focus on the encoder).

That’s all for now, stay tuned! its so fun

0
0
17
Open comments for this post

1h 29m logged

Today I worked on a WiFi prompt to let user choose whether they want to connect to a different wifi or existing one, because this device is supposed to be portable, working anywhere, so this is very important. However, I’m still figuring out how to show the WiFi name… wm.getWiFiSSID() didn’t work though.

Btw, all my hardware had already arrived just now!! (after slow ahh aliexpress) I can’t wait to solder them, so stay tuned lol XD

0
0
9
Open comments for this post

4h 20m 13s logged

In the last few days, I made a few changes to my project:

  1. I decided to switch the idea from the initial quiz game concept into a choice-based adventure text game, it’s basically an infinite “choose your own adventure” concept. I feel like it’s way more fun!
  2. I worked with the WiFiManager library to make the wifi setup more accessible and easy. We now don’t need to hardcode wifi password into the code, the device will launch a hotspot captive portal and you can just connect any of your device to setup wifi at anytime anywhere. portable, isn’t it?
  3. Since this game concept will need the e-paper display to show a long text, I used a serif font and coded an automatic text wrapping and an adaptive scroll bar at the side so you can know the length of the text
  4. I also added a low battery and data parsing error page for the user alongside with an ok button to shutdown the device.

What’s next?
After the text formatting is stable, i’ll be focusing on text generation and choice logic!! xD

0
0
13

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…