Skip to content

Commit

Permalink
Preliminary directory structure described
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed May 19, 2003
1 parent 547d5de commit 0b7f1da
Showing 1 changed file with 163 additions and 0 deletions.
163 changes: 163 additions & 0 deletions de2/dirs.txt
@@ -0,0 +1,163 @@
$Id$

$Log$
Revision 1.1 2003/05/19 12:40:57 skyjake
Preliminary directory structure described


Doomsday 2.0 Source Code Directory Hierarchy
============================================
<skyjake@users.sourceforge.net>

All file and directory names must be in LOWER CASE. An underscore (_)
will be used as a separator, if one is needed. Subdirectories will be
used to divide the files into rough categories.


include

Engine + shared header files. Game-specific headers are in the
same directory as the game module sources. This directory has the
same subdirectories as the 'src' directory. When #including, it's
expected that this directory is in the search path.


src

Platform-independent code. Must be compilable using all supported
compilers. This directory contains the base-level engine sources,
such as the Doomsday class, which encapsulates the entire engine.

The heart of the engine is composed of the event and time
processors. Event Processing provides information about 'external'
events to those who are interested (events from the OS or one of
the subsystems, e.g. input). Time Processing provides a steady
heartbeat for interested parties. Time is measured in floating
point, so the amount of time is passed as a parameter. The amount
is guaranteed to be at most N seconds, and the lower limit can be
configured (max FPS setting).

Network packets are events, too, so they should be delivered to
interested parties using the same mechanism.

Base-level (console) variables belong in this directory.

src/console

Terminal windows (CLI). Built on GL and FS. User interaction is
based on keyboard events. Provides both the terminals and command
parsing.

src/fs

The underlying virtual file/data system. Hides the details of data
lumps, real files, variables and definitions, providing a unified
interface for all the data. Accessed using simple Unixish path
names. File objects are either readable or writable, or both. For
practical purposes, writable files are usually real files (or
variables).

src/gl

Graphics Library code. Provides displays (separate windows) and
windows (inside displays). Rendering will always be done into
windows. Every display has at least one window (the root window).
High-level texture handling (using routines provided by the
rendering module), font drawing, simple primitives for custom
drawing.

src/gl/opengl

Portable OpenGL rendering module, built on routines from
sys/*/gl/opengl. ('gl' means Graphics Library in this context.)
Has specialized scene rendering code for maximum performance.

src/input

High-level input subsystem, events and controllers. The
system-specific code implements a number of driver objects, which
are used for getting input events from the keyboard, mouse and
joystick.

src/map

Agents, hubs, maps, objects, physics. This is a big one (or
perhaps many small ones?). Note that running scripts are agents.

src/menu

Screen overlays intended for interactive menus and intermissions
(includes InFine). Built on GL (render into windows). Set up and
controlled using the console. Multiple menus can be visible at the
same time, but only the top one will be responsive (e.g. menu
during intermission).

src/misc

A mixed bunch of utility code.

src/net

High-level network abstraction code. Packets can be sent using a
logical ID number (to clients). The network subsystem is an event
provider.

src/render

Rendering algorithms, built on the portable GL and resources.
Visualizers are a central concept: they are used to 'visualize'
maps, objects, etc. Visualizing is always done into a window.

src/res

Resource management. Built on the FS. An example of a resource: a
3D model (combination of model, skins and defs).

src/sound

Sound and music subsystem.


sys

All platform-dependent code. At compile time, the appropriate
subdirectories of 'sys' must be chosen.

sys/linux

Linux-specific code.

sys/linux/gl/opengl

Linux-specific OpenGL rendering code.

sys/linux/net

Low level Linux-specific TCP/UDP socket routines. Used by
'src/net' (it knows nothing about the system).

sys/win32

Win32-specific code.

sys/sdl

SDL-specific code (if conveniently portable).

sys/sdl/sound

Sound driver that uses SDL.

sys/net

Conveniently portable TCP/UDP code (Berkeley sockets).


game

Game module sources. All game modules must be fully portable code,
dependent only on the engine.

game/doom

jDoom sources and headers.

0 comments on commit 0b7f1da

Please sign in to comment.