Skip to main content


Showing posts from 2017

Back to Vinland.

I'm going back to my real time tactics project, Vinland 1936.
While working on the other project I overcame the problems which were stopping me from saving/loading the game and also cleaned up the base code a lot.

After a few weeks I'm getting near the the state I was in before.

Infantry are back to their previous state, and vehicles are running OK.
This time I'm going to push ahead with mocking up the combat system though before I work any more on the vehicle builder or graphical aspects of the game.

Item's Icons

"What is that ugly mess?"
Well, it's a test for a dynamically colored set of items.
The original icons were taken from here, a great source of black and white game icons. Very useful if you're planning your project and need some stand it art.

The red channel is the grayscale image, the green channel holds a mask for non metallic, non-colored sections, like rope or bare leather. The blue channel holds a mask for dynamic colors.

The masked areas can have their input adjusted by a three channel input (RGB) from a material, to control hue, saturation and value. This gives a wide array of different colors meaning that no two items generated by the item generation script should look identical.

Here's what they look like when passed through the shader:

Ok, still a bit of an ugly mess... I think I need to start with better material than a faked hightmap from a 2 bit image. :)

Honestly, I think 2d art is my worst area. I'm probably just going to move on and come back…

The pits!

I added the possibility of pits or water to the dungeon yesterday:

I also added some debugging tools to reveal the map on command. I noticed a room sometimes isn't connected. I think it has to do with adding rooms manually. I'll sort that out as soon as possible.

I also have been working on item generation.

Sample output from the equipment generator:
Perlmurite armor
Iron man-trap
Broken, cooked eggs
Brass handbow
Feathered clothes
Hollow, corroded, copper hatchet
Occult, rare, gyium-leather sandals
Rudde-leather cape
Oil stained, white-copper ring
Enchanted, brewed meat
Brewed medicine
Perfect, gyium-leather armor
Awesome, composite, brass handbow
Ivory mace
Magical, akkadi-iron greaves
Fur choker
Old, haldiris greaves
Extended, gyium-leather leggings
Magical, iron hatchet
Magical, perlmurite treasure
Light, bronze, narrow hammer
Animal-hide shield
Occult, gyium-leather belt
Blood stained, grubby, iron throwing-axe
Magical, gold coins
Ruined, spoiled, jellied eggs
Oil stained, lead anklet
Enchanted, ha…

TOTDD 2017 Video Diary number 3

Another video diary can be viewed here:

This shows at least part of the screen layout. I'll be working on the inventory and UI next. You'll be able to drag and drop things right from the UI to the viewport.

Level generation types.

I've now narrowed my level generation methods down to two. Previously I was also using randomly placed rooms and BSP trees, but with one the corridors were too long, and the other suffered from terrible predictability.

The two I'm using are (1) cellular automata and (2) collision based room insertion.

In the maps above the D and E maps are type 1, a kind of cavern like level. There are several inputs like coverage and smoothness. They basically generate these two extremes, very open, joined caves, or sparse tunnels. I may add double thickness corridors to the (E) map as otherwise they are annoying to play (no room for maneuver).   

Type 2 maps start by piling up a bunch of random rooms in the center of the map. Then they run collision detection to push them apart. (A) is a map with quite high padding value, which places the rooms far apart. (C) is the same method by a padding value of 1. The rooms are quite close together. Corridors are short, which is a good thing.

(B) and (…

Map screen designs

I've been working some more on the map window. Right now you can only see the base, it doesn't show items, enemies or even doors on the map yet. These would be decals.

In the top window you can see the modified result of last night's tile based map. It looks good but there are some visual artifacts related to the problems I encountered yesterday, and as well it takes much more code and time to calculate.

The second window uses a cheap trick to fake an beveled look from a smoothed version of the 32x32 map. It uses black to mask unexplored areas.

Finally the third version is meant to look like a had drawn map. I'm using a cross hatching texture to distort it and unexplored areas are shown as blank map paper.

There's going to be a mechanic in game where you need to use some paper every level in order to activate the map for that level. From there it will fill it in automatically. Paper will be pretty rare so it might be worth keeping it safe for the more complex level…

Problems with map display...

I spent a total of about 4 hours trying to find out why my map wasn't displaying properly.
Turns out there was nothing wrong with my code, or my shader, the problem was in the imprecision of the floating point numbers used to scale the UVs and the default use of sRGB color space by blender.

(top left) This is similar to what I was getting, obviously not right, but I couldn't figure out why.  
(top right) Using data from the map each square is given a red color from 0-255.
(bottom left) There are 16 possible arrangements of tile and the red color offsets the UVs of that tile by a set amount.
(bottom right) The rather unimpressive final base result.

When scaling UVs Blender avoids imprecision in floating point number by just rounding up to a more suitable number, so 0.0625 becomes 0.063. This is fine usually, as you don't really care about pixel perfect placement in most applications. But when your total image is only 32 pixels across it can cause issues as 1 divided by 16 i…


Treasures of the deep dwellers is not a triple A game. It's going to be pretty old fashioned, with a small viewport and a map on the same screen. Much of the rest of the screen is going to play host to the UI which will have a lot of the stuff you need all on one screen.

I love the great graphics of modern games like Legend of Grimrock, but the blender game engine isn't really up to the task of making games of that caliber. I also don't have that much time to devote to asset creations, meaning my game simply wouldn't look as good even if I was as talented as the guys from the major studios.

Anyway, after working on the viewports I found happily that it greatly increases the performance of the game. Rasterizer usage is way down, and the viewports mechanism also allows people with slower computers to reduce the resolution of the viewport without changing the main window. If you wanted you could ramp it way up too and enjoy my dated graphics.

After a few tries I managed …

Dynamic Item Generation

This week I've been fleshing out the dictionaries for my dynamic item generation system.
I made a few changes since it was first designed, like simplifying the materials and making them less exotic. Now there are a lot of normal materials (like COPPER and GLASS) and some exotic or magical materials.

Items are generated with a number of attributes. Which ones they get depends on the type of object, its quality and its material. Here are a few examples:

I think it's going quite well so far, though I'm having to generate a lot of items and check their attributes so I can fine tune the dictionary rules.

You can see the "CLUB$1" up there, which is a rare, ivory, toy club.
I think children's club would be a better attribute than toy. That sounds strange in some cases.

There's a ugly, copper long-sword, which is both blunted and corroded. Items can have several damage attributes, depending on their quality. As they get used in game and pick up more wear and te…

2017 TOTDD Video Diary 2

For anyone who's interested in the newest version of the game you can see the current video diary here:

I'm very happy with the atmosphere of the game so far. I feel like it's something I can work with.

I've got a lot of ideas for the game, but for now I'm just going to keep slogging away trying to get a working gameplay demo.

The schedule so far is:

1. Item generation.
2. Basic player stats.
3. Inventory management.
4. Moving items between the screen and the inventory.
5. Using items to attack and trigger events.

I'm going to be working a lot with messages this time around. That should clear up many of the hurdles I was facing in past versions of t he game.

One problem I had before is that I had to complete both player mechanics, and enemy mechanics simultaneously. A player attacked a monster causing damage directly, the monster had to process that damage and so on.

With messages, I can just send a message and forget about it. It doesn't matter that the m…

Revisiting Treasures of the Deep Dwellers

I ran in to some serious problems with Vinland 1936, so I'm shelving it for now and revisiting an earlier project. Kind of.

Treasure of the deep dwellers was a 3d team based roguelike. Some ways it diverged from standard roguelikes is that it had multiple player characters (a team of 4), real time game play (not turn based) and it had 3d graphics. Unfortunately it was a bit more than I could handle.

The new approach is an attempt to simplify the project so that it can function more like a traditional roguelike. A big problem I had before was keeping track of the 4 agents. They tended to run off or get lost. I had to calculate line of sight and map reveal from all 4 agents. Now I've switched to an "Eye of the Beholder" type setup, where the whole team is contained in a single tile.

Likewise monsters are represented in mobs of up to 4 agents in a single tile.
Other benefits of this type of gameplay is that you never need to see the player's characters (except for t…

Vinland 1936 refactoring.

As usual after finishing a game jam there's loads of stuff that I learned that can help me to make better games. Going back to a work in progress now feels really difficult because so much of the existing code looks ugly and inefficient.

I think I'm going to strip back a lot of the work I've done on V1936 so far and rework it.

Here's the new structure I want to implement:

Before, fog of war, level generation and agent management were all direct elements of the main loop. What this meant was that if I wanted to restart the game or load a new level it was best to reboot the main loop (restart the game), but this has quite high overheads all of its own.

During the making of "The Hole" I implemented a level manager, a container for the level and all agents etc... contained within it. I could pause the level, or reload it or do anything with it, without affecting the main loop. This made it great for adding cutscenes, or menus such as the inventory. It also mad tr…

BGMC 23: Aftermath.

Well another Blender game making contest is finished and as usual it's left me to re-evaluate what games I want to make.

I had great fun making a story based adventure game, and I'd like to set up a collaboration to make another one, with some other artists.

The game would be developed over a set window, like two months and then released immediately, maybe try for steam greenlight. It would be nice to try and do something in a set time span instead of the almost endless development cycles I have with my other games.

Anyway, if you want to play the games from BGMC 23, including mine you can download them here. 15 games to try out for free, that's something you don't see every day. :)

I'll leave with an animation of one of the scenes I designed for the game, a proper matte painting, the first I've ever tried:

Telling a story; Creating a Compelling Narrative.

Telling a story; Creating a Compelling Narrative. In this blog I will talk about my own recent brush with story telling and go on to talk about how tools from creative wring can help you to better author the narrative in your games, whether they have a traditional linear narrative or a procedurally generated interactive narrative.

Narrative and structure in traditional fiction  last week I started writing a story set in the world I'm developing for my game Vinland: 1936.

I hope the story will help me to flesh out my game world and develop my own expanded universe which will be a good place to set my games in the future.

After about a week of work, on and off I've progressed the story to outline stage. For each character thread I have half a dozen chapters which plot a course through the events of the story. Each thread is told from the perspective of a different character.

Actually I started writing as soon as I had my outline, but I've since gone back and deleted what …

Modernizing the UI.

I'm revisiting the vehicle editor currently, partly because of some issues what have cropped up with how vehicles are saved and loaded. If I'm going to go back and dig in to it that deeply, it's better to rewrite it.. and update the visual elements at the same time.

Here's a preview of some of the elements of the UI, I've simplified and cleaned them up a little. I think it looks better already.

On the writing front I blocked out the chapters for the story, I'm pretty happy with it. This is the first time I've approached writing like this, with writing a chapter summary for each chapter and then going back and expanding the scenes to fill in the chapter. It makes much more sense than just starting writing from page one and going with the flow. That's why all my previous stories failed probably. :)

Happy People have no Stories.

OK, following an exchange on Deviant art, I've decided to write a short story:

S7alker117 That sounds really cool. Looks like the kind of setting where you could write some great stories in, a little in the line of 1632, dunno if you know the series?pickledtezcat I hadn't heard about 1632, but I just looked it up. Sounds interesting.
I actually have got a plan to write some stories in the setting, and possibly open it up to anyone else who wanted to.

I love the alternative history novels of Harry Turtledove, the way he uses ordinary people who can enter and leave the narrative at any time instead of main characters who can't die.
It allows him to really put in the background details while sketching out the overarching themes and history. (1632 sounds somewhat like this from reading the wikipedia article)

The thing I love about his books the most though is that you never know who is going …

What is Vinland 1936?

S7alker117 asked me today on Deviant art:

What's the story behind this project, if I may ask?
To try to lay it out as briefly as possible:

It's an alternative history "... if Alfred the Great had been defeated and England had become The Daneland".

From this base, using Anglo-Saxon and Celtic Slaves, Viking settlers were able to colonize North America. However, the little ice age which brought viking occupation to an end in our own history left this fledgling civilization isolated from Europe for around 300 years.

During that time Christianity developed differently, partly merging with the pagan beliefs of the viking settlers and partly being subverted by the Vinlanders as means of controlling their slaves and lower classes.

There are some other departures from our own history;

The Eastern Roman Empire and the Holy Roman Empire of Charlemagne were (re)united by the political marriage of Charlemagne of the Franks and Irene of Athens to form a pan European Empire…

More Artillery!

I got the artillery converted over to act like a hybrid unit.

I really like how they turned out, though it did expose some messiness in my code. After cleaning up some junk I feel like the project is pretty well organized so far.

Here's an animation of the light artillery:

And the heavy artillery:

With artillery you can set your crews to defensive stance to protect them from enemy fire, but it makes their rate of fire and movement rate slower.

I'm considering allowing artillery to be sandbagged (fortified) and camouflage nets to be deployed when in sentry mode, as a special skill for high level units.

Stress Test and Artillery

I did a stress test with infantry yesterday:

The important bits to look at are "Logic" which is the performance of my python scripts and "Rasterizer" which is how long the scene takes to render.

At this point with around 375 infantry men in the scene Rasterizer is proving a much bigger drain on resources than Logic. In fact Logic costs are really very low indeed. They'd have to double again before you'd get a loss of frame rate from 60fps. That's great news!

Some other things I worked on this week:

Adding the code for units to use binoculars. This allows you to see further but with a limited field of view. Good for scouts or officers.

Began working on artillery units. For now they work almost exactly like vehicles, the infantry modes are just static meshes. I hope to make them a kind of hybrid unit with mesh guns and sprite crews. But for now they work like this.
The have to be deployed before use, and stowed for transport. This takes a little time, depen…

Happy New Year!

Happy New Year!

It's hard to believe I started the germ of an idea that became my current project over 2 and a half years ago!

Over the last few weeks I've done a lot of work to get the UI up and running and to get infantry movement modes functioning.

You can watch my latest video Diary here.

And here's a GIF of the infantry movement modes and UI status bar in action: