18th July 2013

Post

 

Last Post on tumblr

Hello to my few followers on tumblr. I must regretfully inform you that this blog will no longer be active. All blogging activity has now moved to: 

http://dungeoncolony.blogspot.com/.

Additional links to consider:

Au revoir & auf Wiedersehen

16th July 2013

Post

 

Behavior Trees

I have spend some time thinking about the problems I face with the game AI. To this point my ‘expert system’ is crumbling under it’s own weight and it’s time to make it more robust. This became apparent when enemies started behaving strangely. They start twitching horribly and you know that an enemy is trapped in some decision loop. Then there is the next game/dev feature that I am planning for, which will be an editor. Eventually I want to be able to script event’s in that editor as well as build maps. Having a behavior tree in place seems to be ideal for scripting events. 

I started looking into some resources and the best I could find was the one everyone’s been talking about: Alex’s presentation [requires free signup as of this writing]. It’s really well explained and he goes on about the second gen. Behavior Trees. I think I will start of with my own implementation of using the first gen method. The second gen methods are mostly performance improvements which, apparently, can be implemented later.

This site (Introduction to Behavior Trees by Bjoern Knafla) is also a good resource and he also points to Alex’s presentation

My plan is to roll in the behavior tree alongside my current decision manager, by starting with npc creatures like the boar’s AI. This should be an easy starting point, boars are not particularly smart :don’t run into a tree and that’s it (ok they can fight too). Then, move on to implementing the spiders, enemies, then minions and the dungeon master. Working my way up from simple creatures to more complex ones could help identify what type of Nodes I will need in the tree. The two standard and essential nodes are are commonly referred to as Sequences and Selectors. Other specialized nodes include Concurrent/Parallel nodes, Decorator nodes, Looping nodes, Randomized nodes, Weighted Nodes using some Machine Learning result…  

14th July 2013

Post

 

New Feature Screenshots

The following screenshots show some of the new capabilities of the engine. You can place items anywhere and create more decorative scenes. I am going to start working on a level editor, which will allow me to make the the missions for the main quest. But I also want to open up the level editor to players.

Please like, share or favorite. Thanks =D 

If you haven’t tried the alpha yet and would like to contribute in debugging, balancing or just playing, feel free to download the alpha built at here. You may also back the game and make a financial contribution if you wish. =)

Spiders Den:

Hunter’s Camp:

Treasure Trap:

Source: dungeoncolony.com

14th July 2013

Post

 

Update 55 - Dungeon Colony Version 0.1.8.150

Greetings Dungeon Lords,

    I have been waiting for this moment a long time and I am happy to be able to post a new version again (v.0.1.8.150). As you will read, this version caused many bugs, and bugs seemed to appear exponentially. But most of them are now fixed and the engine has become more stable.

In the past, I had been releasing a lot new game features without tending to some other important game engine needs. Finally, I began tackling them a few months ago. The engine upgrades had been on my to-do list for quite some time, and I now regret not having started work on them earlier because the main issue here was that they concerned changing much of the core engine, which in turn affected almost every element, feature and game content created thus far. The only regret, really, (and my learning experience passed on to other game devs) is that of time and taking longer than needed, but nonetheless, it was tremendously fun to make the changes and see the engine improve upon it. As an independent developer however, and if you are one you will most likely agree, life often comes in the way of the thing you’d like to work on. For me, it was personal family matter, my day-time work, of course, including tight deadlines, but also a much needed break and a vacation to go back home to Europe and recharge the creativity batteries and get a bunch of new inspiration from some amazing landscapes and medieval structures. If you have been on my contact page, you may have noticed a picture of me there, in front of a castle. During my vacation, I finally hiked again to that same castle, a place of inspiration to which I used to go to constantly when I was younger.

A big apology to all Alpha testers who have already constructed big dungeons and saved them to the server: Anything saved before v0.1.8.150 is incompatible with the new engine; the changes in the game engine made it impossible (or way too much work) to be still compatible with the new engine. In the past, I tried to avoid that as much as possible, however, since this is still Alpha, and the main architecture of the engine is still not complete, this is something that is unavoidable and will still happen in the future.

Below is a rough summary of all the primary engine changes that were implemented since the last release.

The main objective was to improve three core features:

  1. Allow creatures and objects to be positioned freely on the map, regardless of the bounds of tiles.
  2. Allow objects and creatures to have bounds/sizes that match their image.
  3. Improve movement and path finding based on the two previous changes.

The game was originally based completely on large tiles, which also governed movement, object placement, object triggers, collision and much much more. The upgraded engine required granulation in tile size that affected nearly every class in code. Back when I started Dungeon Colony, the first thing that I defined was the tile sizes. Here is the first screenshot I made after a few hours of coding the game. These are the different tile materials (stone, water, ground). The new engine is much more defined and can handle arbitrary sizes, removing the tile contraint and opening up amazing new game object possibilities than before. Size matters and brings new strategies to the player with regards to where objects are placed and so forth.

Reducing the tile size constraint also allows objects to have sizes that are bigger or smaller than a tile. For example, in terms of collision boundary, a rock is now around 8 times smaller than it previously was. This also reduced the selection boundary, the visible white rectangle that you see around a selected object on the map.

So far, I have never had that many bugs at once and with careful iteration, I managed to get the game back into a working shape, but I still need your help to find any remaining bugs left uncovered, especially when it comes to saving a game. I believe that there are still some bugs left that don’t save objects properly.

Summary of changes:

Website:

I moved to a new web server which caused the website to malfunction for a few days. The only problem was the registration page which is now fixed again. I am also trying to decide on a community forum and looking for different services. If you have a preference, I’d like to hear from you. The website is written in .Net, so something that is compatible would be good.

Summary of Changes/Upgrades in version 0.1.8.150:

New Features:

  • Coal Resource: This resource can be found when mining Rock walls. It replaced wood as the fuel for the furnace. You can use coal to smelt raw iron into iron rods. Iron rods into steel plates. Sand into glass flasks, and clay into clay pots for water storage.

  • Sub-Tiles: Sub-Tiles allow objects to be placed with more precision on the map. This means that placing a chest for example does not have to be constraint by a tile anymore, but instead, can now be placed almost freely on the game map. The new sub-tile grid still constraints object placement to a certain extent, which gives the player pleasant feedback, when object stick to the area where placement is possible.
  • Cancel Orders: Allows players to cancel command by selecting the object that has been assigned a command to. In most cases a button will appear on the right hand side labeled “Cancel Command”.

Upgraded Features:

  • Upgraded to LWJGL 2.9.0
  • Path-finding: Given the new sub-tile constraints, the path finding algorithm needed to be upgraded to work with smaller tile sets and with arbitrary object sizes. The new path add new strategic elements since placing objects can change the outcome of your tactics tremendously. A bit of optimization is still needed, but that’s left for a future version upgrade.
  • Objects & Creatures resized: Nearly every object has been resized to scale better with the game world. Previously a log of wood or a pile of coins had been too large and misrepresented when laying on the map. Enemies also appeared to big and their bounding rectangle often extended beyond their actual position, which caused inaccurate collision detection.
  • Object & Creature selection. This improves selecting creatures and objects on the map. Moving entities, like creatures, does not require clicking within their boundary (selection frame), some tolerance allows you to select a creature even if the mouse is not covering the creature completely. However, non-moving objects do require the mouse to be intersecting the selection boundary.
  • Creature movement: Movement has also been updated with regards to the new subtitle system. Idle creatures walk slower and have slightly better intelligence. (more to come)
  • Light/Shadows: Light sources have been updated to match the new sub-tile position constraints.
  • Traps are now obstacles that your creatures can’t walk over any longer. Unlike enemies and neutral units like the boars, your creatures still know where traps are placed and will walk around them. Placing traps requires more strategic planning since you can’t just fill a corridor with traps for enemies to step in. You also need an open path for your creatures to pass by.
  • Lumbering wood: To lumber wood, you now select a tree and right click on it. This is the standard way to activate any object that can be activated. Similarly, you right click on a leg trap to re-arm it, or you right click on a patch of mushrooms to collect them…
  • Creatures recalculate path when following another creature and if the followed creature has moved a certain percentage away from the original target point of the calculated path.
  • Adds red attack indicator over target when a creature is attacking a target
  • When selecting a creature the crosshair shows the target center position if this position is walk able. If an object is selected, the target position is shown using the actual object sprite.
  • Placing objects over themselves is now possible. This allows to move larger objects by a fraction.
  • Changes the trigger area of traps using a reduced boundary than the selection boundary.
  • Increases stamina potion strength 10fold.
  • All friendly units return used/empty potion flask back to their original container after drinking them. If it was in the creatures bag, then that’s where they stay. If the potion was taken from a container, like a chest, then it’s returned back into that container.
  • Re-prioritizes eating before getting paid.
  • Updates tree growing and reproducing behavior. Trees grow slower and can only reproduce when reaching a certain size. Tree’s also return different amounts of nuts given the size. And nuts are less calorie rich then before.
  • Allows player to place items outside of the dungeon.
  • Increases the uses of leg-traps.
  • Changes the recipes for certain objects (Campfire, firebowl, and bookstand)
  • Adds Alchemy bar to study items.  

Bug Fixes (unrelated to game upgrades)

  • Fixes bugs with new web-server and problems with the registration page
  • Fixes some issues when transferring objects to other objects.
  • Fixes many issues with attacking enemies, including facing enemies correctly, collision with enemies and other issues, such as enemies trying to attack each other when separated by non-walk able objects. Friendly creatures will ignore blocking objects while enemies will try to destroy them.
  • Fixes bugs with transparency issues in OpenGL drawing methods.
  • Fixes issue with consuming potions where health had to be lower than max. Also consumes only one at a time. Fixes button for consuming stamina potions for the workers.
  • Fixes issue where objects like the table rotated into other objects or walls.
  • Fixes bug when selecting items produced in the furnace, alchemy bar or cooking pot.
  • Fixes bug when the Frame of the Study moved after closing and reopening

 

I would greatly appreciate your feedback, comments or suggestions. You can reach me via twitter or check my contact page. Finally, if you haven’t tried it yet, you can download the game free at http://dungeoncolony.com/Download. Support is always very much appreciated. 

Source: dungeoncolony.com

18th April 2013

Post

 

Dungeon Colony - Engine Update - new path finder nearly implemented

The new Engine Upgrades are coming along well. However, it is taking longer than expected since I am making some other much needed engine upgrades concurrently. But on the bright side, every change and every re-factoring will benefit in the end and it gets me more excited by the line. 

I continued with the implementation of the new pathfinder. It caused a lot of bad bugs or design patterns to emerge, and the bugs originate from some unfinished old code that needed to be refactored and completed anyhow.

Units are following paths again, but now much more precisely and with totally arbitrary sizes. That will allow me to make amazingly large creatures. Every creature’s size becomes a clearance value used in the pathfinder to determine if a creature can walk a narrow space or not. That precision will become apparent in the next round of engine upgrades that I am currently working on, but I will explain those details when its finished. For now, I need to focus on fixing all the bugs and logic in all corners of the code where path planning is used. 

I spend the last hour or so adding social media buttons to this blog. So please share if you’d like =). 

Source: DungeonColony.com

15th April 2013

Post

 

Dungeon Colony - Engine Upgrade

This is another development update about the new Engine Upgrade I am currently working on.

Parts of the engine are very old, in fact, the original pathfinder was one of the first algorithms I programmed for the game. But it lacked a lot of features and had some issues. 

Over the weekend I began implementation of the HAA* Pathfinding algorithm. Unfortunately, the path results were sub-optimal given my requirements and that made some paths look unnatural in rare situations. Even smoothing of a calculated path didn’t result in the expected path. The algorithm is amazing when it comes to speed. So I will keep the code for future reference, especially since there will be an instance in an upcoming game feature which will require an abstract graph of the map (see paper for more info about that).

Instead I started working on an algorithm somewhat similar to Lifelong Planning A* algorithm. I’m not quite done yet, but the results are already great. I always try to make sure that such algorithms run fast on my crappy hardware under extreme conditions and I was surprised to see it work quite fast on a netbook (1024x600 res, 1.2GHz and 1GB Ram, Windows XP). I had to turn off some features that weren’t supported on my netbook, (shaders to name one), but in the end the algorithm performed as expected.

Next, I will implement the new pathfinder into the engine. This will require a lot of cleanup and refactoring, which I am mostly excited about - who doesn’t love clean code!

Source: DungeonColony.com

11th April 2013

Post

 

Dungeon Colony - Interim Development Update

Hi. I have started development on a larger engine upgrade to expand the foundation of the tile map, path finding, unit AI (enemy and friendly) as well as Object management. This engine upgrade affects countless game elements and will take a bit longer to complete. I will periodically update you  to give you an idea if this upgrade is going in the right direction. There are still some unknown obstacles I have to prototype and test before determining if this upgrade will actually be released for alpha testing. I am very excited because the list of new features this upgrade will allow is big and the level of depth to build your dungeon will increase. I won’t comment on details until at least some prototypes show success. 

 

During that time, Dungeon Colony can still be played. The latest most stable version is v 0.1.8.70.

Source: DungeonColony.com

5th April 2013

Post

 

Update 54 - Dungeon Colony Version 0.1.8.70

Hi. This update (v 0.1.8.70) fixes more bugs.

Summary:
- Fixes typo.
- Restores previously discovered items for crafting after loading saved game. 
- Fixes a nullpointer exception that was caused when picking up items.   

Source: DungeonColony.com

4th April 2013

Post

 

Update 53 - Dungeon Colony Version 0.1.8.67

Hi. This update (v 0.1.8.67) fixes some more bugs. Mostly caused by the new objects added recently. One of the main issues you may have noticed was with potions. They caused problems loading saved games.

Update Summary:
Updates
- Minions can now place a red gem directly from their bag into a shrine.
Bugs
- Fixes Bug that crashes saved games due to brewed potions. 
- Fixes Bug that crashed saved games due to dead spiders. 

Source: DungeonColony.com

31st March 2013

Post

 

Update 52 - Dungeon Colony Version 0.1.8.64

This is a small update (v0.1.8.64) that fixes a few bugs thrown by Alpha testers. Thanks for testing!!

Update Summary:
 Fixes bug loading dead spiders.
 Fixes bug when trying to remove walls on map edges.
 Fixes server request bug.  

Source: DungeonColony.com