jgabaut / helapordo Goto Github PK
View Code? Open in Web Editor NEWA roguelike terminal game, using ncurses.
Home Page: https://jgabaut.github.io/helapordo-docs
License: GNU General Public License v3.0
A roguelike terminal game, using ncurses.
Home Page: https://jgabaut.github.io/helapordo-docs
License: GNU General Public License v3.0
Describe the bug
Calls to KLS_PUSH()
macro are passing the Example
type itself.
This is not recommended to do, since the call won't be correctly updated if you change the types and the typedef
ends up having an incorrect size.
Using an expression pointer size is preferreable (eg. *example
instead).
Additional context
See related koliseo
issue: link
Is your feature request related to a problem? Please describe.
After starting, helapordo
is only using partial screen.
Describe the solution you'd like
I wish if it utilize all available screen on current terminal.
Describe alternatives you've considered
I am zooming in to make it bigger. Couldn't really think of an alternative for this issue.
Additional context
When trying to build nc-1.4.1
with clang
an error occurs (given we have -Werror
):
./sprites4curses/s4c-animate/animate.c:245:25: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
int s4c_check_has_colors() {
^
void
./sprites4curses/s4c-animate/animate.c:252:31: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
int s4c_check_can_change_color() {
^
void
2 warnings generated.
Related issue: link.
Currently, when running with -X
, a crash can be encountered by:
To Reproduce
Shop
, should also work with Treasure
)m
and select Save
Expected behavior
The save succeeds and no crash occurs.
Linux,
macOS
>=1.4.5
I just noticed the comments may have a funny typo. Unintentional, it was supposed to say "ship"...
Will be removed in next patch.
Line 6 in 3a2e71e
Is your feature request related to a problem? Please describe.
I want to hear game start/over sound, fight started sound like X vs Y, in fight sounds (dhishum-dhishum), kill sound like KO, character sounds etc
*Describe the solution you'd like
If possible please add pre-recorded sounds and play them in-game at suitable/synchronus time
Describe alternatives you've considered
Nothing considered. If not possible i would play music on my device and enjoy that instead.
Additional context
Pretty much every game has sounds. They are useful in engaging audience and attract their attraction. It would be lovely if helapordo could have this inbuilt or using a third-party tool like mpv
cli-player or vlc
cli-player
What are your thoughts on this?
Close this whenever you see fit.
Thank you for helapordo.
When I open the special move menu in a fight and I go over a special move, the screen on the right shows me the wrong infos. It seems like if I go over the Nth element the screen on the right shows me the Nth element that is shown in the menu that pops up when you have to learn a new special move
Is your feature request related to a problem? Please describe.
I'm always frustrated when i try to see the code. I wonder how this game is working. I would like to invest some time in learning at least a few thing from this repository.
Describe the solution you'd like
Please add
This is really hard to view the code without these files.
Describe alternatives you've considered
Describe how you're developing this. Are you using a specific IDE or an Editor?
Additional context
I may ask a few more question related to build process. I am not sure where to ask them.
I would prefer to ask them here. If you want me to create new issues for unrelated questions (like build process) I can do that else they will pop up here if this remains open.
Describe the bug
After 1.4.8
, the raylib
mockup build fails building.
To Reproduce
Steps to reproduce the behavior:
./configure --enable-raylib
ncurses
, which has never been included with raylib
build and it should stay so.Expected behavior
Build succeeds because raylib
build should not expect symbols from ncurses
. Try to reproduce this from 1.4.7
and it should not happen.
>=1.4.8
I am fairly sure this is due to s4c-gui
always including ncurses
and such, so the code would need to make sure that module is not included and built when configuring for this kind of build.
Plus, this line should drop the switch
statement since the logic now uses if else
constructs.
Describe the bug
src/ser/ser_core.c:314: _Bool ser_Equip(Equip *, SerEquip *): assertion "ser->perksCount < EQUIPPERKSMAX" failed
To Reproduce
Steps to reproduce the behavior:
-X
Equip
in your bag boasting EQUIPPERKSMAX
perksExpected behavior
ser->perksCount <= EQUIPPERKSMAX
, maybe? Will check.
1.4.4
Describe the bug
Game crashes when trying to load a saved game.
I went back and tested versions and it seems 1.0.2
is the last one not exibiting the immediate crash.
I quickly checked with gdb to see a backtrace and I think the failing line was around ptr_to_loaded_roomindex
, which gets dereferenced at some point when trying to load a save.
Obvious culprit is the switch to the Koliseo
memory allocations, but I'll have to check was exactly happened from 1.0.2
to 1.0.3
to break loading.
To Reproduce
Steps to reproduce the behavior:
Home
or Enemies
Room
)Expected behavior
Game just resumes from where the save was left.
Desktop (please complete the following information):
>=1.0.3
Additional context
When trying to build rl-1.4.1
with clang
an error occurs (given we have -Werror
):
src/helapordo_raylib.c:215:17: error: variable 'framesCounter' set but not used [-Werror,-Wunused-but-set-variable]
int framesCounter = 0;
^
1 error generated.
As of 1.4.8
, this check is used to avoid build failures when building with a ncurses
library that does not support reset_color_pairs()
extension:
#ifndef reset_color_pairs
Which does not have the intended result at all, since the preprocessor can't be used for this kind of checks.
It may only check for a macro definition, and it seems ncurses
does not provide one to identify the availability of this extension.
Thus, the only solution to me seems adding a new build conditional that handles the definition of our own macro to use in the #ifndef
.
#ifndef HELAPORDO_SUPPORT_DEFAULT_BACKGROUND
The setting should probably be not enabled by default.
At the moment the saving/loading is based on plaintext, which is obviously not the best but it gets the job done.
Once you die and you get to the screen where it says "You died. Want to try again?" if you write anything other than "yes" or "no" (I wrote "y") and press enter, then under the "THANKS 4 PLAYING!" screen you write "yes" again by pressing enter, it starts a spam of "y"
helapordo/src/core/game_core.h
Line 1222 in 2ea157a
This and subsequent Path
fields should have their comments fixed.
The correct syntax is /**< COMMENT */
.
Describe the bug
I checked the latest release 1.1.5
and it seems that the variadic format of log_tag()
doesn't go well with some Linux versions.
On any attempt to call the function, and subsequently vfprintf()
, which is the actual culprit, a crash happens because of missing support.
If the platform really is the cause, this would effectively lock some distros from debugging for versions >1.1.3
, since before 1.1.4
log_tag()
was not variadic.
Edit: Last unaffected version is 1.1.0
, as the submodule koliseo
causes the same crash since 0.1.11
, and 1.1.1
bumped the dependency to 0.1.12
.
I removed mentions of 32bit Linux
since I don't believe that's the culprit for this one. I also corrected the last unaffected version to be 1.1.0
.
Useful backtrace line was:
with __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:74 74
../sysdeps/x86_64/multiarch/strlen-avx2.S: No such file or directory.
#1 0x00007ffff7c76db1 in __vfprintf_internal (_..._)
at ./stdio-common/vfprintf-internal.c:1517
The issue may be related to Koliseo
printing sized stuff which will have a different size on some platforms.
See relevant issue on Koliseo repo.
This stackoverflow link mentions something similar but doesn't ultimately pin the problem to a platform.
This comment seems to suggest it's about printing stuff.
To Reproduce
Steps to reproduce the behavior:
./configure --enable-debug-yes; make rebuild
-d
or -l
flag to turn on logging.log_tag()
call.Expected behavior
Log function prints to debug log file and returns peacefully.
some Linux
>1.1.0
(since koliseo
has the same crash since its 0.1.12
release, which made kls_log()
variadic>=1.1.4
, (since log_tag()
became variadic)When trying to build nc-1.4.0
with clang
an error occurs (given we have -Werror
):
src/rooms.c:957:63: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
mvwprintw(notifications_win, 0, 0,time_str);
^~~~
src/rooms.c:957:63: note: treat the string as an argument to avoid this
mvwprintw(notifications_win, 0, 0,time_str);
^
"%s",
src/rooms.c:1831:59: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
mvwprintw(notifications_win, 0, 0,time_str);
^~~~
src/rooms.c:1831:59: note: treat the string as an argument to avoid this
mvwprintw(notifications_win, 0, 0,time_str);
^
"%s",
2 errors generated
Describe the bug
The game used to crash when trying to use the -r
and -E
flags.
Ever since this commit, corresponding to version 1.0.11
, the code to handle the optarg
value was moved out ot the getopt()
scope and thus was crashing the program.
The bug is fixed with version 1.2.3
.
To Reproduce
Steps to reproduce the behavior:
-sdR [roomType]
or -sdE [enemyType]
getopt()
.Expected behavior
The game forces the requested roomClass
/ enemyClass
if a valid one is requested, otherwise it gracefully exits after notifying the user about the error.
Desktop (please complete the following information):
Linux
, macOs
<1.2.3, >=1.0.11
ATM, the configure.ac
file fails capturing the guessed OS given by config.guess
.
This is because config.guess
responds with darwinX.Y.Z
, but the checks in configure.ac
are only looking for darwin
specifically.
A quick patch would look like this:
diff --git a/configure.ac b/configure.ac
index 175d3c9..4fc2348 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,7 @@ AM_INIT_AUTOMAKE([foreign -Wall])
# Detect the host system and set PACK_PREFIX accordingly
AC_CANONICAL_HOST
-AM_CONDITIONAL([OS_DARWIN], [test "$host_os" = "darwin"])
+AM_CONDITIONAL([OS_DARWIN], [test "$host_os" = "darwin22.6.0"])
# Check for the --enable-debug option
AC_ARG_ENABLE([debug],
@@ -27,7 +27,7 @@ if test "$host_os" = "mingw32"; then
AC_SUBST([OS], ["w64-mingw32"])
AC_SUBST([TARGET], ["helapordo.exe"])
fi
-if test "$host_os" = "darwin"; then
+if test "$host_os" = "darwin22.6.0"; then
echo "Building for macos: [$host_cpu-$host_vendor-$host_os]"
# macOS specific flags
AC_SUBST([HELAPORDO_CFLAGS], ["-I/opt/homebrew/opt/ncurses/include -DKOLISEO_HAS_CURSES"])
But a better fix would not peg the version number, thus refactoring the checks to expect darwin*
for a macOS build.
>=1.0.0
Is your feature request related to a problem? Please describe.
I am used to vim motion. This is a thing i usually find everywhere now a days.
Describe the solution you'd like
While exploring the base,
w a s d or with h j k l key should be usable to move in the maze/map.
So basically, following key combination:
Motion | Key1 (already works) | Key2 | Key3 |
---|---|---|---|
Left | Left-arrow | a | h |
Right | Right-arrow | d | l |
Up | Up-arrow | w | k |
Down | Down-arrow | s | j |
Describe alternatives you've considered
For me personally, there is no alternative to vim bindings This is just natural to me. For non-vim gamers
Additional context
For people using non-QWERTY layouts this might not be a great addition
Describe the bug
Since building needs anvil
to generate its template header, it seems on some platforms build might fail due to anvil
relying on awk
to parse its config file.
To Reproduce
Steps to reproduce the behavior:
awk invalid syntax
errorsExpected behavior
Build succeeds even if awk
fails.
Linux
>= 1.3.0
Additional context
See the related issue on amboso
My version of awk
(working):
$ awk -W version
GNU Awk 5.2.2, API 3.2, PMA Avon 8-g1, (GNU MPFR 4.2.1, GNU MP 6.3.0)
Copyright (C) 1989, 1991-2023 Free Software Foundation.
Version of awk
on the reporter machine:
$ awk -W version
mawk 1.3.4 20200120
Copyright 2008-2019,2020, Thomas E. Dickey
Copyright 1991-1996,2014, Michael D. Brennan
Some Unicode chars could be used as tiny icons.
Useful example: link.
Is your feature request related to a problem? Please describe.
I want to be able to play this game in the transparent background.
Describe the solution you'd like
If possible; Please add:
Describe alternatives you've considered
Alternatively, just remove the use of background colors using a build time flag.
Additional context
Not sure if this is a bug or intended behavior. I actually want this game to stay transparent.
Describe the bug
With version 1.2.5
, koliseo
was bumped to 0.3.3
from 0.3.0
, but the gameloop_Win()
function was not updated to remove mentions of KOLISEO_DEBUG
and KOLISEO_DEBUG_FP
. Hence, the build fails when trying to build with mingw32
.
To Reproduce
Steps to reproduce the behavior:
git checkout 1.2.5
./configure --host x86_64-w64-mingw32
make rebuild
src/helapordo.c: In function ‘gameloop_Win’:
src/helapordo.c:12203:25: error: ‘KOLISEO_DEBUG’ undeclared (first use in this function); did you mean ‘SO_DEBUG’?
12203 | KOLISEO_DEBUG = 1;
| ^~~~~~~~~~~~~
| SO_DEBUG
src/helapordo.c:12203:25: note: each undeclared identifier is reported only once for each function it appears in
src/helapordo.c:12221:33: error: ‘KOLISEO_DEBUG_FP’ undeclared (first use in this function)
12221 | KOLISEO_DEBUG_FP = fopen(path_to_kls_debug_file,"w");
Expected behavior
Working build.
Desktop
Windows
1.2.5
Additional context
koliseo
dropped KOLISEO_DEBUG
and KOLISEO_DEBUG_FP
globals with version 0.3.1
.
Situation
At the moment, documentation for the project is compiled into a .pdf
, bundled with releases.
A Pages deploy of the html
version of the docs should be done in a separate repo.
Steps
helapordo-docs
repo to hold documentation for the Pages deploydoxygen
html
outputDescribe the bug
With version 1.2.9
, a --std=c11
flag was added to Makefile.am
. However, the unintentional trigraphs in ./src/animations/*
files are being replaced with a different literal, and the visuals get corrupted.
I think this would need some update on sprites4curses
(see related issue) to not cause this issue anymore, or a downstream patch involving some escaping/breaking up of the offending sequences with sed
or something.
To Reproduce
1.2.9
(Tag includes the --std=c11
flag)Mage
or Imp
animations.Expected behavior
Correct display of the animations.
Desktop (please complete the following information):
Linux x86_64
1.2.9
Additional context
https://stackoverflow.com/questions/9387166/is-there-a-switch-to-disable-trigraphs-with-clang
[...] A programmer may want to place two question marks together yet not have the compiler treat them as introducing a trigraph. The C grammar does not permit two consecutive ? tokens, so the only places in a C file where two question marks in a row may be used are in multi-character constants, string literals, and comments. This is particularly a problem for the classic Mac OS, where the constant '????' may be used as a file type or creator. To safely place two consecutive question marks within a string literal, the programmer can use string concatenation "...?""?..." or an escape sequence "...??...".
Describe the bug
With version 1.1.7
, the mingw32
build is shipped as non-functional.
I will look into debugging the Windows
version, but I don't know how hard the problem could be, as of now.
Update:
With version 1.1.8
, a mockup gameloop, gameloop_Win()
, was put in place for the _WIN32
build.
The issue is not to be closed yet, as while investigating I could not find a reason why just calling gameloop()
would make the game crash.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Functional run at least up to the first ncurses interaction, which should fail the terminal capability checks on cmd.exe
.
Desktop:
>= 1.1.6
The tutorial text is still reporting the old status quo, suggesting to use -s
to run in Story
mode.
Since that was deprecated in 1.4.9
, the text should be updated accordingly.
>=1.4.9
Version 1.3.5
added a conditional display of info from anvil__helapordo.h
(only when generated by invil
rather than amboso
).
However, time()
is being called, resulting in current time on the output instead of the header value.
Version: >=1.3.5
As of version 1.4.1
, the debug build of raylib
does not define KLS_DEBUG_CORE
.
This was done to fix the failing build, caused by this koliseo
issue: link.
Issue exists as of koliseo
0.3.20
.
When upstream updates and fixes this, KLS_DEBUG_CORE
should be defined.
With 1.4.9
, src/release_data/
was added, but the current clean
target was not updated.
This may cause builds to fail when switching toolchains.
Currently, the notifications are rendered immediately on generation, and the whole game stops for some time.
A refactor of the internal interfaces could allow drawing them at the same time as an animation frame is requested, resulting in smoother feel for the player.
Situation
A lot of legacy code is embedded as comment and it's an eyesore.
Removing it is due, but also a chore.
Maybe we should extract it to some "legacy docs" .c
file that can be translated with doxygen
, so the old code still retains some meaning.
Steps
Add a legacy_docs.c
file to hold meaningful definitions that would be nice to parse with doxygen
.
Blame legacy commented sections, looking for the big ones.
legacy_docs.c
partlegacy_docs.c
either as a function printing the legacy source code snippets, or as a single string constant.Describe the bug
After initial game start on screen that says, Select your save slot
pressing invalid keys hangs the game. No keys work except sending a kill signal to the process by Ctrl-c
To Reproduce
Steps to reproduce the behavior:
Esc
or q
or m
nothing works)Expected behavior
Game should discard bad/invalid keys
Screenshots
Comment if you want a screenshot. Didn't found it necessary.
Desktop (please complete the following information):
Additional context
None
Situation
Currently, many tags lay around and are ready to be picked up by anvil
when requesting a build.
We should prepare deprecation of unsupported tags.
Steps
release
branch, branching from the earliest non-deprecated commit in master
, to hold all supported tagsrelease-deprecated
branch, branching from the earliest not-deprecated commit in master
, to hold all deprecated tagspre-release
, not-deprecated ones as standard releasesWhen trying to build rl-1.4.0
with clang
an error occurs (given we have -Werror
):
src/helapordo_raylib.c:185:17: warning: variable 'framesCounter' set but not used [-Wunused-but-set-variable]
int framesCounter = 0;
^
src/helapordo_raylib.c:217:17: warning: variable 'framesCounter' set but not used [-Wunused-but-set-variable]
int framesCounter = 0;
^
2 warnings generated
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.