Jump to content
  • Advertisement
Sign in to follow this  
Zach Baker

Two Useful Tools for Building a Game Object System

This topic is 3475 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all. I did some work recently where I needed to prototype a game and was disappointed that, although there were some well-featured game engines out there, there didn't seem to be much in the way of a framework for an object system for them. In the past few years, I changed my pace from game development and did a lot of work in web applications using Ruby on Rails. The rapid prototype ability of Rails was great, and I wanted to bring some of that to data-driven game development for use in scenarios where expressiveness is more important than polished performance. As it turns out, I haven't had the chance to actually execute on this plan, but if someone wants to make a really interesting and valuable contribution to the open-source toolkit of game development (and learn a lot about the subject), this would be a cool project. Now, here are the steps I would take to make a simple object system framework. As an overview, the idea is that you combine Tokyo Cabinet, a very quick in-memory database manager (not an SQL-level database, just a structured data store) with the JSON Schema system and a simple modern component game object structure. The upshot is that you can define components in one JSON file, component data and object data (collections of component data) defined using inheritance in another, and both the component definitions and data can be accessed at runtime or inside of tools. The JSON Schema is a format that describes the structure of JSON data, in JSON. That means that you can put your component definitions into a format which lets you read it into your database in the same way as the data. http://json-schema.org/ Tokyo Cabinet is a well-tested and mature quick and light database. It is emphatically not on the level of MySQL or similar giant databases -- it doesn't speak SQL. However, it does offer both fixed-size (C struct) and table-based data stores. http://tokyocabinet.sourceforge.net/ The idea is that you can use these two building blocks - a data definition language and a data store - to make a component object system comprehensible to tools in a data-driven manner and yet not need to be too over-processed. I'm sorry I won't have the time to make this system a reality, but I thought I could submit it for anyone else who might be interested.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!