Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - UroboroStudio

Pages: [1]
SFML projects / Kronos - Action, RPG, Roguelike
« on: May 22, 2015, 03:23:43 pm »
Hi everyone!

I'm proud to present the project I have been working three years by now. Kronos it's an Action, RPG, Puzzle, Roguelike game with lots of combats and item customization. The game takes place in a medieval castle and our hero must fight all kind of enemies and evil to survive, exploring more than 30 big areas of the castle and looting items improving your gear and ingredients to craft useful potions. Also you must use your brain because is necessary solve a few puzzles to open new areas and challenges. Search for items, combine them, use them on the right object, and find clues in books and old papers to know how solve it.

I post the official presentation with images and continue with some technical stuff.


Fight over 50 different enemies and unique bosses. Make your way using all sorts of weapons, from swords, axes, maces, bows, explosive arrows, poison arrows, freezing arrows. You can also create over 50 different potions that improve your character making it faster, stronger, more resistant, or become invisible and pass through these sentinels that you hate so much.


Delve into a unique experience. Explore the castle and its more than 30 areas and discovers his dark secrets hidden in it. Collect information, read old books and diary, and connects all the pieces to reveal your true purpose and how to achieve it. Get weapons and armor to progress in the game, level up and upgrade your character with multiple and useful talents that will define your style of play. Play your way without predefined classes.


This game is not only about killing enemies. To maintain a mind awake and active, it takes a few puzzles. But do not worry, you don't need a degree from MIT to solve them. All puzzles are logical and all the information you need are nearby in any book, diary or parchment to help you with clues. And if all else fails, you can always smash your head against the keyboard.


There are hundreds of items that you can find and create to improve your character. You are one of those who like direct combat, then put a heavy armor and an axe in each hand and start kicking ass. Or you prefer a more discrete approach with ranged attacks and using stealth, equip a dagger and a bow and kill your enemies before they realize. You can also wear a tunic and a magic rings and throw fireballs and destructive rays while you shout "YOU SHALL NOT PASS !!"



This game uses SFML for rendering, audio, events, windows. All images, sprites, tile maps, particles, animattions, bullets, etc. The basic objects are made with sprites and the maps with vertex array. Along with Thor library for particle systems with custom emmiters, affectors, distributions.

The maps are made with Tiled Map Editor and exported to custom data structure for optimization porpuses. The engine uses a tile set image containing all kind of tiles and draw each layer with vertex array in one draw call. 

The player and enemy animations are made with Spine, a very good program for skeletal animations and has good support too. All sprites, images, animations and graphical stuff are made by me. Some icons for the interface are from game-icons.net and modified by me.

The light map is really simple. It uses a black render texture and every light is made of triangles of colors to simulate a round shape, more triangles, more definition, more calculations. Each light is then draw to the black texture with additive blend and finally the texture is draw on top with multiply blend. It uses a series of "walls" where the light cannot pass through and re-calculates the triangles of the lights that intersects with the wall.

The internal structure is Entity based. All objects, enemies, player, bullets, all that forms part of the level derives from a basic Entity class. This class has id, position, size, collision box (if have), etc. For example, Entity -> Actor -> Player, Actor has movement functions, animations, effects, life, combat stats, etc. Player has skills, and other things that enemies doesn't.

class Entity: public sf::Drawable
        int id
        int type
        Vector2f  position
        FloatRect bbox

class Actor: public Entity
        vector<Item>  Inventory

class Enemy: public Actor
        vector<Spell> Spells
        vector<Item>  Weapons
        Script AI

The design of the Engine is purely OOP + Managers + Entity. The engine is responsible for managing the different classes in Update function. The collision of moving entities, tarjectory of bullets, apply combat damage form one to other enetity, etc. The inheritance design it perfectly fits for my needs and give me great performance and flexibity. I have a rule for myself, only three levels of inheritance maximum. this force to encapsulate classes with the only the necessary thing.

The key is create data structures and fill it with external data. Almost 75-80% are data stored in files, not hardcoded. All data for maps, objects, bullets, items, enemies, spells, strings is externalized. It can be stored in JSON or XML files, load at startup once and get the data when needed, for example firing a bullet or spawning enemies.

At this moment I have 50+ different enemies and bosses, 30+ maps, 700+ objects, 90+ bullets, 100+ spells, 100+ animations and particle effects, 500+ strings, etc. All this data can be modified without recompile and more easy to modify.

The only part that use scripts are the enemy AI. It uses Lua with LuaBridge for binding classes and functions. It's really powerful and useful tool. At this moment I have more than 1000 lines of lua code for managing the AI. The system is event based. It executes functions when some event occurs, for example when the enemy "sees" the player, or is in attack range, or cast a spell, etc.

Some_Event      = function(enemy)
                if enemy:GetTargetDist() < 220
                if enemy:GetLife() <= 30
                        enemy:Effect_Add(REGENERATION, 3, 10.0)
                if enemy:IsEffect(STUN)

This way I can customize every enemy behaviour for each event/situation. And even reload it in executing time for testing things.

Nearly 85% of the game are done. Now I'm working on the crafting system for creating potions, improve your gear, etc. When all systems are finished, I publish a small demo for testing and recive some feedback of other players. The OS target are Windows(primary) and Linux(secondary), unfortunely a don't have enough resources for developing in Mac, maybe in the future.

Webpage: http://www.uroborostudio.com/

IndieDB: http://www.indiedb.com/games/kronos

I want to thank Laurent and the whole dev team of SFML for creating this amazing and powerful library :)

Pages: [1]