darkstar java game engine for massively multiplayer role-playing games
64
Project Darkstar is the video game industry's first enterprise grade, high performance, fault tolerant and highly scalable server technology for online, multiplayer games. Project Darkstar has been designed from the ground up to handle almost any kind of online game imaginable.
From card games to full blown MMOGs, Project Darkstar is the perfect technology to get you up and running quickly, allowing you to focus on building your game, not network technologies.
Project Darkstar is designed to provide an environment for game developers that allows scaling through the use of the inherent parallelism found in virtual environments without requiring that the programmers coding such environments learn either distributed computing or multi-threaded programming. Project Darkstar presents an illusion to the programmer that the code for the server side of the application is running on a single machine in a single thread. In fact, the work being done by the server can be spread across any number of machines and threads in a way that allows both increased scaling and fault tolerance. The system is optimized for the low latencies required for game applications.
Available for immediate download, head over to the downloads section and start building your online game today!
Installation
Once you have downloaded it, simply unpack it in the directory where you want it to reside.
On Windows, create a system variable named "sgshome" through the "System" control panel. Set the value of the variable to the location of the game server's directory.
On Mac OS X and Linux you need to modify the .bashrc file in your home directory to include the line export SGSHOME=location, where location is the actual location of the game server's directory.
Getting started
Unlike traditional applications, your game server doesn't have a main(...) method. Instead, Darkstar uses an event-driven model. Your game implements a series of listener interfaces, such as AppListener.
In order to run your game, Darkstar needs to know the name of the class that implements the AppListener interface. This is accomplished through the game properties file.
There are several different listener interfaces used in the Darkstar application server.
These listener interfaces are used in similar manner to the event listeners (e.g.,java.awt.event.ActionListener) in Java GUI programming.
Game Properties
The game properties just a standard Java properties file. Java properties files are text files that contain property definitions. Darkstar requires that four properties be declared:
com.sun.sgs.app.name
The text name of the game. This is can be any string.
com.sun.sgs.app.listener
The name of the main game class which implements the AppListener interface.
com.sun.sgs.app.port
The number of network port on which the server listens for connections.
com.sun.sgs.app.root
The root directory where the game's persistent classes should be saved. See the Managing Game State with Persistent Objects section.
Here is sillygame.properties, a properties file that runs SillyGameMain:
# Silly Game Properties (use # for comments in properties files) com.sun.sgs.app.name=A Silly Game
com.sun.sgs.app.listener=SillyGameMain
com.sun.sgs.app.port=1221
com.sun.sgs.app.root=silly_game_data
Skeletton
Compiling
To compile the code use sgs.jar, which is in the lib directory of the main Darkstar directory.
Running the game
Once you have created sillygame.properties, you can run your game using the sgs.sh script (sgs.bat on Windows). The script is located in the main game server directory. The script takes two arguments. The first argument is the a classpath that must contain the main game class specified in the com.sun.sgs.app.listener property. The second argument is the properties file, in this case sillygame.properties. For example (assuming that you compiled SillyGameMain into a directory named "classes"):
sgs.sh ./classes sillygame.properties As the server starts up, it prints a number of status messages, including the message from SillyGameMain's initialize method. The final message indicates that the SillyGame server is successfully up and running. Of course, this silly game rejects all client logins.Latest Hubpages on Game Engines
- darkstar java game engine for massively multiplayer role-playing games
Project Darkstar is the video game industry's first enterprise grade, high performance, fault tolerant and highly scalable server technology for online, multiplayer games. Project Darkstar has been designed... - 11 months ago
- Blender: FREE 3D Software for Logo, Game ...
Blender is an open source software for 3D modeling, rendering, animation, post-production, interactive creation and playback. Available for Windows, Linux, Irix, Sun Solaris, FreeBSD or Mac OS X. Blender is... - 11 months ago
- legendarytales: free game engine
Legendary Tales Software Features : World Independent Definition of Custom Skills other than the 40 built-in skills The Microsoft Visual Basic Scripting Edition or JScript can be used for scripting ... - 11 months ago
- DimensioneX: MMPORG Game Engine for Internet
DimensioneX is what people would call a Multiplayer Game Engine. It lets you develop a game without having to re-inventing the wheel. Here's what DimensioneX does for you: Display of the game scene, play... - 13 months ago
- Platform Studio: Free Game Engine !
What is Platform Studio? Platform Studio is the new leading tool to create high-quality 2D platform games. It is very powerful and easy to use, equipped with a user-friendly ... - 13 months ago
- QML Free Text Adventure Game Engine
QML is a language to define station-based text-adventures like you find them in some interactive books where you can choose your own adventure. What does it do? QML handles stations, choices, states... - 14 months ago
Share it! — Rate it: up down [flag this hub]

