How should I create a text-based adventure game in Unity?

So, first of all, I know that Unity may be an overkill for a text based. But I´m not really doing this for the game, Im doing this more to jsut learn more about Unity. I know I could just do the typical Brackeys 2D paltformer tutorial, but as a guy said “If it’s already hard enough to stay focused on developing a game you enjoy, imagine trying to create a game you don’t” (no offense to platformer enjoyers).

Okay, after that long intro, I’ve been doing some reasearch and I’ve seen things like Chat Mapper or Articy, but I don’t think that the free plans have what I want (the limit cap thing). There are some cool assets in unity, but I feel that I should at least do the whole text stuff by myself. I would just feel like I didn’t do the hard work (plus, I’m a broke student and can’t afford 80 bucks) what I’m assuming is that I should hardcode it? I don’t actually know so that’s why I’m here. I want to learn how to make the game. That’s why I feel that using other stuff feels cheating

Hi,

Since you want to learn how to make the game, I recommend using a good content editor but not using a framework such as Fungus or the Dialogue System for Unity to handle the front-end work such as UIs and triggering activity.

If you’re thinking of conversation trees, look into Twine, Ink, or Yarn Spinner. Twine can export to JSON text format using a story format called Twison. It’s a good opportunity to learn how to read JSON in Unity. Ink has a nice Unity integration. Yarn Spinner has a nice integration, too. You can find some good tutorials online on using each of these in Unity. Content in Ink and Yarn isn’t exactly a conversation tree, but in the end it works similarly. You’re presented with a choice and can respond by clicking on a menu of options.

If you’re thinking instead for free-form text input like old school text games (Infocom, etc.), it’s a good opportunity to learn that very often programming is not tied to a specific game engine. You can use Unity to read and print text, but the “back end” processing can be plain C# code without having to fiddle with Unity stuff. You can search up plenty of tutorials on creating text games in C#.

In either case, don’t hard code your data. You don’t need to make a fancy editor. You can use something like Twine, or you can use simple text files that you process in your code. Just keep that data separate from your code and GameObjects.

And have fun! There’s nothing like bringing an idea to life in a game.

I made a muck in c# it would take excceptionally little effort to then use unity to be the client… so, the simple answer is… make a text based game, then display it in unity.

…When people say “text-based”,
They are referring to ASCII and DOTS style games,
Like from the 90’s, right?
(I’m half-sure that we should have a entire genre for retro-style text-only games;
It would help new developers to see their options)

the gamedev crew did a tutorial on that

When I hear “text-based adventure game”, I’m thinking of something like Zork or Colossal Caves Adventure where you read about whats happening and type commands.

The difference between creating this type of game in Unity vs. Text Console is that you’d simply need to reacreate the text console with Unity’s UI components. That’s not very difficult, though. The Unity platform opens a lot of opportunity to add graphical flourishes that were no possible back then.

Ok, okay…

Has anyone ever tried to make a game where all of the visuals are in text art?
Like ASCII games?

Plenty! There’s Stone Story RPG, Effulgence RPG, L337DOOM, etc.

yes - gotta love it when people ignore things

I’ve never tried before but I imagine that you’d want to make some type a grid system. You could have, maybe a grid of 200x100 characters and you would write some method to place a character at specific grid coordinates, or check to see which character is at a certain set of coordinates. Logically, it would be no different than a tile map.

Then you’d need a way to draw your whole grid to the UI. You could probably even just use one big TMP object for the whole thing. That could work as long as you’re using a monospace font.

We’re putting the cart in front of the horse with implementation details, but it’s a fun thought exercise. If most of the “pixels” change every frame, then a single TMPro object might be fine. But if you’re only changing a few characters in the TMPro text, TMPro will have to rebuild the entire mesh so it might be more efficient to use a separate TMPro for each pixel.

Since this is in Unity, you could render actual 3D objects to a render texture – maybe 80x25 pixels to match old school DOS resolution. Then use a translation table to render each pixel as a character in an 80x25 grid of TMPro objects or as a character sprite in SpriteRenderers.