EleutheromaniaHello and thank you for reading! I thought it would be fun to share my hobby project Eleutheromania with the SFML community. I'm from Sweden so please bare with me if my english is somewhat crude. I would also like to share some of my thoughts and design decisions, as I think it's a good way to identify what you've done wrong and what you've done right. Maybe someone here also can get some inspiration, who knows! I can be a bit of a rambler, so if this post is too long (tl;dr), let me know.
About the gameEleutheromania is a 2D RPG game that is a work in progress. I've always loved old school RPG games such as Fallout 2 and Arcanum: Of Steamworks and Magic Obscura. What I want to do with Eleutheromania is to mix a big open world with the rich dialogues and flexible quests that can be found in such older RPGs. I also want to give the game a more realistic flavor by adding hunger, thirst and sleep to the game. This is not an easy undertaking for me but it's alot of fun and has been a real learning experience.
Also, to avoid confusion I just want to say that most of the graphics are the work of Reiner “Tiles” Prokein over at Reiner's tileset. I've used his work to fit my needs, and just made the GUI graphics from scratch myself. I'll add a link to his website in the thanks section.
DesignI like using SFML because it is easy to use, got good documentation and an active forum. I like that SFML leaves it up to me as the user to implement all of the game specific details, and does not force me into a specific design.
The world of Eleutheromania consist of world cells, and each cell contains 1000 * 1000 squares, but this number is flexible. I've written a map editor in C# using SFML.net and Winforms. The map editor is also a work in progress, but so far you can add tiles to the world grid in two layers, add static and dynamic actors, zoom in and out, and manipulate actors attributes, such as scale, name, faction etc. The world is saved in an SQL database using SQLite.net.
The Eleutheromania game client is written in C++ and uses SFML 2.1. As I couldn't find a free SQLite C++ wrapper with an acceptable license, I wrote my own. From the start of this project a core design feature has been extendibility and flexibility. I've therefore tried to make it as easy as possible to add new content to the game and to edit existing content. A "modder" can add new graphics, audio, NPC types, texts, fonts etc. without a deeper understanding of the game or programming in general. It is also possible to add new factions to the game and set up its relationship towards other factions.
Eleutheromania uses a event based script system, and Lua as the script language. An NPC for example, lets a script file determine how it should react to a certain event, such as seeing an ally in combat. This system makes the game easy to modify and fast, as all the heavy calculations are done in the native code. Abilities (and in the future, quests and items) also use a similar event based system. It also makes it possible to add new content to the game without the need to recompile the native code.
Earlier in the project I wanted to add physics to the game. I realized after a while that the AI pathfinding became hard to handle because of this, and the AI was already complex enough because of the way I had designed the game world (not fixing static objects to specific grid points etc.), so another problem like physics would be a big hassle. I therefore made the decision to not add physics.
The games AI uses the A* pathfinding algorithm. The algorithm checks against a generated sparse matrix for collisions. The matrix is generated from the worlds static actors and the world tiles. The collision detection in the game supports circles, rectangles and irregular objects consisting of triangles.
VideoThanksThanks to Laurent Gomila for making SFML! I'd also like to thank the user Nexus for having Thor open-source. Your code taught me a lot about particle effects. A big thank you as well to Reiner “Tiles” Prokein at
http://www.reinerstilesets.de/ for the graphics.
ContactFeel free to contact me at contactsleeplesscoder@gmail.com.
I don't have a website or devblog, but it would be fun to write a website for Eleutheromania. If I do, I'll add a link here.