Going Back, Building Low – Emberwood’s next frontier

Call me a geek, but there’s something about crisp, bright, and pixelated letters, numbers, and characters rendered against a black background to a computer terminal makes a part of me very happy.

You may have heard of games like Dwarf Fortress (classic version), Caves of Qud, or Cogmind – all somewhat inspired by the old computer terminal games like Rogue that use one of the simplest forms of graphics: colored text characters, or more specifically, ANSII or CP437 characters:

The above image shoes the Code Page 437 (CP437) character set, which collectively, can be used as simple graphics in games that can run in computer terminals, such as Rogue from the 1980s:

If you add color and a few more symbols, you can get some pretty-looking terrains, as seen in Dwarf Fortress’s home page:

About 3-4 months ago, I decided that I wanted to start learning the Java programming language. I don’t know where the desire came from – why bother learning a new programming language when I already knew C# and Unity? …

Because who needs Unity! (they’ve gotten a bad wrap lately, deservedly so, as they’ve been trying to scrape more from indie titles across the board).

Also, because I have this itch to understand game development at a more fundamental level than what Unity offers us. I want to know intimately how rendering actually works, and how file-systems work, etc… But why Java?

To be completely honest, I picked Java largely because I like the name of the language (I ❤ coffee), and also because Java was used by Markus Persson (also known as Notch) to write Minecraft, one of my favorite games of all time. Also, from what I understand, Java also runs on nearly all systems (Mac, Windows, Linux, other devices). It’s also lower-level / faster compared to Python, but higher-level and less stressful than C.

All this to say, my goal is to make Emberwood an ANSII text-based Roguelike. This includes building a game-engine from the ground-up in Java, and learning (and struggling, a lot) as I go.

At this point, I have built a basic ANSII Text Renderer that uses JavaFX (an open-sourced GUI library) to print grids of cells onto a screen. I’m using IntelliJ Idea as my IDE. Here’s a video that shows the rendering engine so far (it’s very primitive but it’s getting somewhere).

As you can see, the window renders about 40 times per second (a cap I made manually, to prevent the CPU from creating frames hundreds of times per second, which would be kinda pointless for an ANSII game). The renderer prints two grids of 80×50 cells (a frame) 40 times per second: a background cell grid and a foreground cell grid: the foreground grid contains the shapes and colors of the bitmap font’s characters (for crispy terminal font effects, bitmap fonts tend to be more pixel-perfect and punchy than the newer vector-based truetype fonts). The background cell grid contains cells with a color value to display behind the foreground characters (in this example, nearly all of the background cells are set to black. The moving ‘@’ symbol shows a yellow @ character with a red background moving across the screen).

Going forward, here are some goals for features in Emberwood:

  1. Procedurally Generated World Terrain (Seed and Chunk-based, using a combination of Perlin noise and other techniques. Using the same seed should generate the same world, with the same history, and same everything)
  2. Procedurally Generated World History, Significant Locations, and Quests (I genuinely have no idea how to do this yet, but will draw inspiration from Caves of Qud and Dwarf Fortress)
  3. Procedurally Generated Dungeons (cellular automata seems ideal for this) placed throughout the world in meaningful locations, based on the world terrain and world history (I don’t yet know how I’ll place the dungeons or populate them with loot, enemies, quests, etc…)
  4. Turn-based movement and d12-based combat (similar to table-top RPG)

That’s it for now! Lots of work (and learning, and struggling) ahead. I am very much looking forward to this journey, and I’m so glad you’ve decided to accompany me along the winding way. It will be difficult to find time for this on top of work, family, and other obligations, but it’s one of those things that I can’t fathom to simply let dissipate – this whole game-dev thing has become such a core part of who I am, and I’m determined to continue nourishing this part of me. Perhaps you feel this way about something in your life too, maybe it’s game-dev, maybe it’s fishing, maybe it’s jewelry (shout-out to someone I know <3), or maybe it’s something else – post whatever it is in the comments, and tell me how you plan on honing that thing by incorporating it into your life.

As always, cheers to our dreams!

-Wady


One response to “Going Back, Building Low – Emberwood’s next frontier”

  1. This is great man. So good to see you pursing this project with such determination. For me, I’ve been running, shooting for consistency over all else. Looks like the base skills are the same no matter what the end goal is

    Like

Leave a comment