Discretion

From ASSS Wiki
Revision as of 11:26, 22 December 2006 by BaK (talk | contribs) (some content)
Jump to navigationJump to search
Error creating thumbnail: File missing
A Screenshot of SubSpace Discretion.

Discretion is a SubSpace client created by BaK. It is open source, like ASSS, and is released under the GPL. Discretion was developed because of the limitations of the in-use client, Continuum. Furthermore, the lack of development of Continuum led to a situation where limitations in the client would never be overcome. Making heavy use of SDL, Discretion is cross-platform, and is currently supported under Windows and Linux, with Mac OS X support on the way. Discretion is intended to be secure through design, rather than through obscurity like Continuum. It is designed to make cheating is impossible, rather than just difficult.

Since cheating is to be made impossible, the server must check the data players send it for cheating. This requires modifications to the server, which rules out using Subgame. There is, however, a modified ASSS Server that allows Discretion client to connect[1].

In order to encourage client development, Discretion is designed in a modular system similar to ASSS. There are interfaces which define actions for modules (such as "draw ship at 50,50"), and callbacks which signal when events occur (such as "player has been killed"). Where ever possible, magic values have been removed and are instead loaded from plain-text settings files. The goal of this is to eliminate any built-in constraints present in VIE SubSpace and Continuum. These magic values include the location / color of the FPS counter, 1024x1024 tiles in maps, each tile being 16x16 pixels, each ship image having 40 frames thus 9 degree turns, the number of fly over tiles, two sets of doors, the 0x01 type packet cooresponding to an arena login, friendly players showing up yellow in the stat box, the colors in the font file, the number of frames in the wormhole animation, the text that shows up when you press ESC, the number of ships, as well as all the settings Conitnuum does allow you to change such as the ship images, the gameplay settings, and the controls. The server is intended to be able to modify most of these, thus giving Zone developers maximum creativity and flexibility.

Modules

Discretion is divided up into several modules, dynamically linked into the main program much like ASSS. These modules are desired to be as generic as possible, with their Continuum-like actions coming from the settings, rather than the modules themselves. Thus Discretion is like a 2D grid game engine, with settings and graphics which emulate SubSpace. There are currenly over 30 modules in the Discretion release. Some of the main ones are discussed below.

Settings Handler

The SettingsHandler modules loads the settings from ini-like plain text file. The main settings file is located in conf/MAIN.CONF, which #includes many other settings files. All these settings files are plain text, and can be edited using a utility like pico or notepad. Settings can be specified in several formats, depending on how they should be interpretted. Supported types include intergers (50, 0x30, 0777), strings (hello person), points/vectors/dimensions ((100,200)), rgb colors ((255,255,255), (0,128,128)), and lvz-style screen locations ((C+50,50), (B-10,C+25)). This module interface also allows modules to load their own conf files, or save a group of settings to a file which the program can then read out of.

The front end program, cskinviewer uses the saving capability of SettingsHandler to keep track of zone data between sessions.

Module Manager

The module manger itself is a module which is loaded by the program, which then proceeds to load many other modules.