From 8b85fffc3a582ca3550d655d01117c634f541ffb Mon Sep 17 00:00:00 2001 From: zombie Date: Mon, 14 Mar 2022 07:53:54 -0400 Subject: [PATCH] updated readme and made debug entitys use attemt_move --- README.md | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main.c | 9 +++---- 2 files changed, 82 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3118631..55edf06 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,80 @@ # playergame +PlayerGame is a very garbo game I made that is designed to run on any os and any platform. +PlayerGame is written in c99 and does indeed compile with tcc and other wack compilers. +### Tested on and confirmed working + - Arch Linux on x86 + - Mac OS on x86 (cringe) + - Termux on ARM +# Requirements +### Minimum: + - uhh idk a brick???? + - 80x40 charactor display + - puts printf clock.h (i plan on supporting rdtsc) + - 9k of ram + os + +### Recommended + - 100 mips processor + - 80x40 charactor display + - puts printf clock.h (i plan on supporting rdtsc) + - 9k of ram + os + - +# Building + 1. git clone it + 2. install meson (idk how pip install it i guess) + 3. cd into the cloned folder + 4. build it... + +### Linux and friends +`mkdir builddir` +`cd builddir` +`meson setup builddir` +`meson compile` + +### Suckless MFs +`cd src` +`tcc main.c -lcurses` + +# Screenshot + +Y 2& +2 2& +3 & &&&&&&&&&&&&&&&& 2& +4 & & & 2& +5 & & & 2& +6 && & 2& +7 & & 2& +8 & & 2& +9 & & 2& +a7&*& & 2& +b7&*& & 2& +c7&*& & 2& +d7&*& & 2& +e7&*& 2& +f7&*& &\ 2& +g7&*& 2& +h7&*& & 2& +i7&*& & # 2& +j7&*& & 2& +k & & 2& +l & & 2& +m & & 2& +n &&&&&&&&&&&&&&&&&&&& 2& +o 2& +p 2& +q 2& +r 2& +s 2& +t 2& +u 2& +v 2& +w 2& +x 2& +y 2& +z 2& +A 2& +B 2& +C 2& +D 2& +E 2& +&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& diff --git a/src/main.c b/src/main.c index b399ffa..95d80f1 100644 --- a/src/main.c +++ b/src/main.c @@ -131,9 +131,8 @@ int main( int argc, char *argv[] ) { //yoinked from the internet argc is number break; //debug case case 'l': -// debugent_x.x++; - debugent_y.y++; - all_entity(&debugent_x); + attempt_move(&debugent_x, 1, 0); + attempt_move(&debugent_y, 1, 3); break; } //game logic not kb dependent @@ -174,9 +173,9 @@ int main( int argc, char *argv[] ) { //yoinked from the internet argc is number zom_putcharat(player.xold, player.yold, player.under_charold); zom_putcharat(player.x, player.y, '#'); - zom_putcharat(debugent_x.xold, debugent_x.yold, ' '); + zom_putcharat(debugent_x.xold, debugent_x.yold, debugent_x.under_charold); zom_putcharat(debugent_x.x, debugent_x.y, 'X'); - zom_putcharat(debugent_y.xold, debugent_y.yold, ' '); + zom_putcharat(debugent_y.xold, debugent_y.yold, debugent_y.under_charold); zom_putcharat(debugent_y.x, debugent_y.y, 'Y'); }