![[Home]](/jailbreak-ext/jdn-logo.jpg)
The following Guidelines specify formal design criteria in order to provide end users and content creators with a consistent, neat, easy-to-use and easy-to-understand interface to Jailbreak.
Unless good design reasons speak against it, Jailbreak 200x maps must meet the following requirements:
UT2003 compatibility is preferred, but not required if a map makes good use of resources which are only available in UT2004.
Class names should be self-explanatory. Probably more important than that is that they aren't misleading by being too generic or poorly chosen. A "sequence," for instance, can be anything; if you're referring to a death sequence, you might do better calling it an "execution."
If the code and the comments disagree, then both are probably wrong. – Norm Schryer
Comments and comment headers give source code a visual structure and make it much more convenient to browse and understand code, both your own and other people's. Being able to recall a function's purpose by reading a function comment header saves more time in the end than it takes to write it in the first place.
// ============================================================================ // JBInterfaceHud // Copyright 2003 by Mychaeel <mychaeel@planetjailbreak.com> // $Id$ // // Heads-up display for Jailbreak, showing team states and switch locations. // ============================================================================The
$Id$ part is automatically substituted by a file descriptor by CVS.// ============================================================================ // Variables // ============================================================================Common headers are "Defaults" (for default properties), "Variables" (for internally used class-level variables), "Properties" (for property variables exposed in UnrealEd), "Localization" (for variables that are subject to localization) and "Imports" (for
#exec directives that import external resource files).// ============================================================================ // HackSpeechMenu // // Hacks into the speech menu in order to add a team tactics selection there. // Monitors the menu and adds or changes menu entries depending on the menu's // current state. // ============================================================================
Standard style for core classes is:
(header) // ============================================================================ (blank line) (blank line) class Foo .... (blank line) (blank line) // ============================================================================ (first section header)
Following this:
Function braces (and section braces such as defaults or replication) open on a line of their own, with both braces aligned to the function keyword and the intervening lines indented:
function foobar
{
(body)
}
Other braces open on the keyword line, close on a line of their own aligned with the keyword, with content indented:
if (something) {
(body)
}