HowToWriteAdventureGamesUsingArianne

From Arianne
Revision as of 16:59, 21 May 2005 by imported>MiguelAngelBlanchLardin (Basic Description)
Jump to navigation Jump to search

Howto write Adventures games using arianne

Introduction

This document is a tutorial that will help you develop multiplayer online games using the Arianne system and Java2D.

Writing a game is a process that involves several stages:

  • Specification
  • Design
  • Implementation
  • Evaluation
  • Deployment

Arianne is a multiplayer online games framework and engine to develop turn based and real time games. It provides a simple way of creating games on a portable and robust server architecture. Marauroa, the server, is coded in Java and uses Python for your game description. It also provides a MySQL backend and uses a UDP transport channel to communicate with dozens of players. Our reference clients are coded using Java and the C language in order to achieve maximum portability.

The Arianne engine is designed so that you can concentrate on designing the actual game and ignore all the detailed implementation aspects of a complex system, such as those in the multiplayer online game content server. You therefore need not be concerned with issues of Thread, Database and Network handling.

Arianne has been in development since 1999 and has evolved from a tiny application written in pseudo-C++ to a powerful, expandable but simple server framework, running on the Java platform, and a client framework, written in bare C to allow total portability of arianne's clients. Arianne's server is totally client agnostic for maximum flexibility.

Since the beginning, the key concept at the heart of Arianne's development has been KISS: Keep it simple, stupid!

Arianne has always been an Open source project, written and released under the GNU GPL license. We believe the right way is the Open Source way and we want you to have the power to change, edit and configure whatever you want, both in the clients and server. Arianne always welcomes your contributions and modifications to the code to create the best possible open source reference platform for game content providers.

All our efforts are supported by Arianne's server: Marauroa. Marauroa is written completely in Java using a multithreaded server architecture with a UDP oriented network protocol, a MySQL based persistence engine and a flexible game system. Marauroa is totally game agnostic and makes very little assumptions about what you are trying to make thus allowing great freedom when creating games. The game system is totally expandable and modifiable to suit your game's needs. It is able to run Python scripts defining the game's rules hence providing a simple way of specifying your games behavior.

Marauroa is based on a design philosophy we called Action/Perception. A Perception is a collection of data sent each turn to the clients explaining to them what they currently perceive in the game environment. Actions are sent from clients to the server and are used to ask the server to perform an action for them.

You should always grab the latest release of Arianne from http://arianne.sourceforge.net as we are constantly fixing bugs and improving features.

Stendhal game example

In this document I will show, as an example of the development of a game, the development of the stendhal game.

I will give more guidelines and templates to help you start your own game at the end of the document but please first read the stendhal example. It is essential to see a real working example of a game to fully understand the Arianne system.

Prerequisites

Developing a multiplayer online game is a very complex task. In fact I would say that it is the most complex software development task that you can imagine. Arianne lowers that complexity level several orders of magnitude! However, there are still several things you need to have a knowledge of to successfully understand this game design example:

  • Java: Everything in this example is coded using Java.
  • Client/Server concepts: These will help you understand why things are done the way they are.
  • Game design: Having a knowledge of game design will simplify the understanding of the overall document.

Just make sure you know the basics, i.e. you are able to write Java code and that you know a little about game design procedures.

Remember that Arianne provides a client/server middleware which needs extending and modifing to suit your game thus you need to think about both the server and client sides:

  • Server: this is similar to the referee of all the online players. It tells every player what he/she sees and what he/she can do. It also determines the result of actions that players perform.
  • Client: these are similar to a TV in that they use information from the server to provide a view in to the game. The client also takes input from the player and sends that to the server.

There are no other prerequisites to using Arianne technology and you should find nearly everything else you need will be explained in this document. So let's get started!

Specification

Before starting to do anything, think about the game you want to implement.
Decide what your game is about, what features it will have, what will make it different to other similar games, what technologies will be used in it, and so on... Try to plan your design well first to avoid problems later.

For our example we are going to write a game called stendhal.

Basic Description

Stendhal is a full fledged multiplayer online adventures game (MMORPG) developed using the Arianne game development system.

Stendhal features a new, rich and expanding world in which you can explore towns, buildings, plains, caves and dungeons. You will meet NPCs and acquire tasks and quests for valuable experience and cold hard cash. Your character will develop and grow and with each new level up become stronger and better. With the money you acquire you can buy new items and improve your armour and weapons. And for the blood thirsty of your; satisfy your killing desires by roaming the world in search of evil monsters!

A first draft of the game world looks like this:

http://arianne.sourceforge.net/wiki_images/Stendhal_Map.jpg


and the game should looks like:

http://arianne.sourceforge.net/wiki_images/Stendhal_GUI_detailed.jpg

The GFX is not the actual ingame look

Multiplayer fun

The multiplayer approach is based on cooperation and competitiveness between players:

  • Players can cooperate to grow up sheeps safer and faster
  • Players can compete against each other to rob other player sheeps.

It could also be possible to consider this a newbie area to train players to really play on a bigger area with more monsters, problems and new tasks.

Why a Zelda like game?

Stendhal is a good example of game to code using Arianne because it exposes issues similar to those on more complex games like:

  • There are lots of objects in the world
  • Objects have triggers associated with them
  • There is character development in the game
  • The World is persistent
  • AI (of the NPC, Sheeps and Wolves) is complex as it would be in a more complex RPG game
  • Everything is conceptually simple however
  • Lag does matter a lot

As you see Stendhal is a minigame that try to push everything related to RPG:

  • Tasks that players need to accomplish in several steps
  • Actions that players can do in a context based situation
  • Several areas that player need to explore
  • Role playing to cooperate and compete

Details

We need to think about what happens or appears in the game and build a few detailed 'Use cases' to point entities and actions existing in the game.

TODO: Rip from Stendhal Design once it is more stable

Once we know what will appear in the game we can make seperate, detailed descriptions of each entity of the game. If this sounds to you like OOP methodologies, then pat yourself on the back, as you are right! Arianne uses an Object based design approach.

In the game we have the following entities:

Goal

Game overall look

Design

Technology used

World design

Entities design

Logic design

AI Logic design

Implementation

Server

Getting ready

Server: Game rules logic

Server: Game world implementation

Server: Game AI implementation

Client

Client: Game logic

Client: Game presentation

Evaluation

Download the files from Sourceforge

Using CVS access

Deployment

Client

Server