Tag «game dev»

bloed

I like blocky graphics. Pixels, voxels, square tiles, grid-based walls - keep them coming! I guess this originates from my Lego-heavy childhood, and also from old computer games, where you could clearly see the tiles the game’s world was made of. And while I never was into Wolfenstein3D, I recently created my own grid-based ray-caster just because I do adore the aesthetics.

rc-test, a ray-casting engine

The same with Minecraft - it’s a game that is an inspiration even though I didn’t play it much. The blockiness makes the virtual world instantly more organized; it’s like you can play around with its pure atoms. Blockiness empowers - not only is it fun to be creative there (because the interactivity is rewarded with reactions from the game’s systems) but as a game creator myself I instantly “get it” and - leaving out the grindy details - want to try my own variation of the structure functionality.

Wunderworld, a game/editor I made for Ludum Dare some years ago

This is why I wanted to go with block-based levels for Behind Stars And Under Hills. For me it also fit with the premise of the game - an Ultima-Underworld-inspired dungeon crawler should have visible floor and wall segments, and pixels too. So I created my own in-game level editor for Behind Stars - because, maybe, other people want to make worlds with this too...

An early version of Behind Stars, made with bloxels

Of course trapping a level editor inside a game that is never released makes the endeavour less than pointless. So last year I went and put some time into changing the code to work inside Unity itself, as a plugin, which was for some parts easy thanks to the extensibility of Unity’s editor, and for other parts hard because of nasty serialization issues. Nonetheless, bloed - short for “bloxel-based level editor” or simply “block-based editor” as “bloxel” probably won’t catch on - slowly came to be and is now available on itch.io. I wanted to use it for a Thief-like game, working title “Demon Thief”, and for that it worked quite well. (Though I scrapped Demon Thief in favour of our next game project.)

A level from Demon Thief

I nicknamed the blocks in the editor bloxels because originally, in Behind Stars, I called them voxels and that didn’t quite fit. I use complete meshes for the blocks (made with Blender), and they can have any shape actually, as long as it fits inside 1x1x1 units. It’s also possible to do some more creative texturing by having UVs smaller than 1.0, which means they can span over several bloxels, to break up noticeable tiling and add more variation. It’s also possible to assign each side of a bloxel another texture (inspired by David Pittman’s NEON STRUCT dev blog). Naturally you still can manipulate the bloxels during runtime, so it’s possible to have something like destructible environment.

All my “additions” to the voxel formula makes the bloxels rather unfit to optimize though. Of course I segment the created geometry into chunks, and the textures are merged into texture atlasses. Still, draw calls are high and need to be reduced with optimizations like static and dynamic batching, occlusion culling, baked light maps and so on. Downsides aside, I am proud bloed supports arbitrary transforms and prefabs, and the optional noise factor can look nice too. These are things the ingame-only Behind Stars bloxels didn’t have.

Will the development continue? I hope so - especially if a few more people are interested in it (i.e. buy it) and post their creations made with bloed. Right now I don’t use bloed for a personal project, although I have some ideas and plans for that. So its future might be a bit hazy, but in general bloed is usable already, and I certainly will react to any bug reports. If you want to talk about bloed, you can also do it in our Discord!

Ray-caster – an experiment

I participated in a Kajam, which is an regular-ish game jam hosted on alakajam.com with different hosts. If you remember classic Ludum Dare, this is the equivalent to a Mini Ludum Dare, where hard rules like ‘everything must be from scratch’ or the weekend time-frame are much more relaxed. The theme of this particular Kajam, running the whole January 2021 and hosted by toasty, was “make a game based on ray casting”, and one could interpret this any way possible, but of course the basic idea is to get your hands dirty and actually try to create a ray-caster. If you don’t know what that is, the most prominent example for a ray-caster is Wolfenstein3D from 1991, back when there was no 3D hardware for PCs.

Wolfenstein3D, by id Software

My entry for the jam became a ray-casting engine with a very rudimentary level editor, or a sandbox if you’re generous. I had some gameplay ideas, but as I could not work fulltime on the project, and most of my experiments didn’t result in anything playable, the state for now is that there’s just no game. Yet for me, creating a ray-caster, based on tutorials on lodev.org, was a feat in itself, so I still wanted to submit it. With only one weekend left I decided to make it a “playful” level editor - meaning the editing (placing walls, changing textures, resizing the rooms, etc.) happens inside the “game” in first-person perspective. While this is actually not really an efficient way to create a level, it definitely makes it a bit more interesting and fun.

Textured walls, the first highlight

I utilized haxe, Kha and zui for this project. The first two I already tried for another software rendering project - the “Ray Tracing in a weekend” version I did 2 years ago. So I knew Kha could be used to just draw some pixels (probably grossly under-using this framework), and I like how it supports virtually every platform. The latter was a life-saver for me because the web version turned out to be not ‘compatible’ with my input method (as locking the mouse cursor always is a risk in browsers). But the Windows build turned out fine, after I had to fix a surprising bug which switched the textures’ red and blue channels. Zui, the go-to solution for tool GUIs for Kha, was relatively easy to understand (after quite some tinkering with the elements), but unfortunately it doesn’t feel as powerful and flexible as the Immediate GUI I know from Unity. Still, it was much better than nothing, and helped me to add edit functionality quite easily.

Final (jam) version of my ray-caster, with editor

Features of my ray-casting “engine” are, for now:

  •  textured walls, floors and ceilings
  • 3(!) block layers (bottom, center, top)
  • sprites (for the center layer only)
  • more or less correct display of infinite wrapping levels
  • collision with walls

It also supports different wall textures for each block side, but this feature isn't shown in this prototype unfortunately, because I had no time to add an editor mode for this. As I have a lot of overdrawing (mostly thanks to the top and bottom block layers) the performance is worse than it could be, and with infinite wrapping levels fps get low very fast as soon as you have a bit more sprites visible at once. Still, it’s good enough for me, because I do not target DOS machines like some of the more impressive entries of the Kajam do.


Be aware that YouTube videos try to set cookies and contact Third Party servers!

Most pictures (textures for the walls, and five of the seven sprites) were pulled from textures.com. This is also only rudimentary, as there is no game; but I expected to use photos for the environment from the beginning anyway, for whatever game I would do; I am still inspired by Ultima Underworld II in this regard.

Ultima Underworld II, by Looking Glass Studios

While my use-case for the engine is not necessarily a dungeon crawler, I definitely would like to repurpose it for another jam game in the future. The biggest feature missing right now is level saving and loading, which I should add in any case. Other than that, the gameplay will probably decide what the direction is going to be.

If you want to try the Alakajam version of rc-test (I didn't have any use for a better name), don’t forget to read the control instructions on the entry page. And check out voxel’s excellent RAYKA!