Game tools

About the actual programming of the game.

Game tools

Postby Pseudonym » Tue Aug 13, 2013 5:37 am

Please go and take a look a this:

http://www.insomniacgames.com/ron-pieket-a-clientserver-tools-architecture/

While you're waiting for it to load, let me try to explain.

As well as code that's shipped (i.e. the actual game), some of the code that we have to write is tools. Tools are programs used to create the content for the game, from something as grand as world/level editors, to something as mundane as bundling events together (e.g. firing the laser should result in a sound as well as an explosion).

Insomniac developed a very clever in-house system for doing this. Obviously image files, sound files and so on are in native formats. But the "control documents" are all are based on JSON. An editing tool manipulates a JSON document, and sends them to a RESTful server (which they call LunaServer) which manages those documents, using a NoSQL database (they use MongoDB, CouchDB is also an option) to store them. Everyone runs a local LunaServer and database server. Documents are checked in to a central repository as needed.

There are several advantages to this approach.

For a start, most of the infrastructure that you'd expect of an interactive editing application (e.g. I/O, undo/redo) only has to be written once, and editors can be written with that functionality from the start.

However, even more importantly than this, an editor can be written in ANY language which can handle JSON and can speak REST. You could even write them in HTML/JavaScript if you want.

We have a number of web developers who have volunteered for the project, and it seems to me that this would be a good way to maximise the usefulness of that resource; realistically, there's only so much web site work that's needed at any given time. Having great tools is one of the things that could make contributing to Trillek fun. Moreover, writing a JSON management server is something that someone without any game experience could start working on right now, using whatever language you like (as long as it will run and build easily on Windows, Linux and OS X).

What do you all think?
Pseudonym
 
Posts: 129
Joined: Tue Aug 13, 2013 3:54 am

Re: Game tools

Postby Eximius » Tue Aug 13, 2013 5:42 am

I support this. It shouldn't take that many web developers to make a decent website anyhow. We don't have a lot of requirements. The majority of them should be working on the tools which are far more complex.

Great find.
Eximius
 
Posts: 266
Joined: Mon Aug 12, 2013 9:33 pm

Re: Game tools

Postby mrout » Tue Aug 13, 2013 6:43 am

I think that sounds like a really, really good idea. You have my full support to do start doing this. Make sure you communicate with the art and sound people about the data formats.
mrout
 
Posts: 731
Joined: Mon Aug 12, 2013 10:49 pm

Re: Game tools

Postby Pseudonym » Tue Aug 13, 2013 7:26 am

OK, so let's start planning this out.

Required features:

- A relatively self-contained server which has a RESTful interface, and manages JSON documents.
- As cross-platform as possible.
- Easy for a non-programmer to install and run. (Remember, artists and designers will be using this, even though they'll never talk to it directly.)
- Multiple revisions of the same document to support undo/redo.
- Some mechanism for exporting documents to a central repository (yet to be determined).
- Support for multiple editors, so some clean namespace separation is required.

Desirable/nice to have features:

- Support for computing "deltas" between two JSON documents, to support more efficient storage of undo/redo revisions.
- Some way to check the syntax of documents (JSON schema?).
- Some way to support changes in document format.
- Some way to delete, rename or clean up projects.

Features NOT required:

- Multiple concurrent users editing the same database/document.
- Authentication, security, support for proxies which don't speak DAV methods, or anything like that.

You can assume that it will only be accessed by one person at a time from localhost, though they may have multiple editors open editing different projects.
Pseudonym
 
Posts: 129
Joined: Tue Aug 13, 2013 3:54 am

Re: Game tools

Postby mrout » Tue Aug 13, 2013 7:56 am

It sounds to me like using git as the revision control behind the server would work quite well. It's cross-platform, it's self-contained, it allows branching and multiple revisions, it allows you to export to a central repository, it's very, very, very fast and clean namespace separation is available - use different repos for different sets of assets.

It stores things very efficiently, and it's just incredibly fast in general - that's what happens when Linus Torvalds writes software. You can generate "deltas" (diffs), it's cryptographically signed (both for security - not such an issue - and data integrity - much more important).

It's the backend as well, so any usability/easy of installation issues with git are irrelevant.

Quite a few Dropbox alternatives use git as their backend.
mrout
 
Posts: 731
Joined: Mon Aug 12, 2013 10:49 pm

Re: Game tools

Postby mrout » Tue Aug 13, 2013 8:14 am

http://libgit2.github.com/ So if you want to write it in Python, C++, Go, whatever. It doesn't matter.
mrout
 
Posts: 731
Joined: Mon Aug 12, 2013 10:49 pm

Re: Game tools

Postby FroggyRobot » Tue Aug 13, 2013 9:48 pm

Couldn't help it:
Image
FroggyRobot
 
Posts: 7
Joined: Mon Aug 12, 2013 6:46 pm

Re: Game tools

Postby datalurkur » Tue Aug 13, 2013 10:10 pm

It's absolutely essential to have good tools, and beyond that, it's really useful to have a robust resource pipeline that makes things like importing and testing resources in the engine easy (this includes for non-dev contributors like artists).
datalurkur
 
Posts: 3
Joined: Tue Aug 13, 2013 5:17 pm

Re: Game tools

Postby Pseudonym » Wed Aug 14, 2013 2:08 am

mrout wrote:It stores things very efficiently, and it's just incredibly fast in general - that's what happens when Linus Torvalds writes software. You can generate "deltas" (diffs), it's cryptographically signed (both for security - not such an issue - and data integrity - much more important).

I agree with the choice of git for checked in assets (the "one true copy"), however, a "real" JSON database is desirable for the local undo/redo server for reasons stated in the (hard to get to) link above.

I deliberately said "deltas" rather than diffs because "delta" is a structural concept, where "diff" only cares about files and lines. A document is a tree. You want to know what has structurally changed in that tree, not just what lines have changed in a serialised version.
Pseudonym
 
Posts: 129
Joined: Tue Aug 13, 2013 3:54 am

Re: Game tools

Postby Lord_DeathMatch » Thu Aug 15, 2013 6:58 am

If its JSON you want; CouchDB ( http://couchdb.apache.org/ ) is a database built for JSON.
Haven't used it myself, but I've seen quite a few projects built with it.

And versioning;
http://blog.couchbase.com/how-implement ... -couchbase

I would lean away from C++ for this sort of thing, leaning towards python or go, but I'm not sure if we have any Go guys
Commonly known as Lord_DeathMatch, but sometimes Mause as in http://github.com/Mause && http://mause.me
User avatar
Lord_DeathMatch
 
Posts: 3
Joined: Wed Aug 14, 2013 2:11 pm
Location: SW of Western Australia

Next

Return to Code

Who is online

Users browsing this forum: No registered users and 1 guest

cron