Eon Coding Notes

From KruelWiki

Jump to: navigation, search

Jot down any random notes here.

Contents

Versioning

The core, common stuff is what needs to be the same version. These *common* version numbers are defined in common/Version.h with #defines.

A (entrypoint)/LocalVersion.h should reference the common version file. For example,

#ifndef __LOCALVERSION_H
#define __LOCALVERSION_H
#include "../common/Version.h"
#define VERSION_RELEASE 3
#endif

Slot Vs. ID

Arrays are zero based, therefore slots (positions in arrays for players/sockets etc) are zero based.

To keep things logical, ID's are one based. This means that Slot = ID - 1. If you get segfaults double check you're doing this right. It doesn't make logical sense to a player to have a zeroth player. There should be more bounds checking then there currently is to help stop seggies, or at least to make them more obvious.

Reconnecting Players

Perhaps have a key based system for players? Client can write the key value and server IP to a file on connect (and flush/close file!).

-Probably better to let players login with a username/pass key. More robust, more private. --Merlz

Game States

  • None - Just inital menus etc
  • Lobby - Setting up teams etc.
  • Started - Game is started and in progress
  • Complete - Game is complete, a team has won

Sdlgui structure

Image:EonHierarchy.jpg

Personal tools