msokalski / ascii-patrol Goto Github PK
View Code? Open in Web Editor NEWAscii Patrol is an ASCII game project. It was mainly inspired by "Moon Patrol", my favourite arcade game at the times I was a child.
License: GNU General Public License v3.0
Ascii Patrol is an ASCII game project. It was mainly inspired by "Moon Patrol", my favourite arcade game at the times I was a child.
License: GNU General Public License v3.0
I'll poke around but i can't get keyboard input (?) on my jetson nano build.
Looks nice with my glsl shader though! :)
commenting out the prompt() i get segfault
[Thread 0x7fb7465130 (LWP 8349) exited]
Thread 1 "asciipat" received signal SIGSEGV, Segmentation fault.
SPRITE::Paint (this=0x5555612910 <intro_modal+2200>, scr=0x5555612030 <global_screen>, dx=68, dy=42, sx=0, sy=0, sw=0, sh=0,
bgkey=0 '\000', blend=true) at game.cpp:1445
1445 const char* img = data->mono[frame];
(gdb) bt
#0 SPRITE::Paint (this=0x5555612910 <intro_modal+2200>, scr=0x5555612030 <global_screen>, dx=68, dy=42, sx=0, sy=0, sw=0, sh=0,
bgkey=0 '\000', blend=true) at game.cpp:1445
#1 0x000000555558e218 in INTRO_MODAL::Run (this=0x5555612078 <intro_modal>) at temp.cpp:1496
#2 0x000000555559f230 in terminal_loop () at spec_nix.cpp:1082
#3 0x000000555558b5d8 in main (argc=1, argv=0x7fffffeb08) at temp.cpp:2187
(gdb) p frame
$1 = 0
$ setfont asciipat.psf
Couldn't get a file descriptor referring to the console
$ echo $TERM
xterm
$ echo $LANG
en_US.UTF-8
hmm...?
Hi, the game is great but why the gray background ?, the contrast is terrible and it makes it hard to see what is on the screen.
Drives me crazy, there's any switches or options to get a black background ?.
Thanks!.
alan@KinkPad-K450:~$ ascii-patrol
/snap/ascii-patrol/25/command-ascii-patrol.wrapper: 6: exec: /snap/ascii-patrol/25/launcher: Permission denied
alan@KinkPad-K450:~$ ls -l /snap/ascii-patrol/25/launcher
-rw-r--r-- 1 root root 1982 Feb 10 21:22 /snap/ascii-patrol/25/launcher
I expect you need to chmod +x
the launcher before snapping.
I just installed the snap package and the music sounds very distorted, warbling compared to the html5 version which worked fine for me.
Also attempting to playback recorded files just starts the game normally and doesn't show me the recording: .\ascii-patrol 2 filename.rec
There are no git tags for any of mentioned releases. These are critical for packaging.
When choosing the b/w mode the background is all white, any way to reverse this ?
Hi! It would be actually great to provide some basic instructions for building the program and provide the list of packages that are already in some Linux distro's repositories (so people could install it in one command).
Here's the package I created for Arch Linux users: https://aur.archlinux.org/packages/ascii-patrol-git/
First off, please forgive me as I am not a programmer or I'd try to see if I could do this myself.
On *nix systems config files like asciipat.cfg, asciipat.rec, asciipat.rnk are normally hidden by appending a '.' to the beginning of the file name or putting them in a hidden directory that starts with a '.'. So, the config files would be .asciipat.cfg, etc or in a directory called something like .asciipat/, or .config/asciipat.
It would be wonderful if when compiled for *nix systems asciipat followed this convention.
At the step cmake --build build
I encountered the following output, which looks like traceback for an error but I can't pinpoint it. There are references to the high score functions, but I have curl installed and it is up-to-date.
[ 92%] Building CXX object CMakeFiles/asciipat.dir/spec_nix.cpp.o
In file included from /home/dtork/repos/ascii-patrol/spec_nix.cpp:58:
/home/dtork/repos/ascii-patrol/spec_nix.cpp: In function ‘void get_hiscore(int, const char*)’:
/home/dtork/repos/ascii-patrol/spec_nix.cpp:1334:25: warning: ‘%s’ directive writing up to 1023 bytes into a region of size 1006 [-Wformat-overflow=]
1334 | "curl --silent -o \"%s\" \"http://ascii-patrol.com/rank.php?rank=%d&id=%s\" 2>/dev/null"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1335 | ,path,ofs+1,id);
| ~~~~
/home/dtork/repos/ascii-patrol/spec.h:94:45: note: in definition of macro ‘sprintf_s’
94 | #define sprintf_s(dst,size,...) sprintf(dst,__VA_ARGS__)
| ^~~~~~~~~~~
/home/dtork/repos/ascii-patrol/spec_nix.cpp:1334:45: note: format string is defined here
1334 | "curl --silent -o \"%s\" \"http://ascii-patrol.com/rank.php?rank=%d&id=%s\" 2>/dev/null"
| ^~
In file included from /home/dtork/repos/ascii-patrol/spec_nix.cpp:58:
/home/dtork/repos/ascii-patrol/spec.h:94:40: note: ‘sprintf’ output 78 or more bytes (assuming 1101) into a destination of size 1024
94 | #define sprintf_s(dst,size,...) sprintf(dst,__VA_ARGS__)
| ~~~~~~~^~~~~~~~~~~~~~~~~
/home/dtork/repos/ascii-patrol/spec_nix.cpp:1333:17: note: in expansion of macro ‘sprintf_s’
1333 | sprintf_s(cmd,1024,
| ^~~~~~~~~
/home/dtork/repos/ascii-patrol/spec_nix.cpp:1340:25: warning: ‘%s’ directive writing up to 1023 bytes into a region of size 1006 [-Wformat-overflow=]
1340 | "curl --silent -o \"%s\" \"http://ascii-patrol.com/rank.php?rank=%d\" 2>/dev/null"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1341 | ,path,ofs+1);
| ~~~~
/home/dtork/repos/ascii-patrol/spec.h:94:45: note: in definition of macro ‘sprintf_s’
94 | #define sprintf_s(dst,size,...) sprintf(dst,__VA_ARGS__)
| ^~~~~~~~~~~
/home/dtork/repos/ascii-patrol/spec_nix.cpp:1340:45: note: format string is defined here
1340 | "curl --silent -o \"%s\" \"http://ascii-patrol.com/rank.php?rank=%d\" 2>/dev/null"
| ^~
In file included from /home/dtork/repos/ascii-patrol/spec_nix.cpp:58:
/home/dtork/repos/ascii-patrol/spec.h:94:40: note: ‘sprintf’ output between 74 and 1107 bytes into a destination of size 1024
94 | #define sprintf_s(dst,size,...) sprintf(dst,__VA_ARGS__)
| ~~~~~~~^~~~~~~~~~~~~~~~~
/home/dtork/repos/ascii-patrol/spec_nix.cpp:1339:17: note: in expansion of macro ‘sprintf_s’
1339 | sprintf_s(cmd,1024,
| ^~~~~~~~~
/home/dtork/repos/ascii-patrol/spec_nix.cpp: In function ‘void post_hiscore()’:
/home/dtork/repos/ascii-patrol/spec_nix.cpp:1357:17: warning: ‘%s’ directive writing up to 1023 bytes into a region of size 1006 [-Wformat-overflow=]
1357 | "curl --silent -o \"%s\" -F \"rec=@%s\" \"http://ascii-patrol.com/rank.php\" 2>/dev/null"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1358 | ,path,
| ~~~~
/home/dtork/repos/ascii-patrol/spec.h:94:45: note: in definition of macro ‘sprintf_s’
94 | #define sprintf_s(dst,size,...) sprintf(dst,__VA_ARGS__)
| ^~~~~~~~~~~
/home/dtork/repos/ascii-patrol/spec_nix.cpp:1357:37: note: format string is defined here
1357 | "curl --silent -o \"%s\" -F \"rec=@%s\" \"http://ascii-patrol.com/rank.php\" 2>/dev/null"
| ^~
In file included from /home/dtork/repos/ascii-patrol/spec_nix.cpp:58:
/home/dtork/repos/ascii-patrol/spec.h:94:40: note: ‘sprintf’ output 78 or more bytes (assuming 1101) into a destination of size 1024
94 | #define sprintf_s(dst,size,...) sprintf(dst,__VA_ARGS__)
| ~~~~~~~^~~~~~~~~~~~~~~~~
/home/dtork/repos/ascii-patrol/spec_nix.cpp:1356:9: note: in expansion of macro ‘sprintf_s’
1356 | sprintf_s(cmd,1024,
| ^~~~~~~~~
[100%] Linking CXX executable asciipat
[100%] Built target asciipat
Platform: Ubuntu Desktop 22.04.2 LTS (Jammy Jellyfish)
I know the game is in alpha and it's a hassle to set up a donation link but, seriously, this game needs to be paid for.
The CMakeLists.txt
file is present in the repository, but not in the release archives, meaning that they throw an error if CMake configuration is attempted. I needed to fetch a corresponding git-hash based archives which GitHub offers in order to package it.
Debian unstable
xfce4-terminal, version 0.8.6-1
libvte-2.91-0, version 0.50.2-3
Keyboard input doesn't work at all.
Hello, wonderful game. I love the menus so much. Studying your code atm.
Duirng actual gameplay, I get a offwhite background with kitty, qterminal, termit, lxterminal and xfce4-terminal. https://0x0.st/z68Q.png Can this be made black?
Is this white set in LANDSCAPE::Scroll in game.cpp?
Also, with xterm and urxvt I get no keyboard input during 'Press Any Key' but maybe that should be a seperate issue.
Btw the lowest cpu (game + xorg) use so far seemed to be in kitty terminal emulator.
ascii-patrol 1.5.0 alpha (git master from Nov 14, 2019)
aarch64
g++ (Debian 8.3.0-23) 8.3.0
This error shows up straight after it starts to draw mountains.
double free or corruption (out)
Aborted (core dumped)
I was running the prebuilt version for Linux x64. I've tried compiling it myself and the same error appeared.
I'm using Ubuntu 18.10 with KDE. Tried to run it with Konsole, XTerm, and TTY. Same problem in all of them.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.