mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-11-24 01:42:19 -05:00
Prepare for release
This commit is contained in:
parent
aa1fc41726
commit
c04ffbd1fa
47
README.md
47
README.md
@ -1,18 +1,16 @@
|
|||||||
# WIP, NOT RELEASED YET!
|
|
||||||
|
|
||||||
**If you really want, feel free to test this, but this isn't finished, so I highly suggest you wait for the release.**
|
|
||||||
|
|
||||||
# Anarch
|
# Anarch
|
||||||
|
|
||||||
![](media/logo_big.png)
|
![](media/logo_big.png)
|
||||||
|
|
||||||
[TODO website link]()
|
[anarch.gitlab.io]()
|
||||||
TODO trailer link
|
[anarch.gitlab.io/web/anarch.html]() (play in browser)
|
||||||
|
|
||||||
*extremely small, completely public domain, no-dependency, no-file,
|
*extremely small, completely public domain, no-dependency, no-file,
|
||||||
portable suckless anarcho-pacifist from-scratch 90s-style Doom clone that runs
|
portable suckless anarcho-pacifist from-scratch 90s-style Doom clone that runs
|
||||||
everywhere, made for the benefit of all living beings*
|
everywhere, made for the benefit of all living beings*
|
||||||
|
|
||||||
|
![](media/3screens.png)
|
||||||
|
|
||||||
- [why this game is special](#why-this-game-is-special)
|
- [why this game is special](#why-this-game-is-special)
|
||||||
- [stats and comparisons (for version 1.0)](#stats-and-comparisons-for-version-10)
|
- [stats and comparisons (for version 1.0)](#stats-and-comparisons-for-version-10)
|
||||||
- [manifesto](#manifesto)
|
- [manifesto](#manifesto)
|
||||||
@ -54,12 +52,12 @@ source code stats (80 column wrapping, a lot of empty lines):
|
|||||||
|
|
||||||
| file | LOC | file size |
|
| file | LOC | file size |
|
||||||
| --------------------------------------| ------- | --------- |
|
| --------------------------------------| ------- | --------- |
|
||||||
| game.h (main game logic) | TODO | TODO |
|
| game.h (main game logic) | 4979 | 140 KB |
|
||||||
| raycastlib.h (ray casting library) | TODO | TODO |
|
| raycastlib.h (ray casting library) | 2058 | 64 KB |
|
||||||
| smallinput.h (for terminal frontend) | TODO | TODO |
|
| images.h, levels.h, sounds.h (assets) | 3868 | 340 KB |
|
||||||
| images.h, levels.h, sounds.h (assets) | TODO | TODO |
|
| settings.h, constants.h | 1088 | 36 KB |
|
||||||
| settings.h, constants.h | TODO | TODO |
|
| main_sdl.c (SDL frontend) | 498 | 16 KB |
|
||||||
| **total** | TODO | TODO |
|
| **total (cloc of all sources)** | 14402 | 672 KB |
|
||||||
| Doom source code | 38000 | 1.6 MB |
|
| Doom source code | 38000 | 1.6 MB |
|
||||||
| Wolf 3D source code | 25000 | 916 KB |
|
| Wolf 3D source code | 25000 | 916 KB |
|
||||||
|
|
||||||
@ -67,11 +65,11 @@ compiled:
|
|||||||
|
|
||||||
| binary | size | target FPS | resolution | RAM usage |
|
| binary | size | target FPS | resolution | RAM usage |
|
||||||
| -------------------- | ------------------------------------ | ----------- | ---------- | ---------- |
|
| -------------------- | ------------------------------------ | ----------- | ---------- | ---------- |
|
||||||
| GNU/Linux, SDL | TODO (gcc), TODO (clang), TODO (tcc) | TODO | TODO | TODO |
|
| GNU/Linux, SDL | 196 KB (gcc), 184 KB (clang), 184 KB (tcc) | 60 | 700 * 512 | ~40 MB |
|
||||||
| GNU/Linux, terminal | TODO (gcc), TODO (clang), TODO (tcc) | TODO | TODO | TODO |
|
| GNU/Linux, terminal | 184 KB (gcc), 176 KB (clang), 176 KB (tcc) | 30 | 127 * 42 | ~5 MB |
|
||||||
| Pokitto | TODO | TODO | TODO | TODO |
|
| Pokitto | 180 KB | 35 (overclock), 22 | 110 * 88 | < 32 KB |
|
||||||
| Gamebuino Meta | TODO | TODO | TODO | TODO |
|
| Gamebuino Meta | 215 KB | 18 | 80 * 64 | < 32 KB |
|
||||||
| browser | TODO (JS script) | TODO | TODO | TODO |
|
| browser | 884 KB (whole output) | 35 | 512 * 320 | ~20 MB |
|
||||||
|
|
||||||
system requirements:
|
system requirements:
|
||||||
|
|
||||||
@ -186,6 +184,21 @@ Depends from where you count. From my [first experiments with raycasting on Poki
|
|||||||
|
|
||||||
Only free software, preferably suckless tools: Vim text editor on Devuan GNU/Linux, mostly on a librebooted Lenovo X200 laptop. GIMP was used to make images and maps, python for small scripts and data conversions. Audacity and Blender and other programs were also used for making the trailer etc.
|
Only free software, preferably suckless tools: Vim text editor on Devuan GNU/Linux, mostly on a librebooted Lenovo X200 laptop. GIMP was used to make images and maps, python for small scripts and data conversions. Audacity and Blender and other programs were also used for making the trailer etc.
|
||||||
|
|
||||||
|
### How do I compile this?
|
||||||
|
|
||||||
|
Compilation depends on platform, but for a Unix PC it goes something like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
# install SDL2, e.g. on Debian-like systems:
|
||||||
|
sudo apt-get install libsdl2-dev libsdl2-mixer-dev
|
||||||
|
|
||||||
|
# get the source code:
|
||||||
|
git clone https://gitlab.com/drummyfish/anarch.git
|
||||||
|
|
||||||
|
cd anarch
|
||||||
|
./make.sh sdl # compile, csfml can also be used instead of sdl
|
||||||
|
```
|
||||||
|
|
||||||
### So I can do anything with this for free? Even like sell it and stuff?
|
### So I can do anything with this for free? Even like sell it and stuff?
|
||||||
|
|
||||||
Basically yes, since I have given up all my IP rights, legally you can do anything with this **which is not otherwise illegal** (see the next paragraph), without needing any permission from me, which means you can play this, modify this, sell this, or do anything else without even crediting me. That is all legal, however that doesn't mean it's automatically moral or that I endorse anything you do. As an anarchist I don't want laws preventing your freedom to do anything with a copy of information. It is your responsibility to decide what is moral behavior.
|
Basically yes, since I have given up all my IP rights, legally you can do anything with this **which is not otherwise illegal** (see the next paragraph), without needing any permission from me, which means you can play this, modify this, sell this, or do anything else without even crediting me. That is all legal, however that doesn't mean it's automatically moral or that I endorse anything you do. As an anarchist I don't want laws preventing your freedom to do anything with a copy of information. It is your responsibility to decide what is moral behavior.
|
||||||
|
BIN
assets/ICON.BMP
Normal file
BIN
assets/ICON.BMP
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.1 KiB |
BIN
assets/TITLESCREEN.BMP
Normal file
BIN
assets/TITLESCREEN.BMP
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
BIN
bin/Anarch_LQ_linux64_sdl_elf_1-0
Executable file
BIN
bin/Anarch_LQ_linux64_sdl_elf_1-0
Executable file
Binary file not shown.
BIN
bin/Anarch_gbmeta_1-0.zip
Normal file
BIN
bin/Anarch_gbmeta_1-0.zip
Normal file
Binary file not shown.
BIN
bin/Anarch_linux64_csfml_elf_1-0
Executable file
BIN
bin/Anarch_linux64_csfml_elf_1-0
Executable file
Binary file not shown.
BIN
bin/Anarch_linux64_sdl_elf_1-0
Executable file
BIN
bin/Anarch_linux64_sdl_elf_1-0
Executable file
Binary file not shown.
BIN
bin/Anarch_pokitto_1-0.pop
Normal file
BIN
bin/Anarch_pokitto_1-0.pop
Normal file
Binary file not shown.
BIN
bin/Anarch_pokitto_nonoverclock_1-0.bin
Executable file
BIN
bin/Anarch_pokitto_nonoverclock_1-0.bin
Executable file
Binary file not shown.
BIN
bin/Anarch_winshitxp_sdl_1-0.zip
Normal file
BIN
bin/Anarch_winshitxp_sdl_1-0.zip
Normal file
Binary file not shown.
1
bin/web/anarch.html
Normal file
1
bin/web/anarch.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<!doctypehtml><html><head><meta charset=utf-8><title>game</title><style>table{width:100%}td{width:11%;padding:0;margin:0}button{width:100%}canvas{display:block;margin:10px auto 30px}</style></head><body><canvas class=emscripten id=canvas oncontextmenu=event.preventDefault() tabindex=-1></canvas><script>function down(n){pressFunc(n,1)}function up(n){pressFunc(n,0)}Module={print:function(n){console.log(n)},printErr:function(n){console.error(n)},canvas:document.getElementById("canvas"),onRuntimeInitialized:function(){pressFunc=Module.cwrap("webButton","",["number","number"])}}</script><script async src=anarch.js></script><table onselectstart=return!1 style=user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;-o-user-select:none unselectable=on><tr><td></td><td><button onmousedown=down(0) onmouseout=up(0) onmouseup=up(0) ontouchend=up(0) ontouchleave=""ontouchstart=down(0)>U</button></td><td></td><td></td><td><button onmousedown=down(4) onmouseout=up(4) onmouseup=up(4) ontouchend=up(4) ontouchleave=""ontouchstart=down(4)>A</button></td><td></td><td></td></tr><tr><td><button onmousedown=down(3) onmouseout=up(3) onmouseup=up(3) ontouchend=up(3) ontouchleave=""ontouchstart=down(3)>L</button></td><td></td><td><button onmousedown=down(1) onmouseout=up(1) onmouseup=up(1) ontouchend=up(1) ontouchleave=""ontouchstart=down(1)>R</button></td><td></td><td></td><td><button onmousedown=down(5) onmouseout=up(5) onmouseup=up(5) ontouchend=up(5) ontouchleave=""ontouchstart=down(5)>B</button></td><td></td></tr><tr><td></td><td><button onmousedown=down(2) onmouseout=up(2) onmouseup=up(2) ontouchend=up(2) ontouchleave=""ontouchstart=down(2)>D</button></td><td></td><td></td><td></td><td></td><td><button onmousedown=down(6) onmouseout=up(6) onmouseup=up(6) ontouchend=up(6) ontouchleave=""ontouchstart=down(6)>C</button></td></tr></table></body></html>
|
1
bin/web/anarch.js
Normal file
1
bin/web/anarch.js
Normal file
File diff suppressed because one or more lines are too long
BIN
bin/web/anarch.wasm
Normal file
BIN
bin/web/anarch.wasm
Normal file
Binary file not shown.
4
game.h
4
game.h
@ -2328,7 +2328,9 @@ void SFG_monsterPerformAI(SFG_MonsterRecord *monster)
|
|||||||
SFG_SPRITE_SIZE_TO_HEIGHT_ABOVE_GROUND(SFG_GET_MONSTER_SPRITE_SIZE(
|
SFG_SPRITE_SIZE_TO_HEIGHT_ABOVE_GROUND(SFG_GET_MONSTER_SPRITE_SIZE(
|
||||||
SFG_MONSTER_TYPE_TO_INDEX(SFG_MR_TYPE(*monster))));
|
SFG_MONSTER_TYPE_TO_INDEX(SFG_MR_TYPE(*monster))));
|
||||||
|
|
||||||
RCL_Unit verticalSpeed = (SFG_GET_PROJECTILE_SPEED_UPS(projectile) *
|
RCL_Unit verticalSpeed = (
|
||||||
|
((projectile != SFG_PROJECTILE_NONE) ?
|
||||||
|
SFG_GET_PROJECTILE_SPEED_UPS(projectile) : 0) *
|
||||||
SFG_directionTangent(dir.x,dir.y,SFG_player.camera.height -
|
SFG_directionTangent(dir.x,dir.y,SFG_player.camera.height -
|
||||||
middleHeight)) / RCL_UNITS_PER_SQUARE;
|
middleHeight)) / RCL_UNITS_PER_SQUARE;
|
||||||
|
|
||||||
|
@ -292,14 +292,14 @@ int main(int argc, char *argv[])
|
|||||||
puts("locked and require access cards. Good luck!\n");
|
puts("locked and require access cards. Good luck!\n");
|
||||||
puts("created by Miloslav \"drummyfish\" Ciz, 2020, released under CC0 1.0 (public domain)\n");
|
puts("created by Miloslav \"drummyfish\" Ciz, 2020, released under CC0 1.0 (public domain)\n");
|
||||||
puts("controls:\n");
|
puts("controls:\n");
|
||||||
puts("- arrows, numpad, [W] [S] [A] [D] [Q] [R]: movement");
|
puts("- arrows, numpad, [W] [S] [A] [D] [Q] [E]: movement");
|
||||||
puts("- mouse: rotation, [LMB] shoot, [RMB] toggle free look");
|
puts("- mouse: rotation, [LMB] shoot, [RMB] toggle free look");
|
||||||
puts("- [SPACE]: jump");
|
puts("- [SPACE]: jump");
|
||||||
puts("- [J] [RETURN] [CTRL] [LMB]: game A button (shoot, confirm)");
|
puts("- [J] [RETURN] [CTRL] [LMB]: game A button (shoot, confirm)");
|
||||||
puts("- [K] [SHIFT]: game B button (cancel, strafe)");
|
puts("- [K] [SHIFT]: game B button (cancel, strafe)");
|
||||||
puts("- [L]: game C button (+ down = menu, + up = jump, ...)");
|
puts("- [L]: game C button (+ down = menu, + up = jump, ...)");
|
||||||
puts("- [F]: cycle next/previous weapon");
|
puts("- [F]: cycle next/previous weapon");
|
||||||
puts("- [O] [P] [X] [Y] [Z] [mouse wheel]: change weapons");
|
puts("- [O] [P] [X] [Y] [Z] [mouse wheel] [mouse middle]: change weapons");
|
||||||
puts("- [TAB]: map");
|
puts("- [TAB]: map");
|
||||||
puts("- [F12]: screenshot");
|
puts("- [F12]: screenshot");
|
||||||
puts("- [ESCAPE]: menu");
|
puts("- [ESCAPE]: menu");
|
||||||
|
@ -222,8 +222,6 @@ int main()
|
|||||||
|
|
||||||
pokitto.begin();
|
pokitto.begin();
|
||||||
|
|
||||||
timerInit(8000);
|
|
||||||
|
|
||||||
uint8_t allZeros = 1;
|
uint8_t allZeros = 1;
|
||||||
|
|
||||||
for (uint8_t i = 0; i < SFG_SAVE_SIZE; ++i)
|
for (uint8_t i = 0; i < SFG_SAVE_SIZE; ++i)
|
||||||
@ -239,6 +237,8 @@ int main()
|
|||||||
save.saveCookie();
|
save.saveCookie();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
timerInit(8000);
|
||||||
|
|
||||||
for (uint16_t i = 0; i < SFG_SFX_SAMPLE_COUNT; ++i)
|
for (uint16_t i = 0; i < SFG_SFX_SAMPLE_COUNT; ++i)
|
||||||
audioBuff[i] = 127;
|
audioBuff[i] = 127;
|
||||||
|
|
||||||
|
18
main_sdl.c
18
main_sdl.c
@ -24,13 +24,13 @@
|
|||||||
#define SFG_OS_IS_MALWARE 1
|
#define SFG_OS_IS_MALWARE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// #define SFG_START_LEVEL 1
|
// #define SFG_START_LEVEL 1
|
||||||
// #define SFG_QUICK_WIN 1
|
// #define SFG_QUICK_WIN 1
|
||||||
// #define SFG_IMMORTAL 1
|
// #define SFG_IMMORTAL 1
|
||||||
// #define SFG_ALL_LEVELS 1
|
// #define SFG_ALL_LEVELS 1
|
||||||
// #define SFG_UNLOCK_DOOR 1
|
// #define SFG_UNLOCK_DOOR 1
|
||||||
// #define SFG_REVEAL_MAP 1
|
// #define SFG_REVEAL_MAP 1
|
||||||
// #define SFG_INFINITE_AMMO 1
|
// #define SFG_INFINITE_AMMO 1
|
||||||
// #define SFG_TIME_MULTIPLIER 512
|
// #define SFG_TIME_MULTIPLIER 512
|
||||||
// #define SFG_CPU_LOAD(percent) printf("CPU load: %d%\n",percent);
|
// #define SFG_CPU_LOAD(percent) printf("CPU load: %d%\n",percent);
|
||||||
// #define GAME_LQ
|
// #define GAME_LQ
|
||||||
@ -396,14 +396,14 @@ int main(int argc, char *argv[])
|
|||||||
puts("-w force window");
|
puts("-w force window");
|
||||||
puts("-f force fullscreen\n");
|
puts("-f force fullscreen\n");
|
||||||
puts("controls:\n");
|
puts("controls:\n");
|
||||||
puts("- arrows, numpad, [W] [S] [A] [D] [Q] [R]: movement");
|
puts("- arrows, numpad, [W] [S] [A] [D] [Q] [E]: movement");
|
||||||
puts("- mouse: rotation, [LMB] shoot, [RMB] toggle free look");
|
puts("- mouse: rotation, [LMB] shoot, [RMB] toggle free look");
|
||||||
puts("- [SPACE]: jump");
|
puts("- [SPACE]: jump");
|
||||||
puts("- [J] [RETURN] [CTRL] [LMB]: game A button (shoot, confirm)");
|
puts("- [J] [RETURN] [CTRL] [LMB]: game A button (shoot, confirm)");
|
||||||
puts("- [K] [SHIFT]: game B button (cancel, strafe)");
|
puts("- [K] [SHIFT]: game B button (cancel, strafe)");
|
||||||
puts("- [L]: game C button (+ down = menu, + up = jump, ...)");
|
puts("- [L]: game C button (+ down = menu, + up = jump, ...)");
|
||||||
puts("- [F]: cycle next/previous weapon");
|
puts("- [F]: cycle next/previous weapon");
|
||||||
puts("- [O] [P] [X] [Y] [Z] [mouse wheel]: change weapons");
|
puts("- [O] [P] [X] [Y] [Z] [mouse wheel] [mouse middle]: change weapons");
|
||||||
puts("- [TAB]: map");
|
puts("- [TAB]: map");
|
||||||
puts("- [ESCAPE]: menu");
|
puts("- [ESCAPE]: menu");
|
||||||
|
|
||||||
|
@ -99,9 +99,9 @@ int8_t SFG_keyPressed(uint8_t key)
|
|||||||
case SFG_KEY_RIGHT: return input_getKey('d') || input_getKey(SMALLINPUT_ARROW_RIGHT); break;
|
case SFG_KEY_RIGHT: return input_getKey('d') || input_getKey(SMALLINPUT_ARROW_RIGHT); break;
|
||||||
case SFG_KEY_DOWN: return input_getKey('s') || input_getKey(SMALLINPUT_ARROW_DOWN); break;
|
case SFG_KEY_DOWN: return input_getKey('s') || input_getKey(SMALLINPUT_ARROW_DOWN); break;
|
||||||
case SFG_KEY_LEFT: return input_getKey('a') || input_getKey(SMALLINPUT_ARROW_LEFT); break;
|
case SFG_KEY_LEFT: return input_getKey('a') || input_getKey(SMALLINPUT_ARROW_LEFT); break;
|
||||||
case SFG_KEY_A: return input_getKey('i') || input_getKey(SMALLINPUT_RETURN) || input_getKey(SMALLINPUT_MOUSE_L); break;
|
case SFG_KEY_A: return input_getKey('j') || input_getKey(SMALLINPUT_RETURN) || input_getKey(SMALLINPUT_MOUSE_L); break;
|
||||||
case SFG_KEY_B: return input_getKey('j') || input_getKey(SMALLINPUT_CTRL); break;
|
case SFG_KEY_B: return input_getKey('k') || input_getKey(SMALLINPUT_CTRL); break;
|
||||||
case SFG_KEY_C: return input_getKey('k'); break;
|
case SFG_KEY_C: return input_getKey('l'); break;
|
||||||
case SFG_KEY_MAP: return input_getKey(SMALLINPUT_TAB); break;
|
case SFG_KEY_MAP: return input_getKey(SMALLINPUT_TAB); break;
|
||||||
case SFG_KEY_JUMP: return input_getKey(' '); break;
|
case SFG_KEY_JUMP: return input_getKey(' '); break;
|
||||||
case SFG_KEY_MENU: return input_getKey(SMALLINPUT_ESCAPE); break;
|
case SFG_KEY_MENU: return input_getKey(SMALLINPUT_ESCAPE); break;
|
||||||
|
2
texts.h
2
texts.h
@ -32,7 +32,7 @@ static const char *SFG_menuItemTexts[] =
|
|||||||
#define SFG_TEXT_KILLS "kills"
|
#define SFG_TEXT_KILLS "kills"
|
||||||
#define SFG_TEXT_SAVE_PROMPT "save? L no yes R"
|
#define SFG_TEXT_SAVE_PROMPT "save? L no yes R"
|
||||||
#define SFG_TEXT_SAVED "saved"
|
#define SFG_TEXT_SAVED "saved"
|
||||||
#define SFG_VERSION_STRING "0.9d"
|
#define SFG_VERSION_STRING "1.0"
|
||||||
/**<
|
/**<
|
||||||
Version numbering is following: major.minor for stable releases,
|
Version numbering is following: major.minor for stable releases,
|
||||||
in-development unstable versions have the version of the latest stable +
|
in-development unstable versions have the version of the latest stable +
|
||||||
|
Loading…
Reference in New Issue
Block a user