Giter Club home page Giter Club logo

helapordo's Introduction

Hi there 👋

helapordo's People

Contributors

jgabaut avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

helapordo's Issues

[FEATURE] KLS_PUSH() calls should pass types size with a pointer

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

[FEATURE] Full screen utilization

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

  • Am i the only one with partial screen size utilization? I am not sure.
  • If so should i open it as a bug report?

2024-125-Sat-May_04-07:27:31_PM

  • Did i miss an option to use full-screen?
  • Sorry if this is already implemented.

[BUG] nc-1.4.1 Build fails on clang

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.

[BUG] Saving from map menu while on a cleared room crashes the game

Currently, when running with -X, a crash can be encountered by:

To Reproduce

  1. Finish a room (tested with Shop, should also work with Treasure)
  2. Once back at map view, open menu with m and select Save
  3. Game crashes and debug log says save operation failed

Expected behavior
The save succeeds and no crash occurs.

  • OS: Linux, macOS
  • Version >=1.4.5

[BUG] The source code has a typo

I just noticed the comments may have a funny typo. Unintentional, it was supposed to say "ship"...

Will be removed in next patch.

// The author of the original code gave permission to re-license it to shit helapordo with just one license.

[FEATURE] In game sound

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.

[BUG] Specials menu displays the wrong selected move

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

[QUESTION] Addition of a few files

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

  • .clang-format and .clang-tidy file
  • some way to generate a compile-commands.json file

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.

[BUG] 1.4.8 fails build for raylib mockup

Describe the bug
After 1.4.8, the raylib mockup build fails building.

To Reproduce
Steps to reproduce the behavior:

  1. Try building with ./configure --enable-raylib
  2. Build fails due to missing symbols expected from 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.

  • Version >=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.

[BUG] [Experimental] Assertion fail when saving an equip with N perks

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:

  1. Run with -X
  2. Save with an Equip in your bag boasting EQUIPPERKSMAX perks
  3. Crash

Expected behavior
ser->perksCount <= EQUIPPERKSMAX, maybe? Will check.

  • Version 1.4.4

[BUG] SEGFAULT when trying to load a save

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:

  1. Save a game (either from Home or Enemies Room)
  2. Close the game
  3. Relaunch and select "Load a game"
  4. SEGFAULT

Expected behavior
Game just resumes from where the save was left.

Desktop (please complete the following information):

  • OS: Linux
  • Version: >=1.0.3

Additional context

[BUG] rl-1.4.1 Build fails on clang

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.

[BUG] Current check for reset_color_pairs() availability is bogus

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.

[BUG] Text spam bug in the death screen

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"

[BUG] Crash when turning on debug logging on some Linux

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.

Update

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:

  1. Compile with debug access. ./configure --enable-debug-yes; make rebuild
  2. Run the game with -d or -l flag to turn on logging.
  3. Game crashes as soon at the first log_tag() call.

Expected behavior
Log function prints to debug log file and returns peacefully.

  • OS: some Linux
  • Version:
    • >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)

[BUG] nc-1.4.0 Build fails on clang

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

[BUG] Game crash when using -r or -E flags

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:

  1. Run the game with -sdR [roomType] or -sdE [enemyType]
  2. Game crashes immediately after 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):

  • OS: Linux, macOs
  • Version <1.2.3, >=1.0.11

[BUG] The configure.ac file fails guessing OS when on darwin

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.

  • OS: macOS
  • Version >=1.0.0

[FEATURE] WASD & HJKL keys for exploring the base

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

[BUG] Build can fail on system with different awk

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:

  1. Try building
  2. See awk invalid syntax errors

Expected behavior
Build succeeds even if awk fails.

  • OS: Linux
  • Version >= 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

[FEATURE] Transparent mode and adaptive colors

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:

  • A configuration option which can enable/disable transparent mode.
  • The game should not change color of terminal background in transparent mode
  • Use adaptive colors based on current background in transparent mode

Describe alternatives you've considered
Alternatively, just remove the use of background colors using a build time flag.

Additional context

  • While playing, screen becomes transparent for some of the menus.

Not sure if this is a bug or intended behavior. I actually want this game to stay transparent.
2024-125-Sat-May_04-07:27:31_PM

[BUG] 1.2.5 fails WIN32 build

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:

  1. git checkout 1.2.5
  2. ./configure --host x86_64-w64-mingw32
  3. make rebuild
  4. Build fails with:
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

  • OS: Windows
  • Version: 1.2.5

Additional context

koliseo dropped KOLISEO_DEBUG and KOLISEO_DEBUG_FP globals with version 0.3.1.

[FEATURE] Add Github Pages web docs using the current doxygen file

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

  • Create new helapordo-docs repo to hold documentation for the Pages deploy
  • Add the first batch of files from doxygen html output
  • Add a link in README to the deploy

[BUG] Some animations are deformed when building with --std=c11

Describe 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. Build 1.2.9 (Tag includes the --std=c11 flag)
  2. Run and check out examples like Mage or Imp animations.

Expected behavior
Correct display of the animations.

Screenshots
screen

Desktop (please complete the following information):

  • OS: Linux x86_64
  • Version 1.2.9

Additional context

https://stackoverflow.com/questions/9387166/is-there-a-switch-to-disable-trigraphs-with-clang

Wikipedia:

[...] 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 "...??...".

[FEATURE] build-nc-w64 is WIP

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:

  1. Run the executable.
  2. Crash.

Expected behavior

Functional run at least up to the first ncurses interaction, which should fail the terminal capability checks on cmd.exe.

Desktop:

  • OS: Windows 10
  • Version: >= 1.1.6

[BUG] Current time is shown instead of commit time

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

[FEATURE] Pass KLS_DEBUG_CORE to debug raylib build

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.

[CHORE] Remove legacy code from comments

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.

    • For all important ones:
    • Add info about the last tag to use this legacy section to the relevant legacy_docs.c part
    • Add this legacy section to legacy_docs.c either as a function printing the legacy source code snippets, or as a single string constant.
    • Open a PR

[BUG] Game hang for left, right key press on saveslot pick

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:

  1. ./helapordo -D
  2. Press enter to start
  3. Press enter again to start a new game
  4. Press left arrow key (or alternatively, press left/right key after pressing up/down keys)
  5. Yes, now enter or up/down arrow wouldn't work. (I also tried 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):

  • OS: ArchLinux
  • Version: 1.4.7

Additional context
None

[FEATURE] Deprecation policy is not set up

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

  • Create new release branch, branching from the earliest non-deprecated commit in master, to hold all supported tags
  • Create new release-deprecated branch, branching from the earliest not-deprecated commit in master, to hold all deprecated tags
  • Correctly advance both of them by merging the needed tags.
  • Open PR to pull the new branches to the repo
  • Re-tag the branches (new meaningful names for the tags would be needed).
  • Create a release for each new tag:
    • deprecated ones as pre-release , not-deprecated ones as standard releases

[BUG] rl-1.4.0 Build fails on clang

When 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.