Arcane Worlds 0.10

It was a long time since last update because of real life issues mostly. But it’s out now. Get demo or download new alpha version from your link if you purchased it before.

I spent a lot of time creating new GUI system and doing some research. I’ll use that GUI not only for Arcane Worlds, but for in-game tools, such as building editor, as well as for future games.

I also added birds. They fly around in flocks and attack when you get close. They are weak but agile, so self-guided and area-of-effect spells are better against them.

There are minor fixes as well, new artistic post-effect and optional crosshair.

Posted in Arcane Worlds | Tagged , , | Leave a comment

Arcane Worlds 0.09

All spells have effects now, so no more firecubes. It looks like a cosmetic change, but actually it’s a basis for future spells, including attacking ones. I’ll add more of them, and you’ll be able to find some of them while exploring the worlds.

The world generator is now scripted, so you can change it if you feel like modding. It can only generate terrain and water for now. I’ll add object generation later, as well as triggers and events to script the worlds.

Posted in Arcane Worlds | Tagged , , | 4 Comments

First boss fight in LEVEL UP! 0.05

The first boss is small and relatively easy to defeat. The ones further in the game will be larger and trickier. Also, bosses will be chosen randomly so you wouldn’t know which one you’ll encounter on a particular play-through.

I’m considering adding procedurally generated enemies next. But for now I’ll switch to working on Arcane Worlds.

As always, more about the game and demo download here.

Posted in LEVEL UP! | Tagged , , , | Leave a comment

How I do (not) debug my games

I’m writing this because I thought it might be interesting to other programmers. I used this method for about ten years, so it’s pretty sound.

I don’t use debugger. Well, I start it sometimes in (mostly futile) hope of getting a better exception stack trace. Or to look at the generated machine code in disassembly when optimizing. Otherwise, I find it mostly useless.

I don’t use “debug” build. I always build “release” with debug information. So I’m testing the same code people will use to play the game. Debug info is for getting stack info on exceptions and in some other cases.

When I encounter an error (crash, wrong logic, glitches or whatever) I follow these steps:

  • Thinking
  • Reviewing
  • Logging
  • Debugging (or, rather, taking a break)

Each step’s purpose is to get some new info about the problem. If I get new info, I go back to the first step – thinking.
As you see, debugging is actually there, but I rarely get to it. Let’s look at the steps in more detail.

Thinking

Stop and think: what can cause this problem? Is it the result of the code I just wrote/changed? What did I do to cause it? Or was it there before? What subsystems is it limited to? When does it happen, in what conditions? And so on.
Just thinking about the problem often gives some new insights about what can cause it. When you do small incremental changes (and I try to work that way when possible), the changed code is small and easy to grasp with you mind, and the problem is likely there.

Reviewing

Look at your code. Review it. Do you remember it correctly? What is actually written there? (Strange things can happen, especially if you use copy/paste/modify a lot).
Look for things you didn’t think about. Look for things that differ from what you expect them to be. If you use third-party library/engine/whatever, look at the documentation for the things you use to make sure they do what you thing they do, and accept those arguments etc.

If you find something, go back to thinking.

Logging

The code is complex. It can produce emergent results (that’s why you use it in the game, right?) So you might need to look at some values it actually produces. That’s where logging comes in.

Logging is the code that writes some text message to some log. It can be a log file, console, stderr, socket, whatever. You must be able to view all log messages though, and searching and filtering them comes in handy too.

Why logging and not a debugger?
It gives you exactly the info you ask for.
It puts it in context, with other log messages. You can see when it happened in relation to other logged events. You can see how often it happened. You can see how the value changed over time.
You can easily filter what values you log when you have multiple objects and are interested in only one of them. Or only values above a threshold. Or both.
You can surround the code with log messages and find where the exception occurs even when you can’t get a stack trace (be sure to flush you log though).
You can do all this in the release build.
You can do it even when you code for console/mobile/set-top-box/toaster/whatever.
It’s easy to turn off when you release a build. And it can be useful when the problem happens on some other computer, not on yours.

Some pitfalls:
Make it easy to automatically flush the log after every message, it’s essential when diagnosing exceptions or freezing. Or flush it always (might be slow).
Make sure you actually log what you want to log (reviewing helps here). If you write wrong value to the log, it can mislead you for a while.

Visual aids

That’s not exactly logging, but it helps a lot in games. You can write bounding box coordinates to your log, but actually seeing the box on the screen with other objects is much more useful and effective.
Make it easy to add this form of “logging” to your code. Colored lines that fade out over time are useful, for example. You can add them anywhere in your code and see them on the screen for long enough (but not forever). You can make boxes, circles, spheres, arrows or whatever you want just writing a function that conveniently adds multiple lines based on the parameters you pass.
Visualizing AI state, targets, ranges etc is extremely useful too.

Debugging

If everything else fails, you can try the debugger. But what info can you get from it that the previous steps didn’t uncover? I guess doing more thinking or taking a break is better.

Posted in Uncategorized | Tagged , , | Leave a comment

Mana gatherers

Mana gatherers are friendly creatures in Arcane Worlds who seek mana and bring it to your castle. They are spawned at your castle automatically.
Now, to open the portal to another world you need to collect enough mana in your castle. The castle also absorbs any mana dropped on it, so placing it strategically and fighting monsters near it could significantly speed up mana gathering.

The game is now in “alpha”, up from “pre-alpha”, so I raised the price to $10.
As usual, more info, demo download and purchase button are here.

Posted in Arcane Worlds | Tagged , , | 3 Comments

Vacation

I’m leaving on vacation tomorrow, August 20th. I’ll be back on September 10th.
I won’t write code, but I’ll sketch out some ideas, monsters etc. for both Arcane Worlds and LEVEL UP!
I’m going to get a mobile internet for my tablet there and there should be wifi at the hotel, so I’ll be able to answer your comments and e-mails.

So, the next game updates will be at the end of September.

Posted in Uncategorized | Tagged , , | 1 Comment

Arcane Worlds 0.07: Mana

Change list:
+ Killed monsters drop mana now
+ Spellcasting is now limited by player’s mana
+ When enough mana is accumulated, a portal to another world appears and monster spawning stops
+ A new spell to use portal to another world
+ Some worlds have flowing water now
+ Random sun position in new worlds
* Fixed castle spell bug (when shooting into the sky)
* Fixed wyvern shadow bug
* Fixed placeholder boxes rendering bug
* Minor engine improvements

It looks much more like a game now, so I’m going to change its status to “alpha” soon and raise the price to $10. For now, you can still grab it for $5 here and get all future updates for free.

I’m leaving on a vacation on August 20th. There might be another game update before that, if I’ll have enough time to finish it. Anyway, I’ll write another post before leaving.

Posted in Arcane Worlds | Tagged , , | Leave a comment

New purchase system and gift keys

I’ve simplified the purchase system on my site, so you don’t have to register or log in to buy my games anymore.

Instead, you’ll get a special link (the key) which you can use to download the game and all future updates. If you’d ever forget the key, you can request it to be resend to your email. The system is similar to what the Humble Bundle uses.

The old system is still in place, so if you already bought a game you can download the updates just as you did before. If you want a new key however, please email me and I’ll arrange that. I’ll reuse the account system for blog comments later, so it’s not going away.

You can also buy gift keys to send to anyone or use yourself. They differ in that anyone can change the email the key is linked to, but only once. So when you send a gift key to someone, they can link the key to their email to retrieve it if they’d ever forget it.

You can buy multiple keys now, so feel free to do so if you want to support me.

If you encounter any problems, please tell me: support@ranmantaru.com

Posted in Uncategorized | Tagged , | Leave a comment

Arcane Worlds 0.06

I’ve added first buildings. It looks like I need a building editor because coding them is cumbersome.

The most important building is your castle which you can now place with a spell. When you die (there’s player health now), you’ll respawn in the castle. If there’s no castle, you’ll be banished to another world (it would be universe map instead in the full game). The castle also accelerates health regeneration significantly. For now, the castle is indestructible.

I’m going to shape the gameplay further in the next updates. The goal is gatherable mana that’ll open a way to another world when you gather some critical amount of it.

Posted in Arcane Worlds | Tagged , , | 1 Comment

LEVEL UP! 0.04

Well, it took much longer than I expected, mostly due to real-life issues.

The main features for this release are bonuses (health and upgrade points), explosive barrels and new rooms which make levels more varied.

I wanted to add more enemies, but I found the collision system to be quite buggy, especially in object-to-object collisions. So I rewrote it from scratch. The new collision system doesn’t distinguish between the level voxels and objects/characters, and it’s much faster. It’ll make adding destructible bosses much easier too. So, I decided to release it now as is, and add more enemies in the next version.

Demo download and more info about the game.

Posted in LEVEL UP! | Tagged , , , | Leave a comment