Java, Project Darkstar → Learning resources for Darkstar newbies
June 5th, 2009 by jason
I’ve been intensely researching Project Darkstar Server (PDS). Along the way, I thought I would collect some of the documentation, forum posts, and tutorials that have helped me understand how to get started. I’ve tried to avoid outdated stuff and only post things relevant to the latest Darkstar (0.9.9 0.9.10 0.9.11). Over time, I will add more as my own knowledge and experience deepens.
So, I present to you A collection of valuable links and resources for finding your way through the Darkstar code thicket.
Getting Started
You’ll need to understand this before you even get started.
- FAQ
- Darkstar overview (PDF)
- Architecture diagram (PDF)
- Coding Darkstar Games presentation slides (PDF)
- Some projects built on Darkstar (clients, tools, etc.)
Server
- Official server tutorial (PDF)
- Server API documentation
- Authentication protocol
- Darkstar compared to Electroserver/SmartFox Server
Example Clients
Darkstar Basics
- The mighty Seth and Owen wrote a framework called Slipstream and an accompanying document (PDF) which is invaluable for learning.
- Configuring logging output and more about Java logging
- Understanding the communications model (client/server direct and channels)
- Channels, sessions, listeners
- JavaOne 2008 MUD tutorial (useful, if somewhat dated)
- JavaOne 2009 Project Snowman tutorial, which is a 3d multiplayer game. Very useful! It’s been said that this game was handling 3000 clients on a single server node.
- To partition the world, or not?
- Server side physics, or not? Or something in between?
- Discussion on how clients talk to each other and the server. Interesting thoughts about latency hiding if you haven’t been exposed to the kinds of issues multiplayer programming presents.
- An insightful discussion which reveals a lot about Darkstar performance tuning and profiling.
Understanding Managed Objects
- Serializable properties of managed objects (MOs)
- Static data in a multi-VM environment and when it might be ok to use static data (and a bit quicker to the point than the first previous link).
- When/why managed tasks
- Managed objects in relation to storing persistent player data
- World representation and data transfer
Understanding Tasks
- Task and scheduling tasks
- When/why managed tasks (repeated since it’s relevant to MOs and Tasks)
- Task-based updates instead of inner loops
- Reactive (event-based) updates instead of polling update loop
- More on being reactive instead of polling
- Monitoring task execution and failures using logging output
Services and Managers
Protocols and Transports
- Using the pluggable transport/protocol layer (may assist your initial understanding)
Known Issues (Big Ones)
Time gap when the server shuts down and restartsThis is resolved in PDS 0.9.11!- Difficulties patching a live server
- More discussion about overcoming issues updating live servers
Vital Tools
- Gamalocus profiler and viewer – really useful, and the graphical viewer makes interpreting the data much easier. It hasn’t been updated in a while, so I hope the project owner keeps it up to date or it can be given a new maintainer.
- Asynchronous task library – if you need to do anything outside of Darkstar (like access a database), you will probably want to use this to work outside the Darkstar task time limitation. (I wish this was on Google code. The Java.net site is really horrible [and slow for me] by comparison.)
- MockSGS – a unit testing library for Darkstar.
June 6th, 2009 at 2:18 am
Great Consolidation of resources. Thanks a lot
July 7th, 2009 at 7:19 pm
Great List! Very helpfull .
August 23rd, 2009 at 11:02 am
Very usefull publication. It helps a lot to learning Darkstar concepts.
November 7th, 2009 at 2:34 pm
maybe admin should update the links~?
The link to the topics will be just like http://www.projectdarkstar.com/forum/?topic=,different from the old one.
November 7th, 2009 at 5:47 pm
Oh no!! They broke all the links when the forum was upgraded. Argh. I’ll have to try to relink them.
Thanks for the heads-up, Seto!
Update: I have relinked the forum topics. Please let me know if you find any aren’t working.