Apr 27 2024

Holes in the level, and ability hints

Been mostly playing with levels, but have two new things to show.

First, I added descriptions to each ability which is displayed when hovering in your inventory.

And secondly I added “holes” in the level. You can’t walk over a hole (unless you can fly), but you can see over it and ranged attacks work. If you can teleport, then you can also teleport straight to the exit.

That’s all for today.

Mar 31 2024

Asciibrain - Strategic Gameplay!

Sometimes it’s the small things that really stir things up. I decided to spend some time on making a static dungeon, and making it really fun. And the result was fantastic!

Step 1: Add a third character

Say hello to the Thief

Only two characters made the game hard. A turn would end too fast. So I quickly added the Thief. This new character has the following interesting characteristics:

  1. Weak! Low on hp and don’t hit very hard
  2. Has a much shorter walk range, BUT has 3 actions per turn (instead of 2) so the total movement is much greater
  3. Has a new default ability Sneak that makes enemies ignore him (or her?) for one round
  4. Also starts with the One more thing ability by default, which means she can make up to 4 potential actions!

Step 2: Players can act in any order

The Thief turned out fantastically, but turn order really limited everything. So I quickly re-wrote it to allow you to change to any player controlled character with actions left….

And wow! Now it’s a completly new game!

Where before it was just mindlessly “walk and attack”. Now you can start taking strategic decisions! A simple example:

  1. One of your characters is in deep trouble, cut off and surrounded by enemies and low on health.
  2. Switch to another character. Loot a nearby chest (chest will give every character a ability-card) and
  3. …pray it contains something that will save the day. Maybe your character got a sneak? Change back and apply it to yourself. You’ve just delayed your imminent doom one turn…

Here’s a short video showing heroes and abilities playing together…

Strategic gameplay 001

Step 3: Adjust health on doors

Another really small, but impactful change, was to lower the health of my doors to match the damage of a Fireball. Now, any door that gets collateral damage from a fireball will be removed and reveal the enemies behind it… now you need to be a bit more careful…

Doors will now burn up from collateral fireball damage

Step 4: Adjust health on chests too…

Even more critical! Chests also gets destroyed from Fireball damage! This might be even more critical!

How to handle it? Change to the Thief character, sneak in and grab the loot, get out of the way and have the Wizard fry the eneimes and the now empty chest…

Loot chest before it gets destroyed!
Feb 18 2024

Asciibrain - Memory Issues

How a simple feature, developed in one afternoon, turned into a memory corruption bug hunt that lasted almost a month… I’ve been so proud of how simple, and easy to use, my custom memory allocator has worked. Then suddenly the memory issues started happening and I had to deep dive into all kind of memory related debugging. And what started as one bug, soon turned out to be three different ones. READ MORE >>
Jan 07 2024

Playing around with opengl

Metro Siberia assets

Spent a few hours reading up on OpenGL this winter holliday. Haven’t messed around with it for 11 years.

What’s was most interesting was optimizing compile times. Using VIM and a bat-script for compilation made it pretty much instant.

Well. I realized that even if it’s nice to have basic knowledge, I find it boring. And also realized that OpenGL is considered more or less ‘deprecated’ now as a cross platform graphics api (since Mac no longer supports it). I wasn’t aware of that as a more or less established status before. If you are interested in graphics programming, then you should look into webgpu instead, it seems.

But this will be it for now. Time to go back to my beloved AsciiBrain project again.


Jan 05 2024

Status of AsciiBrain - end of 2023

Yikes, who's in charge of this enemy spawning X'-)

Haven’t posted in a while, so let’s do something about it! Big time!

Here’s a summary of all that’s happened to asciibrain (that I haven’t yet posted about) during at least the past 1,5 years. Quite a lot, this is still very much a live passion project for me.

Feb 20 2023

Asciibrain running on Linux

Migrated the project to CMake and tried compiling it on my ancient linux netbook. Had to shrink the window, other than that it worked fine!

Here you’ll also see a glimpse of my ascii smoke and text layout code…

White laptop to the left is running Lubuntu and the laptop to the right is running Windows 11.

Sep 12 2022

Ascii particle mockup

I love particles in ascii, and started prototyping on a first-look on a fire/explosion type of effect. So far it’s hard coded to explore the kind of style I’m after and see what the requirements are… Here’s the process it went through!

First try. Yellow to black. Delay per cell based on distance from center with a small offset to not have it ’too symmetric'.

Second try. Red to yellow to black.

Third try. Kick up the offset and make it longer.

Fourth try. LoL, explosion should start with yellow then fade to red (doh). Added in smoke and lowered that offset again.

Fifth try. Minor changes and tweaking. I really liked this one!

Here it is together with a fire-trail and damage implementation, how it currently looks in the game.

Jul 31 2022

AsciiBrain, UI mockup

In order to proceed with all features, I figured I need to know how my UI should look and behave. Sat down and tried to do a mockup. Damn design is hard and time consuming (I just want to code). Well, I’m happy enough with how this turned out.

Although it is a bit too much Demeo rip-off right now. Don’t worry too much about it, I’ll move away from that soon enough =)

Oct 10 2021

Asciibrain, rendering glitch

I needed to refactor my rendering pipeline for improved flexibility (adding a speed improvement in the process). But sometthing went a little wrong resulting in the following images…

This might be one of the coolest bug of my entire career!!

Another glitch
Aug 13 2021

Multiple characters and perf stats

Tiny update this time.

Support for more than one playable character
Print out performance stats in top left corner

TICK is the number of milliseconds for main update loop

BUFF is when we process our graphics buffer and create the SDL commands to draw it

REND is when SDL actually renders to screen (it’s so high because of VSYNC)

The first value is actually quite high right now, because I’m very wasteful and calculate shadowcasting and A* every frame even when nothing changes.

Apr 26 2021

Ascii rougelike progress

Haven’t written about this in a while, but there is a ton of new stuff going on…

  • Multiple states (start screen, main game) in a classic old fashioned FSM
  • Multiple entities in a turn queue
  • Simple sequence pattern for animations and commands
  • Heatmap generation to calculate moverange
  • A* pathfinding
  • Color pallette adjustments (oh, this needs to be worked on)

(oh, and those red dudes are not ascii… did some experimentation but did not really like it)

…more to come, I promise =D

Apr 17 2021


Been working a couple of evenings on this little Super Mario Run-clone for my kids to play with. It’s obviously quite early in development, but they love it anyway!

Godot has a pretty decent physics system, but as usual I prefer to do the physics myself. Starting to feel pretty good.

Jan 13 2021

Recursive Shadowcasting

Been a while since I worked on this one. But I have some very intriguing ideas, so I wanted to pick this up again. New features since last time:

  • Recursive Shadowcasting
  • Support for custom FG/BG colors
  • Mouse input
  • Text output

More to come…

Dec 27 2020

Teamed up with new artists...

Jumping crab and flying birds

Been talking with my kids for quite some time that it would be fun to make a game together, Now Edda has started actively talking about it, so during the holidays I went ahead and made one.

Funny thing is that Sigrid is the one who made the graphics so far. It’s placeholder though, as she wants her graphics for another game (not supposed to be a jumping crab!!!)

Sep 13 2020

Pew pew pew, part 8

Starting to refactor systems. Split out the enemy wave manager into a ship builder class (build and configure enemies based on type), spawn position solver, and a waveManager (that decides WHEN to spawn WHAT ship). Turns out I need to put more effort in the last part, while the two former worked pretty well.

Did a new enemy type as well. A re-make of the shotgun turret from pewpew5 (that never made it into the game).

It is supposed to be a bullet hell after all =D