Start arguments
This commit is contained in:
parent
ea105ba3f3
commit
c57ede96c9
3 changed files with 31 additions and 10 deletions
|
@ -29,16 +29,18 @@ Some of the **gameplay features** include:
|
||||||
## Why This Game Is Special
|
## Why This Game Is Special
|
||||||
|
|
||||||
- **Everything is written in KISS/suckless C99 from scratch**. The whole project, including the physics engine, rendering engine, game logic and assets embedded in source code have TODO lines of code in total.
|
- **Everything is written in KISS/suckless C99 from scratch**. The whole project, including the physics engine, rendering engine, game logic and assets embedded in source code have TODO lines of code in total.
|
||||||
- **Everything is created 100% from scratch** by the author, including code (of the game, physics engine, 3D rendering engine, frontends), textures (created from own photos), 3D models, sound effects, music (created using custom sound font made from own recorded samples), font, accompanying materials etcetc. This ensures absolute freedom, there is no shadow of a doubt there is indeed is no 3rd party copyright. Everything was also **created exclusively with free software**.
|
- **Everything is created 100% from scratch** by the author, including code (of the game, physics engine, 3D rendering engine, frontends), textures (created from own photos), 3D models, map, sound effects, music (created using custom sound font made from own recorded samples), font, accompanying materials etcetc. This ensures absolute freedom, there is no shadow of a doubt there is indeed is no 3rd party copyright. Everything was also **created exclusively with free software**.
|
||||||
- It has **custom KISS 3D physics engine** (tinyphysicsengine) written from scratch, implemented in a single header file, using **no GPU or floating point**.
|
- It has **custom KISS 3D physics engine** (tinyphysicsengine) written from scratch, implemented in a single header file, using **no GPU or floating point**.
|
||||||
- It has **custom KISS 3D software rendering engine** (small3dlib) written from scratch, implemented in a single header file, using **no GPU or floating point**.
|
- It has **custom KISS 3D software rendering engine** (small3dlib) written from scratch, implemented in a single header file, using **no GPU or floating point**.
|
||||||
- The whole game **doesn't use floating point at all**, everything is done with fixed point.
|
- The whole game **doesn't use floating point at all**, everything is done with fixed point.
|
||||||
- It **doesn't have any dependency libraries, not even the C standard library**, everything is written from scratch for **maximum portability**. Libraries such as SDL are used for frontends, but they are never an inherent part of the project, they can be basically drop in replaced with a similar library.
|
- It **doesn't have any dependency libraries, not even the C standard library** (except for using types from *stdint.h*, which can be trivially replaced with a few *defines*), everything is written from scratch for **maximum portability**. Libraries such as SDL are used for frontends, but they are never an inherent dependency and can be basically drop-in replaced with a similar library that's only required to be able to draw pixels and read keyboard. Almost everything can be turned off, the game can even **run without a file system** as the essential assets are embedded right in the source code -- files are only needed for optional extended functionality like saving replays, adding extra maps etc. Settings are part of the source code too, there are **no config files**.
|
||||||
- **No build system** is used, everything is in a **single compilation unit**, to build the game only a single compiler invocation is needed. This removes another bloat and dependency.
|
- **No build system** is used, everything is in a **single compilation unit**, to build the game only a single compiler invocation is needed. This removes another bloat and dependency.
|
||||||
|
- The compiled game INCLUDING ASSETS is **extremely small**: TODO.
|
||||||
- It is **extremely portable and future proof** thanks to having no dependencies besides C99 compiler. So far it was ported to:
|
- It is **extremely portable and future proof** thanks to having no dependencies besides C99 compiler. So far it was ported to:
|
||||||
- TODO
|
- TODO
|
||||||
- It is **extremely moddable and hackable**, the code is relatively simple and well commented, written to encourage hacking. There are no obstacles such as DRM, anti-cheating, obfuscation etc. Cheating and hacking is allowed, do literally what you want.
|
- It is **extremely moddable and hackable**, the code is relatively simple and well commented, written to encourage hacking. There are no obstacles such as DRM, anti-cheating, obfuscation etc. Cheating and hacking is allowed, do literally what you want.
|
||||||
- **No codes of censorship, flags or similar political bullshit**. This is just a game.
|
- **No codes of censorship, flags, furry mascots or similar political bullshit**. This is just a game.
|
||||||
|
- **No "modern" bullshit such as OOP, meme design patterns, scripting and similar nonsense**.
|
||||||
- It is **absolutely and completely public domain free software with ZERO conditions on use** under CC0, it is legally more free that most "FOSS" software, there is no copyleft or credit requirement, you can do ABSOLUTELY anything you want with the project. This is a **selfless project aiming for no benefit of the creator** (include any non-finacial benefit as well), this is made purely to bring more good to the world without gaining any advantage for self.
|
- It is **absolutely and completely public domain free software with ZERO conditions on use** under CC0, it is legally more free that most "FOSS" software, there is no copyleft or credit requirement, you can do ABSOLUTELY anything you want with the project. This is a **selfless project aiming for no benefit of the creator** (include any non-finacial benefit as well), this is made purely to bring more good to the world without gaining any advantage for self.
|
||||||
|
|
||||||
## Manifesto
|
## Manifesto
|
||||||
|
|
|
@ -124,7 +124,7 @@ int main(int argc, char *argv[])
|
||||||
LCR_log("couldn't open data file");
|
LCR_log("couldn't open data file");
|
||||||
|
|
||||||
LCR_log("initializing game");
|
LCR_log("initializing game");
|
||||||
LCR_gameInit();
|
LCR_gameInit(argc,(const char **) argv);
|
||||||
|
|
||||||
LCR_log("initializing SDL");
|
LCR_log("initializing SDL");
|
||||||
SDL_Init(SDL_INIT_AUDIO);
|
SDL_Init(SDL_INIT_AUDIO);
|
||||||
|
|
31
game.h
31
game.h
|
@ -120,9 +120,10 @@ char LCR_getNextDataFileChar(void);
|
||||||
void LCR_appendDataStr(const char *str);
|
void LCR_appendDataStr(const char *str);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Call this function in your frontend at the start of the program.
|
Call this function in your frontend at the start of the program. Pass program
|
||||||
|
arguments if there are any.
|
||||||
*/
|
*/
|
||||||
void LCR_gameInit(void);
|
void LCR_gameInit(int argc, const char **argv);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Call this function in your frontend right before program end.
|
Call this function in your frontend right before program end.
|
||||||
|
@ -736,7 +737,7 @@ void LCR_gameLoadMainMenuItems(void)
|
||||||
LCR_game.menu.itemCount = 4;
|
LCR_game.menu.itemCount = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LCR_gameInit(void)
|
void LCR_gameInit(int argc, const char **argv)
|
||||||
{
|
{
|
||||||
LCR_LOG0("initializing");
|
LCR_LOG0("initializing");
|
||||||
|
|
||||||
|
@ -744,7 +745,6 @@ void LCR_gameInit(void)
|
||||||
LCR_game.keyStates[i] = 0;
|
LCR_game.keyStates[i] = 0;
|
||||||
|
|
||||||
LCR_rendererInit();
|
LCR_rendererInit();
|
||||||
|
|
||||||
LCR_racingInit();
|
LCR_racingInit();
|
||||||
LCR_audioInit();
|
LCR_audioInit();
|
||||||
|
|
||||||
|
@ -762,10 +762,29 @@ void LCR_gameInit(void)
|
||||||
LCR_game.nextRacingTickTime = 0;
|
LCR_game.nextRacingTickTime = 0;
|
||||||
LCR_game.cameraMode = LCR_CAMERA_MODE_DRIVE;
|
LCR_game.cameraMode = LCR_CAMERA_MODE_DRIVE;
|
||||||
|
|
||||||
|
LCR_LOG2("parsing arguments");
|
||||||
|
|
||||||
|
while (argc) // parse arguments
|
||||||
|
{
|
||||||
|
argc--;
|
||||||
|
|
||||||
|
if (argv[argc][0] == '-')
|
||||||
|
switch (argv[argc][1])
|
||||||
|
{
|
||||||
|
case 'c': LCR_game.cameraMode = (argv[argc][2] - '0') % 4; break;
|
||||||
|
case 'm': LCR_game.musicOn = argv[argc][2] != '0'; break;
|
||||||
|
case 's': LCR_audio.on = argv[argc][2] != '0'; break;
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
default:
|
||||||
|
LCR_LOG2("unknown argument");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
LCR_gameLoadMainMenuItems();
|
LCR_gameLoadMainMenuItems();
|
||||||
|
|
||||||
LCR_gameSetState(LCR_GAME_STATE_MENU);
|
LCR_gameSetState(LCR_GAME_STATE_MENU);
|
||||||
|
|
||||||
LCR_currentMap.blockCount = 0; // means no map loaded
|
LCR_currentMap.blockCount = 0; // means no map loaded
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue