Skip to main content

Posts

Infantry combat and entering buildings.

I've been working a lot on the game recently and I've nearly rebuilt it to the level it was before. Past that maybe, since now I have the beginning of a working combat system and the ability to save and load the game.


Infantry can now occupy a building. It's quite an abstract representation, since they stay at the door and turn invisible. But they can then fire from one of the windows and take damage from shots at the windows too. I think I've set it up well so that when building damage and destruction is working then the system should continue to work.

For combat I tried some new ideas, but they didn't work out that well. It seems that it's important that viewing range should be further than shooting range. Now shooting range is pegged at 18 units of distance, while viewing range can extend out past that.

In the above image one unit has an officer, so has further viewing range. The other can only see as far as they can shoot, a dangerous situation since the en…
Recent posts

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…