Start user file

This commit is contained in:
Miloslav Ciz 2025-01-20 21:33:05 +01:00
parent 02d23048dc
commit c0f5e5cf5b
8 changed files with 83 additions and 33 deletions

20
game.h
View file

@ -1,15 +1,19 @@
#ifndef _LCR_GAME_H
#define _LCR_GAME_H
/**
game: this file implements the backend of a complete, actually playable
game, and is meant to be included and used by specific frontends (which
will handle each platform's hardware details and I/O).
/*
Licar: game module
TODO: more documentation
This file implements the backend of a complete, actually playable game with
graphics, sound etc., and is meant to be included and used by specific
frontends (which will handle each platform's hardware details and I/O). See
the frontend info below for help with porting the game to a new platform.
The code uses LCR_ (or _LCR) prefix as a kind of namespace preventing
collision with 3rd party identifiers.
UNITS: There are various kinds of units used to ensure independence of the
game modules. Here is a summary:
modules. Here is a summary:
- LCR_GameUnit: data type, abstract unit of the game (racing module). One map
square is LCR_GAME_UNITs long, a full angle is also LCR_GAME_UNITs.
@ -27,7 +31,7 @@
their coordinate system (X right, Y up, Z forward) and rotations (Euler
angles, by Z, then by X, then Y).
RESOURCE FILE: The game uses so called data file to store various resources,
DATA FILE: The game uses so called data file to store various resources,
mainly maps and replays. There is considered to be one abstract global file
which is just a long text string. Internally the global file is composed of
a hardcoded internal data file string (stored in assets) with very basic maps,
@ -54,7 +58,7 @@
#define LCR_KEYS_TOTAL 6
/*
FOR FRONTENDS:
FOR FRONTENDS (porting to other platforms):
- Implement the below described functions according to their description.
- Implement the main program and game loop.
- Call the below described functions as described.