Browse Source

Prepare for release

merge-requests/2/head
Miloslav Číž 2 years ago
parent
commit
c04ffbd1fa
  1. 47
      README.md
  2. BIN
      assets/ICON.BMP
  3. BIN
      assets/TITLESCREEN.BMP
  4. BIN
      bin/Anarch_LQ_linux64_sdl_elf_1-0
  5. BIN
      bin/Anarch_gbmeta_1-0.zip
  6. BIN
      bin/Anarch_linux64_csfml_elf_1-0
  7. BIN
      bin/Anarch_linux64_sdl_elf_1-0
  8. BIN
      bin/Anarch_pokitto_1-0.pop
  9. BIN
      bin/Anarch_pokitto_nonoverclock_1-0.bin
  10. BIN
      bin/Anarch_winshitxp_sdl_1-0.zip
  11. 1
      bin/web/anarch.html
  12. 1
      bin/web/anarch.js
  13. BIN
      bin/web/anarch.wasm
  14. 4
      game.h
  15. 4
      main_csfml.c
  16. 4
      main_pokitto.cpp
  17. 18
      main_sdl.c
  18. 6
      main_terminal.c
  19. 2
      texts.h

47
README.md

@ -1,18 +1,16 @@ @@ -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
![](media/logo_big.png)
[TODO website link]()
TODO trailer link
[anarch.gitlab.io]()
[anarch.gitlab.io/web/anarch.html]() (play in browser)
*extremely small, completely public domain, no-dependency, no-file,
portable suckless anarcho-pacifist from-scratch 90s-style Doom clone that runs
everywhere, made for the benefit of all living beings*
![](media/3screens.png)
- [why this game is special](#why-this-game-is-special)
- [stats and comparisons (for version 1.0)](#stats-and-comparisons-for-version-10)
- [manifesto](#manifesto)
@ -54,12 +52,12 @@ source code stats (80 column wrapping, a lot of empty lines): @@ -54,12 +52,12 @@ source code stats (80 column wrapping, a lot of empty lines):
| file | LOC | file size |
| --------------------------------------| ------- | --------- |
| game.h (main game logic) | TODO | TODO |
| raycastlib.h (ray casting library) | TODO | TODO |
| smallinput.h (for terminal frontend) | TODO | TODO |
| images.h, levels.h, sounds.h (assets) | TODO | TODO |
| settings.h, constants.h | TODO | TODO |
| **total** | TODO | TODO |
| game.h (main game logic) | 4979 | 140 KB |
| raycastlib.h (ray casting library) | 2058 | 64 KB |
| images.h, levels.h, sounds.h (assets) | 3868 | 340 KB |
| settings.h, constants.h | 1088 | 36 KB |
| main_sdl.c (SDL frontend) | 498 | 16 KB |
| **total (cloc of all sources)** | 14402 | 672 KB |
| Doom source code | 38000 | 1.6 MB |
| Wolf 3D source code | 25000 | 916 KB |
@ -67,11 +65,11 @@ compiled: @@ -67,11 +65,11 @@ compiled:
| binary | size | target FPS | resolution | RAM usage |
| -------------------- | ------------------------------------ | ----------- | ---------- | ---------- |
| GNU/Linux, SDL | TODO (gcc), TODO (clang), TODO (tcc) | TODO | TODO | TODO |
| GNU/Linux, terminal | TODO (gcc), TODO (clang), TODO (tcc) | TODO | TODO | TODO |
| Pokitto | TODO | TODO | TODO | TODO |
| Gamebuino Meta | TODO | TODO | TODO | TODO |
| browser | TODO (JS script) | TODO | TODO | TODO |
| GNU/Linux, SDL | 196 KB (gcc), 184 KB (clang), 184 KB (tcc) | 60 | 700 * 512 | ~40 MB |
| GNU/Linux, terminal | 184 KB (gcc), 176 KB (clang), 176 KB (tcc) | 30 | 127 * 42 | ~5 MB |
| Pokitto | 180 KB | 35 (overclock), 22 | 110 * 88 | < 32 KB |
| Gamebuino Meta | 215 KB | 18 | 80 * 64 | < 32 KB |
| browser | 884 KB (whole output) | 35 | 512 * 320 | ~20 MB |
system requirements:
@ -186,6 +184,21 @@ Depends from where you count. From my [first experiments with raycasting on Poki @@ -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.
### 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?
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
assets/TITLESCREEN.BMP

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
bin/Anarch_LQ_linux64_sdl_elf_1-0

Binary file not shown.

BIN
bin/Anarch_gbmeta_1-0.zip

Binary file not shown.

BIN
bin/Anarch_linux64_csfml_elf_1-0

Binary file not shown.

BIN
bin/Anarch_linux64_sdl_elf_1-0

Binary file not shown.

BIN
bin/Anarch_pokitto_1-0.pop

Binary file not shown.

BIN
bin/Anarch_pokitto_nonoverclock_1-0.bin

Binary file not shown.

BIN
bin/Anarch_winshitxp_sdl_1-0.zip

Binary file not shown.

1
bin/web/anarch.html

@ -0,0 +1 @@ @@ -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

File diff suppressed because one or more lines are too long

BIN
bin/web/anarch.wasm

Binary file not shown.

4
game.h

@ -2328,7 +2328,9 @@ void SFG_monsterPerformAI(SFG_MonsterRecord *monster) @@ -2328,7 +2328,9 @@ void SFG_monsterPerformAI(SFG_MonsterRecord *monster)
SFG_SPRITE_SIZE_TO_HEIGHT_ABOVE_GROUND(SFG_GET_MONSTER_SPRITE_SIZE(
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 -
middleHeight)) / RCL_UNITS_PER_SQUARE;

4
main_csfml.c

@ -292,14 +292,14 @@ int main(int argc, char *argv[]) @@ -292,14 +292,14 @@ int main(int argc, char *argv[])
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("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("- [SPACE]: jump");
puts("- [J] [RETURN] [CTRL] [LMB]: game A button (shoot, confirm)");
puts("- [K] [SHIFT]: game B button (cancel, strafe)");
puts("- [L]: game C button (+ down = menu, + up = jump, ...)");
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("- [F12]: screenshot");
puts("- [ESCAPE]: menu");

4
main_pokitto.cpp

@ -222,8 +222,6 @@ int main() @@ -222,8 +222,6 @@ int main()
pokitto.begin();
timerInit(8000);
uint8_t allZeros = 1;
for (uint8_t i = 0; i < SFG_SAVE_SIZE; ++i)
@ -239,6 +237,8 @@ int main() @@ -239,6 +237,8 @@ int main()
save.saveCookie();
}
timerInit(8000);
for (uint16_t i = 0; i < SFG_SFX_SAMPLE_COUNT; ++i)
audioBuff[i] = 127;

18
main_sdl.c

@ -24,13 +24,13 @@ @@ -24,13 +24,13 @@
#define SFG_OS_IS_MALWARE 1
#endif
// #define SFG_START_LEVEL 1
// #define SFG_QUICK_WIN 1
// #define SFG_IMMORTAL 1
// #define SFG_ALL_LEVELS 1
// #define SFG_UNLOCK_DOOR 1
// #define SFG_REVEAL_MAP 1
// #define SFG_INFINITE_AMMO 1
// #define SFG_START_LEVEL 1
// #define SFG_QUICK_WIN 1
// #define SFG_IMMORTAL 1
// #define SFG_ALL_LEVELS 1
// #define SFG_UNLOCK_DOOR 1
// #define SFG_REVEAL_MAP 1
// #define SFG_INFINITE_AMMO 1
// #define SFG_TIME_MULTIPLIER 512
// #define SFG_CPU_LOAD(percent) printf("CPU load: %d%\n",percent);
// #define GAME_LQ
@ -396,14 +396,14 @@ int main(int argc, char *argv[]) @@ -396,14 +396,14 @@ int main(int argc, char *argv[])
puts("-w force window");
puts("-f force fullscreen\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("- [SPACE]: jump");
puts("- [J] [RETURN] [CTRL] [LMB]: game A button (shoot, confirm)");
puts("- [K] [SHIFT]: game B button (cancel, strafe)");
puts("- [L]: game C button (+ down = menu, + up = jump, ...)");
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("- [ESCAPE]: menu");

6
main_terminal.c

@ -99,9 +99,9 @@ int8_t SFG_keyPressed(uint8_t key) @@ -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_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_A: return input_getKey('i') || 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_C: return input_getKey('k'); 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('k') || input_getKey(SMALLINPUT_CTRL); break;
case SFG_KEY_C: return input_getKey('l'); break;
case SFG_KEY_MAP: return input_getKey(SMALLINPUT_TAB); break;
case SFG_KEY_JUMP: return input_getKey(' '); break;
case SFG_KEY_MENU: return input_getKey(SMALLINPUT_ESCAPE); break;

2
texts.h

@ -32,7 +32,7 @@ static const char *SFG_menuItemTexts[] = @@ -32,7 +32,7 @@ static const char *SFG_menuItemTexts[] =
#define SFG_TEXT_KILLS "kills"
#define SFG_TEXT_SAVE_PROMPT "save? L no yes R"
#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,
in-development unstable versions have the version of the latest stable +

Loading…
Cancel
Save