Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Usually, in game development, providing and updating the game data is up to the game system designers and balancing designers. No matter which game you're working on, whether it's a role-playing game, a strategy game, a MOBA or a clone of Clash of Clans - it's these guys who spend weeks and months in huge spreadsheets, tweaking each and every single value of your game. The engineers in turn need to import all of this data into the game engine.
This data-driven approach facilitates quick iteration, ultimately resulting in a better game.
Obviously, the goal of each team should be to reduce the turnaround time to a minimum. This is usually achieved by creating a tool pipeline that automatically imports all data from the spreadsheets, sometimes using CSV as intermediate format. Other teams prefer to build their own editors from scratch.
Tome provides you all benefits of this approach, such as a nice editing environment for designers along with automatic data conversion for engineers, while eliminating many of their drawbacks by providing additional data validation, for instance.
Organizing Your Data
The idea is to organize all of your game entities as aggregations of components, which in turn encapsulate independent functionality. This corresponds to recommendations by the Gang of Four, who suggest “favoring object composition over class inheritance”. A similar approach is used by the Unity3D game engine, for example.
Let’s assume that we have implemented three components that are to make up our game entities: PositionComponent, HealthComponent and AttackComponent. Most of our entities will have at least the first component attached, for they have to be located somewhere in our game world. Many of them will have a HealthComponent attached as well, such as trees, buildings or soldiers that can be targeted and attacked. The AttackComponent is added to all fighting entities, e. g. knights and watchtowers.
This approach allows your designers to arbitrarily re-combine aspects of your game: Suddenly, all objects in your game world can (or cannot) be visible, move around, attack, explode, be targeted, become selected or follow a path, just to name a few. You got this huge building that needs to behave like a tree? No problem, just add the TreeComponent.
Tome prefers text files over binary files, for many reasons. First, text files improve collaboration and work well with source control management, because they can be easily split and merged by anyone. Next, if something's messed up, it is usually possible to fix the data without the help of additional tools. Finally, compared to Excel spreadsheets for instance, text is usually platform-independent - you can use them on any platform and easily serialize them and send them over the network.
Next: Getting Started