Compare commits
2 commits
5c8e4c4c2b
...
ddc4f5b6ad
Author | SHA1 | Date | |
---|---|---|---|
ddc4f5b6ad | |||
ffbc647024 |
5 changed files with 99 additions and 4 deletions
1
TODO.txt
1
TODO.txt
|
@ -24,6 +24,7 @@
|
|||
- traveling salesman kind of maze, with fans n shit
|
||||
- city map?
|
||||
- some kinda buggy bumpy downhill
|
||||
- map where car starts upside down
|
||||
- dirt map
|
||||
- ice map
|
||||
- boss map
|
||||
|
|
34
assets.h
34
assets.h
|
@ -48,6 +48,16 @@ static const char *LCR_texts[] =
|
|||
"saved"
|
||||
};
|
||||
|
||||
#define LCR_VERSION "0.1d"
|
||||
|
||||
/// String that can be used by frontends to offer help about CLI arguments.
|
||||
#define LCR_ARG_HELP_STR \
|
||||
" -cN set camera mode to N\n" \
|
||||
" -s0 turn sound off\n" \
|
||||
" -m0 turn music off\n" \
|
||||
" -M load the last map in the data file\n" \
|
||||
" -R load the last replay in the data file\n"
|
||||
|
||||
// TODO: define string for CLI arguments for frontends?
|
||||
|
||||
static const char *LCR_internalDataFile =
|
||||
|
@ -322,6 +332,30 @@ static const char *LCR_internalDataFile =
|
|||
":<o1y:fg11"
|
||||
// finish:
|
||||
":!vdt:!vdA"
|
||||
|
||||
// TINY MAP 4:
|
||||
|
||||
"#MLCtiny4;4321 1"
|
||||
":*x1q:+u1F:!x1o"
|
||||
// platform:
|
||||
":=j0o:fg1j"
|
||||
":xj0o:fc18"
|
||||
":xj0E:f613"
|
||||
":=p0w2:f71b"
|
||||
":Aj0DI"
|
||||
":Ap0G2I"
|
||||
":Aj0wJ"
|
||||
// walls:
|
||||
":^m1A1I:fd11"
|
||||
":=m1w:f911"
|
||||
":^v1oJ:f118"
|
||||
":Av1wL"
|
||||
":=t0A:f234"
|
||||
":^z1oL:f11j"
|
||||
":^z0oL-:f11j"
|
||||
// fans:
|
||||
":Vm1xI:Vm1z"
|
||||
":-w0q1:-y0q1"
|
||||
;
|
||||
|
||||
#define LCR_IMAGE_SIZE 64 ///< one-dimension resolution of bitmap image
|
||||
|
|
|
@ -115,9 +115,34 @@ void LCR_log(const char *str)
|
|||
printf("LOG: %s\n",str);
|
||||
}
|
||||
|
||||
void printHelp(void)
|
||||
{
|
||||
printf(
|
||||
"Licar, 3D racing game, v. " LCR_VERSION ", SDL frontend, args:\n"
|
||||
" -h print help and quit\n"
|
||||
" -wN window (N = 1) or fullscreen (N = 0)\n"
|
||||
LCR_ARG_HELP_STR);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
uint8_t running = 1;
|
||||
uint8_t running = 1, fullscreen = 1;
|
||||
|
||||
for (int i = 0; i < argc; ++i)
|
||||
if (argv[i][0] == '-')
|
||||
switch (argv[i][1])
|
||||
{
|
||||
case 'h':
|
||||
printHelp();
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case 'w':
|
||||
fullscreen = argv[i][2] == '1';
|
||||
break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
dataFile = fopen(DATA_FILE_NAME,"r");
|
||||
|
||||
|
@ -160,6 +185,9 @@ int main(int argc, char *argv[])
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (fullscreen)
|
||||
SDL_SetWindowFullscreen(window,SDL_WINDOW_FULLSCREEN_DESKTOP);
|
||||
|
||||
renderer = SDL_CreateRenderer(window,-1,0);
|
||||
|
||||
if (!renderer)
|
||||
|
|
3
game.h
3
game.h
|
@ -73,6 +73,9 @@
|
|||
music is currently enabled (if not, stop playing it). If you don't want to
|
||||
support music, set LCR_SETTING_MUSIC to 0 in your frontend code (before
|
||||
including this module) so that the game knows music is disabled.
|
||||
- LCR_ARG_HELP_STR is a string containing help for CLI arguments that can be
|
||||
passed to LCR_gameInit. You can use this in your CLI help. You can also use
|
||||
other strings such as LCR_VERSION.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,7 @@ WORK IN PROGRESS
|
|||
|
||||
-._.-'"'-._.-'"'- LICAR MANUAL -'"'-._.-'"'-._.-
|
||||
|
||||
by drummyfish, released under CC0 1.0, punlic domain
|
||||
by drummyfish, released under CC0 1.0, public domain
|
||||
|
||||
~~~ GENERAL ~~~
|
||||
|
||||
|
@ -40,7 +40,7 @@ If you know what command line arguments are, you may also check them out by
|
|||
running the game with -h argument. This will allow you to for example start the
|
||||
game and immediately load a map, which is handy when creating new maps.
|
||||
|
||||
~~~ OBJECTIVES ~~~
|
||||
~~~ GAMEPLAY ~~~
|
||||
|
||||
In Licar, unlike in most other racing games, you only race against time, i.e.
|
||||
you are alone on the track. There is an option to race against a replay ghost,
|
||||
|
@ -55,6 +55,11 @@ to beat in the bottom left of the screen. If you beat the time, you have
|
|||
achieved the goal, your replay is automatically saved and your new time becomes
|
||||
the next target time.
|
||||
|
||||
On the map there can be several different kinds of surfaces with different
|
||||
physics properties: concrete, grass, dirt and ice. Furthermore there are two
|
||||
special kind of sufaces: an accelerator (a bright yellow/orange one), which
|
||||
boosts the car's speed, and a fan, which propels the car upwards.
|
||||
|
||||
Your run can be restarted at any time. Typically you will need hundreds of
|
||||
attempts to achieve a good time on a map.
|
||||
|
||||
|
@ -124,7 +129,21 @@ where exactly time losses against the opponent occur.
|
|||
|
||||
~~~ MAKING CUSTOM MAPS ~~~
|
||||
|
||||
Maps are stored in the data file.
|
||||
Maps are stored in the data file. For its simplicity the original game doesn't
|
||||
come with a user-friendly map editor, the maps are hand-written directly in the
|
||||
text format that's stored in the data file, however there is a helper file for
|
||||
Blender that facilitates this process.
|
||||
|
||||
The map is a 64x64x64 grid, with each cell one unit in width, one unit in depth
|
||||
and half a unit in height. In the cell blocks can be placed. There are several
|
||||
types of blocks such as ramps, walls, corners etc. Each block can be rotated
|
||||
and/or flipped. Additionally each block also has a material (concrete, grass,
|
||||
...). The finish, checkpoints and car start position can also be seen as block.
|
||||
|
||||
The format of the map data string is described in the map.h file, refer to it
|
||||
for further detail. In short: TODO
|
||||
|
||||
|
||||
|
||||
Under the asset directory there is a helper file for Blender (a FOSS 3D editor)
|
||||
with which a map layout can be comfortably created. But Blender is not required
|
||||
|
@ -143,3 +162,13 @@ The "workflow" for making maps is roughly the following:
|
|||
1. or 2.
|
||||
|
||||
~~~ FAQ ~~~
|
||||
|
||||
Q: Why is the physics so buggy?
|
||||
|
||||
A: You are right in the observation that Licar physics is not perfect. This is
|
||||
firstly because of the game's aim for simplicity (e.g. avoiding use of floating
|
||||
point) combined with the fact that even without such constraints it's one of the
|
||||
most difficult tasks to create a flawless physics engine. We apologize for any
|
||||
frustration but unless you want to fix this yourself, you'll have to just accept
|
||||
it, the game is meant to be a simple entertainment. In other words this is a
|
||||
feature :)
|
||||
|
|
Loading…
Reference in a new issue