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.

Mar 13 2023

Practical Git

You know all the basic stuff of git: pull, add, commit, push, log, branch, diff. But want to be able to practically use it. To get actual overview of what’s going on. Here are a few really neat commands with options that might be good candidates for you to add as git aliases.

Interactive add

Ever find yourself doing

  1. git status
  2. git diff path/to/file1
  3. git add path/to/file1
  4. repeat for every file?

You can review each change much faster by using the patch option inside

git add -i

Log like a boss

Logging is these things thats important, but also super important if you want to get an overview. Most of these commands can be combined!

Tip number 1:

git log --graph --all

Show log as a graph, and how its relationship with other branches/remotes

Tip number 2 (can be combined with 1)

git log --oneline

Shows a condensed list with only hashes and messages

Tip number 3 (this I don’t see enough of, use it often! Can also be combined with 1):

git log --stat

Shows which files were affected, with a brief addition/deletion summary

I cannot stress how often I find the need to see which files were actually touched by a specific commit.

So you found a suspicious commit and a file you want to inspect

git show hash:file

Quickly show the file at the specific commit

But git diff hash -- file will compare it to the version in your working directory, and you want to see what changes were introduced in that specific commit! That means you need to compare that version of the file with the version of the file as it looked before that commit. This is actually not as easy as one would wish, but here it comes:

git log -p -1 [-m] [--follow] [hash] file

Let’s break this one down.

  • Weird enough we use log -p where one would assume git diff
  • -p will log only changes to that specific file
  • -1 (optional) will limit to only one entry, in our case we do
  • -m (optional) will allow us to diff with merge-commits, most likely we do
  • -follow (optional) will follow commit history of file even if it was renamed
  • hash if we omit this it will show the latest introduced change, we might want to inspect an older one
  • file yeah, no dashes… I do find git syntax to be quite inconsistent

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 =)

Dec 23 2021

Demeo wins big at UploadVR Best of 2021 Awards

Demeo managed to win grand slam in UploadVRs Best Of 2021 Awards where it did not only win every single category it was nominated in, it also won the very prestigeful Game of the year!

Demeo won these awards:

  • Game of the year
  • Best Co-op multiplayer
  • Best PC VR game

And on top of it all, Resolution Games won Best VR Developer.

Very, very, VERY happy about this =D

Best Game of the Year
Best Co-op Multiplayer Game
Best PC VR Game

Nov 19 2021

Demeo wins VR Game of the Year

WE WON \o/

Among some pretty firece competition, including:

  • Doom 3: VR Edition
  • Star Wars: Squadrons, by Electronic Arts
  • Star Wars / Tales from the Galaxy’s Edge, by ILMxLAB

My old, dear, 3.5 years in the making, pet project Demeo managed to take home the prestigeful VR Game of the Year Award. I cannot express how proud and happy I was to receive these news. Me and my awesome team members has worked so hard to make this experience be something really amazing, and both the engagement from our community, and awards like this, makes it feel like it was truly worth it.

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.

Jun 28 2021

Demeo: Realm of the Rat King

Just a few months after the initial release, and some very hard work from everyone on the team, we managed to release our second module “Realm of the Rat King”, which added a few new interesting game mechanics (like how darkness limits your view range, which adds the need of torches), which turned out to be brutally difficult.

But with a huge and active community, players soon managed to figure out strategies to help defeat the infamous Rat King.

Jun 13 2013

Ripple Dot Zero

Lets cut it short! Ripple Dot Zero is my Magnum Opus! For five years me and my childhood friend, Simon StÃ¥lenhag, worked on this in our spare times. It’s an action platformer, heavily inspired by our favourite childhood Sega Genesis game titles such as Sonic the hedgehog, Strider, Wonderboy in Monster World…