Add Pokitto frontend
This commit is contained in:
parent
dae47de5f9
commit
e838d76e72
6 changed files with 54 additions and 25 deletions
18
README.md
18
README.md
|
@ -45,16 +45,22 @@ Please note however the game is still relatively simple and so **the physics IS
|
|||
- **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** -- depending on platform, game and compilation settings, a playable executable can take only around 128 kB; in normal scenarios it will most likely fit under 400 kB.
|
||||
- It is **exceptionally portable and future proof** thanks to having no dependencies besides C99 compiler. So far it was ported to:
|
||||
- GNU/Linux, possible backends: SDL2, CSFML, X11
|
||||
- OpenBSD
|
||||
- web browser JavaScript (via emscripten)
|
||||
- TODO
|
||||
- **GNU/Linux**: via SDL2, CSFML or X11
|
||||
- **Window$**: via SDL2
|
||||
- **OpenBSD**: via SDL2
|
||||
- **web browser**: via translation to JavaScript with emscripten
|
||||
- **Circuitmess Ringo AKA MAKERphone** (32b 160 MHz, 520 KB RAM)
|
||||
- on resource-limited computers in very limited ways (simplest rendering with low FPS, only loading tiniest maps, no ghosts, replays or audio):
|
||||
- **Pokitto** (32bit 48 MHz CPU, 36 KB RAM)
|
||||
- **Circuitmess Nibble** (32b 160 MHz CPU, 80 KB RAM)
|
||||
- **ESPboy** (32b 160 MHz CPU, 80 KB RAM)
|
||||
- It also goes without saying the physics is **100% deterministic**, it behaves the same on every platform, independantly of rendering FPS. Besides others this allows for recording and playing back very small replays and creating press forward maps.
|
||||
- It is **super 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, furry mascots or similar political bullshit**. This is just a game.
|
||||
- **No "modern" bullshit such as OOP, meme design patterns, scripting, sandboxes, "memory safety" and similar shit**.
|
||||
- **No codes of censorship, flags, furry mascots or similar political bullshit.**
|
||||
- **No "modern" bullshit such as OOP, Python, Docker, meme design patterns, scripting, sandboxes, "memory safety" and similar crap**.
|
||||
- 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-financial benefit as well), this is made purely to bring more good to the world without gaining any advantage for self.
|
||||
- This game has **PURE SOUL** and REAL oldschool graphics in the "PS1" style. No Unity or Unreal, no "retro" imitation shaders, no assets from a store. This isn't a wannabe retro 90s pretender, this IS a real 90s game.
|
||||
- The game is **finished**, no need to update it ever.
|
||||
|
||||
## Manifesto
|
||||
|
||||
|
|
1
TODO.txt
1
TODO.txt
|
@ -16,6 +16,7 @@ fuck issue trackers :D
|
|||
- make some kinda repo for world record runs? how will they submit it?
|
||||
- final tests:
|
||||
- very long replay DID 1x
|
||||
- absence of music file
|
||||
- different resolutions KINDA DID 1x
|
||||
- different settings (332, POTATO, ...)
|
||||
- crazy shit with physics KINDA DID
|
||||
|
|
|
@ -23,10 +23,9 @@ TFT_eSPI tft;
|
|||
#define LCR_SETTING_GHOST_MAX_SAMPLES 0
|
||||
#define LCR_SETTING_332_COLOR 1
|
||||
#define LCR_LOADING_COMMAND wdt_reset();
|
||||
#define S3L_SORT 0
|
||||
#define LCR_SETTING_MAP_MAX_BLOCKS 512
|
||||
#define LCR_SETTING_MAX_MAP_VERTICES 500
|
||||
#define LCR_SETTING_MAX_MAP_TRIANGLES 600
|
||||
#define LCR_SETTING_MAP_MAX_BLOCKS 280
|
||||
#define LCR_SETTING_MAX_MAP_VERTICES 300
|
||||
#define LCR_SETTING_MAX_MAP_TRIANGLES 300
|
||||
#define LCR_SETTING_REPLAY_MAX_SIZE 0
|
||||
#define LCR_SETTING_CAR_SHADOW 0
|
||||
#define LCR_SETTING_PARTICLES 0
|
||||
|
@ -37,6 +36,9 @@ TFT_eSPI tft;
|
|||
#define LCR_SETTING_POTATO_GRAPHICS 1
|
||||
#define LCR_SETTING_ENABLE_DATA_FILE 0
|
||||
#define LCR_SETTING_ONLY_SMALL_MAPS 1
|
||||
#define S3L_SORT 0
|
||||
#define S3L_Z_BUFFER 0
|
||||
#define S3L_MAX_TRIANGES_DRAWN 16
|
||||
|
||||
#include "game.h"
|
||||
|
||||
|
|
|
@ -16,21 +16,20 @@
|
|||
#define LCR_SETTING_RESOLUTION_SUBDIVIDE 2
|
||||
#define LCR_SETTING_GHOST_MAX_SAMPLES 0
|
||||
#define LCR_LOADING_COMMAND wdt_reset();
|
||||
#define S3L_SORT 0
|
||||
#define LCR_SETTING_MAP_MAX_BLOCKS 400
|
||||
#define LCR_SETTING_MAX_MAP_VERTICES 450
|
||||
#define LCR_SETTING_MAX_MAP_TRIANGLES 600
|
||||
#define S3L_SORT 1
|
||||
#define S3L_Z_BUFFER 0
|
||||
#define S3L_MAX_TRIANGES_DRAWN 32
|
||||
#define LCR_SETTING_MAP_MAX_BLOCKS 350
|
||||
#define LCR_SETTING_MAX_MAP_VERTICES 300
|
||||
#define LCR_SETTING_MAX_MAP_TRIANGLES 500
|
||||
#define LCR_SETTING_REPLAY_MAX_SIZE 0
|
||||
#define LCR_SETTING_CAR_SHADOW 0
|
||||
#define LCR_SETTING_PARTICLES 0
|
||||
#define LCR_SETTING_LOG_LEVEL 0
|
||||
#define LCR_SETTING_LOD_DISTANCE 100
|
||||
#define LCR_SETTING_CAR_ANIMATION_SUBDIVIDE 0
|
||||
|
||||
#define LCR_SETTING_FPS 25
|
||||
|
||||
#define LCR_SETTING_POTATO_GRAPHICS 1
|
||||
|
||||
#define LCR_SETTING_ENABLE_DATA_FILE 0
|
||||
#define LCR_SETTING_ONLY_SMALL_MAPS 1
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
#define LCR_SETTING_RESOLUTION_SUBDIVIDE 2
|
||||
#define LCR_SETTING_MUSIC 0
|
||||
#define LCR_SETTING_GHOST_MAX_SAMPLES 0
|
||||
#define LCR_SETTING_MAP_MAX_BLOCKS 512
|
||||
#define LCR_SETTING_MAP_MAX_BLOCKS 650
|
||||
#define LCR_SETTING_MAX_MAP_VERTICES 1024
|
||||
#define LCR_SETTING_MAX_MAP_TRIANGLES 1500
|
||||
#define LCR_SETTING_MAX_MAP_TRIANGLES 1550
|
||||
#define LCR_SETTING_REPLAY_MAX_SIZE 0
|
||||
#define LCR_SETTING_CAR_SHADOW 0
|
||||
#define LCR_SETTING_PARTICLES 0
|
||||
|
@ -26,6 +26,7 @@
|
|||
#define LCR_SETTING_TEXTURE_SUBSAMPLE 4
|
||||
#define LCR_SETTING_ENABLE_DATA_FILE 0
|
||||
#define LCR_SETTING_ONLY_SMALL_MAPS 1
|
||||
#define LCR_SETTING_SKY_SIZE 1
|
||||
#define S3L_PERSPECTIVE_CORRECTION 0
|
||||
|
||||
#include "game.h"
|
||||
|
|
24
renderer.h
24
renderer.h
|
@ -29,9 +29,15 @@
|
|||
#define S3L_RESOLUTION_X LCR_EFFECTIVE_RESOLUTION_X
|
||||
#define S3L_RESOLUTION_Y LCR_EFFECTIVE_RESOLUTION_Y
|
||||
#define S3L_PIXEL_FUNCTION _LCR_pixelFunc3D
|
||||
|
||||
#ifndef S3L_PERSPECTIVE_CORRECTION
|
||||
#define S3L_PERSPECTIVE_CORRECTION 2
|
||||
#endif
|
||||
|
||||
#ifndef S3L_NEAR_CROSS_STRATEGY
|
||||
#define S3L_NEAR_CROSS_STRATEGY 1
|
||||
#define S3L_Z_BUFFER 1
|
||||
#endif
|
||||
|
||||
#define LCR_FONT_PIXEL_SIZE (1 + LCR_EFFECTIVE_RESOLUTION_X / 512)
|
||||
#define LCR_ANIMATE_CAR (LCR_SETTING_CAR_ANIMATION_SUBDIVIDE != 0)
|
||||
#define LCR_ANT_RESOLUTION (LCR_EFFECTIVE_RESOLUTION_Y <= 110)
|
||||
|
@ -41,10 +47,17 @@
|
|||
#define S3L_PERSPECTIVE_CORRECTION 0
|
||||
#define S3L_NEAR_CROSS_STRATEGY 1
|
||||
#define S3L_FLAT 1
|
||||
#undef S3L_Z_BUFFER
|
||||
|
||||
#ifndef S3L_Z_BUFFER
|
||||
#define S3L_Z_BUFFER 2 // simplified
|
||||
#endif
|
||||
|
||||
#ifndef S3L_MAX_TRIANGES_DRAWN
|
||||
#define S3L_MAX_TRIANGES_DRAWN 64 // lower, in case sorting was turned on
|
||||
#endif
|
||||
#else
|
||||
#define S3L_Z_BUFFER 1
|
||||
#endif
|
||||
|
||||
#define S3L_NEAR (10 * (S3L_F / 16)) // too low value will cause overflows
|
||||
#include "small3dlib.h"
|
||||
|
@ -1041,8 +1054,15 @@ uint8_t _LCR_buildMapModel(void)
|
|||
if (
|
||||
LCR_renderer.mapModel.vertexCount >= LCR_SETTING_MAX_MAP_VERTICES - 16 ||
|
||||
LCR_renderer.mapModel.triangleCount >= LCR_SETTING_MAX_MAP_TRIANGLES - 16)
|
||||
{
|
||||
_LCR_cullHiddenMapTris();
|
||||
|
||||
if (LCR_renderer.mapModel.vertexCount >= LCR_SETTING_MAX_MAP_VERTICES - 16
|
||||
|| LCR_renderer.mapModel.triangleCount >= LCR_SETTING_MAX_MAP_TRIANGLES
|
||||
- 16)
|
||||
break; // didn't help, no need to continue
|
||||
}
|
||||
|
||||
for (int i = 0; i < blockShapeByteCount; ++i)
|
||||
{
|
||||
if (vi == 0)
|
||||
|
|
Loading…
Reference in a new issue