From WorldForgeWiki
Jump to: navigation, search

Some design notes for Skycastle , temporarily hosted here until I can get a working wiki up for Skycastle. --zzorn 2007-07-28

Bugs and feature candidates are tracked on:

The notes are kept as subpages of this page.

Initial game scenarios to implement

Skycastle/Initial Game

We could aim for a text based client to start with, until we get the initial crafting scenarios implemented. Then we can start to think of a model for the spatial geometry of the world, and work on showing it in 3D.

Core game engine notes

Item connections

An EntityConnection moves items from an EntityProvider to an EntityConsumer.

The current design calls for reserving the item in the provider, then waiting until the consumer has space, and then doing the transfer, possibly canceling the entity reservations or space reservations if the connection fails or there is some other error.

This makes the consumer and producer interfaces a bit complicated to implement, and also makes the EntityConnection code more complicated. A possible solution would be to simplify the design at the cost of some realism. Most easily this could be done by allowing overfilling of the EntityConsumer - the available space would only be checked before the transfer begins, afterwards the retrieved item is pushed into the EntityConsumer regardless.

Containers probably anyway need some kind of overfilling handling, as entities could change size (or mass ?) on their own over time. (Easiest might be to just drop the entities in the surrounding container, alternatively the container could burst and release all entities).

In the case a connection is severed after the transfer has begun, the transfer might be allowed to complete normally. This could allow some simulation bugs in the world, like connecting a truck to a loading deck, beginning a slow transfer of a large entity, and immediately driving away - the entity would just materialize in the truck after some time.

In the long run perhaps the more complicated EntityConnection protocol is best..

Used libraries

  • Mina looks like a good choise for networking. We should probably get networking going as soon as possible, when we have first implemented the 'Here Be Orc' scenario, for example.
  • Prevayler could provide a non-database based backup system - it allows the game server to restore its state after a crash or server shutdown. I haven't tested if it works with Scala yet though. If it seems the world is going to take up a lot of memory, we might have to add a database too (or completely move to a database).
  • JMonkeyEngine is a high level 3D engine, we'll use it for the graphics