Git Product home page Git Product logo

li-ri's People

Contributors

petitlapin avatar poussinou avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

li-ri's Issues

Add back screenshot feature

In older version, we could type F12 to do a screenshot. I commented it because it used SDL_Surface from SDL1.2 and now we use SDL_Texture and I didn't took the time to find how to convert from one to the other

the game stuck at "press any key" screen

I download the v3.1.4 source code and compile it to run on EmuELEC (https://github.com/EmuELEC/EmuELEC), which is basically a Linux system running on arm device. gptokeyb (https://github.com/EmuELEC/gptokeyb) is used to map gamepad buttons to keyboard inputs.

I can launch the program successfully, and the gamepad works fine in the menu with the buttons mapped to up/down/left/right/enter/esc.

However, when I try to start the game, it stuck at "press any key" screen. Nothing happens when I press "enter" button or other buttons. The only button that it recongnizes is "esc", with a popup window asking if I want to continue or quit. This popup window accept the "enter" button.

Does it expect some specific keyboard input to start the game? Any ideas?

hardcoded path

$ grep usr/share/games -r
src/utils.cc: sprintf(Path, "/usr/share/games/Li-ri/%s", Provi);

This shoudl be configurable via CMake

please autodetect system libsimpleini-dev using pkg-config

I can't say I'm really proud of this, but it get the release out of the door.

libsimpleini is crippled in Debian (not by me) and needs #define SI_NO_CONVERSION 1

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e328570..c3e29c9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,12 +33,9 @@ endif()
 set(CMAKE_CXX_STANDARD 11)
 set(CMAKE_CXX_EXTENSIONS OFF)
 
-include(FetchContent)
-FetchContent_Declare(simpleini
-  GIT_REPOSITORY https://github.com/brofield/simpleini.git
-  GIT_TAG        09c21bda1dc1b578fa55f4a005d79b0afd481296 # v4.22
-  )
-FetchContent_MakeAvailable(simpleini)
+
+pkg_check_modules(simpleini REQUIRED simpleini)
+
 
 add_executable(${LIRI_EXECUTABLE_NAME} WIN32
   src/audio.cc
@@ -74,7 +71,7 @@ else()
   target_link_libraries(${LIRI_EXECUTABLE_NAME} PRIVATE ${SDL2_LINK_LIBRARIES})
 endif()
 
-target_link_libraries(${LIRI_EXECUTABLE_NAME} PRIVATE SimpleIni::SimpleIni)
+target_link_libraries(${LIRI_EXECUTABLE_NAME} PUBLIC simpleini)
 
 
 include(GNUInstallDirs)
diff --git a/src/config.h.in b/src/config.h.in
index 11fcd97..df98e3f 100644
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -16,4 +16,10 @@
 /* Folder where data is installed */
 #define LIRI_DATA_DIR "@LIRI_DATA_DIR@"
 
+// I don't know how to use CMake
+// https://sources.debian.org/src/libsimpleini/4.20%2Bdfsg-1/debian/copyright/
+// libsimpleini is crippled in Debian:
+// Files-Excluded: ConvertUTF.*
+#define SI_NO_CONVERSION 1
+
 #endif // LIRI_CONFIG_H

better translation workflow

As written in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=432172, Li-ri uses a lot of space to store the translation (one image per text per language).

It would be better to have a standard gettext workflow and use SDL_ttf to display the text. A drawback would be we would use the same font (or almost) for all the texts (and we may lose all the actual translation as they are not kept apart, only in the images) but the advantages are way outstanding (standard flow, I would know how to add languages...).

[Idea] Improve direction changing method

Splitted from #13:

In gameplay, the direction changing method is confusing. I don't know how the direction changes
when touching the screen, and it takes time to loop among possible directions.

Proposed solution:

Add a soft keyboard in game, which consists of four direction keys and a pause button.

[Idea] Better support for touch screen devices

Issues

  • Cannot input player names in the leaderboard.
  • Some screens don't have Back or Menu buttons, thus making it difficult to escape and navigate.
  • In gameplay, the direction changing method is confusing. I don't know how the direction changes when touching the screen, and it takes time to loop among possible directions.

Ideas

  • Add IME support or a builtin soft keyboard.
  • Use Android's back key to go back to the previous screen or exit the game.
  • Add a soft keyboard in game, which consists of four direction keys and a pause button.

latin1

please recode this one file in unicode too

(je parle français si ça peut aider...)

W: ri-li: national-encoding [usr/share/doc/ri-li/AUTHORS]

tchet@brix ~/deb/ri-li $ file AUTHORS
AUTHORS: ISO-8859 tex

desktop file: "Keywords" needs to be upperace

--- a/io.github.petitlapin.Li-ri.desktop
+++ b/io.github.petitlapin.Li-ri.desktop
@@ -10,4 +10,4 @@ Terminal=false
 Type=Application
 Categories=ArcadeGame;Simulation;Game;KidsGame;
 StartupNotify=true
-keywords=game;train;toy;wood;engine;switches;kids;
+Keywords=game;train;toy;wood;engine;switches;kids;

Should remember independently which easy/normal/hard levels got completed

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=382693

Let's say to start playing ri-li in easy mode, you complete level 1-9 and loose at level 10.
If you choose to play "old level', you start again at level 10.

Now, assume that, later, you completed all levels in easy mode and started playing in
"normal" mode. If you choose to play "old level" and then "normal", it will always choose
level 40 by default, even if you didn't complete all levels in this mode.
This is very boring since you have to change 40 to the actual level that you want, you have
to take care of remembering which level you previously lose at, and (in case you're wrong)
changing the level during a game is not easy.

It would be great if ri-li could remember the last completed level in all modes
(easy/normal/hard). But I guess it will require to change the menus since the user
would have to choose the mode first and then choose between "new game" and "old level".

"SDL C/Java version mismatch" on Android

When launching Li-Ri 3.1.0 via F-Droid on Android 12, I get this error: SDL C/Java version mismatch (expected 2.28.4, got 2.28.5).
I've already tried to reinstall, but that doesn't help.

[BUG] 3.1.1 won't start but crash only

[Device Model]: Pixel 7
[Android Version]: 14
[Android API Level]: 34
[Process ID]: 13028
[CPU ABI]: arm64-v8a
[Package Name]: org.liri.liri
[Version Name]: 3.1.1
[Version Code]: 30101
[Target SDK]: 33
[Min SDK]: 16
[Error Type]: Native
[Crash Time]: 2024-01-09T19:44:30.948
[Stack Trace]:


Build fingerprint: 'google/panther/panther:14/UQ1A.240105.004/11206848:user/release-keys'
Revision: 'MP1.0'
ABI: 'arm64'
Timestamp: 2024-01-09 19:44:30.708770206+0100
Process uptime: 2s
Cmdline: org.liri.liri
pid: 13028, tid: 13065, name: SDLThread >>> org.liri.liri <<<
uid: 10331
tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
Abort message: 'Scudo ERROR: invalid chunk state when deallocating address 0x200007b9fe16d40'
x0 0000000000000000 x1 0000000000003309 x2 0000000000000006 x3 0000007b01f43ff0
x4 64736073721f6a6d x5 64736073721f6a6d x6 64736073721f6a6d x7 7f7f7f7f7f7f7f7f
x8 00000000000000f0 x9 0000007df5464050 x10 0000000000000001 x11 0000007df54adb60
x12 0000007e02f2f020 x13 000000007fffffff x14 000000000062df72 x15 0000011670d17e26
x16 0000007df5519cf8 x17 0000007df54f6470 x18 0000007a99106000 x19 00000000000032e4
x20 0000000000003309 x21 00000000ffffffff x22 0000000000000000 x23 0000000000000018
x24 0000000000000076 x25 b400007b9fb40008 x26 b400007b9fb40b18 x27 b400007c6f54a130
x28 0000007b01f447b0 x29 0000007b01f44070
lr 0000007df549e178 sp 0000007b01f43fd0 pc 0000007df549e1a4 pst 0000000000001000
19 total frames
backtrace:
#00 pc 000000000005c1a4 /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: 19c32900d9d702c303d2b4164fbba76c)
#1 pc 0000000000047d38 /apex/com.android.runtime/lib64/bionic/libc.so (scudo::die()+8) (BuildId: 19c32900d9d702c303d2b4164fbba76c)
#2 pc 0000000000048940 /apex/com.android.runtime/lib64/bionic/libc.so (scudo::ScopedErrorReport::~ScopedErrorReport()+32) (BuildId: 19c32900d9d702c303d2b4164fbba76c)
#3 pc 0000000000048e64 /apex/com.android.runtime/lib64/bionic/libc.so (scudo::reportInvalidChunkState(scudo::AllocatorAction, void*)+116) (BuildId: 19c32900d9d702c303d2b4164fbba76c)
#4 pc 000000000004ac04 /apex/com.android.runtime/lib64/bionic/libc.so (scudo::Allocator<scudo::AndroidConfig, &(scudo_malloc_postinit)>::deallocate(void*, scudo::Chunk::Origin, unsigned long, unsigned long)+308) (BuildId: 19c32900d9d702c303d2b4164fbba76c)
#5 pc 000000000001b598 /data/app/~~hpxlYRQgZHbWb884ERgm8A==/org.liri.liri-r9V4d2M8tKHNSxDkrCxxQw==/lib/arm64/libmain.so (LoadLangue()+300) (BuildId: fd57e61a50ff205a85fc5bc0502110d57448cb2e)
#6 pc 000000000001bc24 /data/app/~~hpxlYRQgZHbWb884ERgm8A==/org.liri.liri-r9V4d2M8tKHNSxDkrCxxQw==/lib/arm64/libmain.so (LoadSprites()+848) (BuildId: fd57e61a50ff205a85fc5bc0502110d57448cb2e)
#7 pc 000000000001692c /data/app/~~hpxlYRQgZHbWb884ERgm8A==/org.liri.liri-r9V4d2M8tKHNSxDkrCxxQw==/lib/arm64/libmain.so (SDL_main+368) (BuildId: fd57e61a50ff205a85fc5bc0502110d57448cb2e)
#8 pc 000000000004b064 /data/app/~~hpxlYRQgZHbWb884ERgm8A==/org.liri.liri-r9V4d2M8tKHNSxDkrCxxQw==/lib/arm64/libSDL2.so (Java_org_libsdl_app_SDLActivity_nativeRunMain+688) (BuildId: e1967546011f346ff228067a16202e89a112c368)
#9 pc 0000000000355830 /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+144) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#10 pc 00000000005b9798 /apex/com.android.art/lib64/libart.so (nterp_helper+152) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#11 pc 000000000000c450 /data/app/~~hpxlYRQgZHbWb884ERgm8A==/org.liri.liri-r9V4d2M8tKHNSxDkrCxxQw==/oat/arm64/base.vdex (org.libsdl.app.SDLMain.run+156)
#12 pc 00000000003f0330 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Thread.run+64)
#13 pc 000000000033eda4 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#14 pc 0000000000239d54 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+144) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#15 pc 000000000053a1b0 /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1600) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#16 pc 0000000000539b60 /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+8) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#17 pc 00000000000c9ccc /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204) (BuildId: 19c32900d9d702c303d2b4164fbba76c)
#18 pc 000000000005db00 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 19c32900d9d702c303d2b4164fbba76c)

fix crash first start android

11-15 07:28:36.745 4746 4746 F DEBUG : Build fingerprint: 'google/sdk_gphone64_x86_64/emu64xa:14/UE1A.230829.030/10921827:userdebug/dev-keys'
11-15 07:28:36.745 4746 4746 F DEBUG : Revision: '0'
11-15 07:28:36.745 4746 4746 F DEBUG : ABI: 'x86_64'
11-15 07:28:36.745 4746 4746 F DEBUG : Timestamp: 2023-11-15 07:28:35.867715500+0000
11-15 07:28:36.746 4746 4746 F DEBUG : Process uptime: 5s
11-15 07:28:36.746 4746 4746 F DEBUG : Cmdline: org.rili.rili
11-15 07:28:36.746 4746 4746 F DEBUG : pid: 4703, tid: 4729, name: SDLThread >>> org.rili.rili <<<
11-15 07:28:36.746 4746 4746 F DEBUG : uid: 10191
11-15 07:28:36.747 4746 4746 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000000
11-15 07:28:36.747 4746 4746 F DEBUG : Cause: null pointer dereference
11-15 07:28:36.747 4746 4746 F DEBUG : rax 0000000000000000 rbx 0000776fffdc90cc rcx 0000000000000007 rdx 0000000000000096
11-15 07:28:36.747 4746 4746 F DEBUG : r8 00007fffec7e1170 r9 00007fffec7e11d0 r10 0000000000012890 r11 0000000000200293
11-15 07:28:36.747 4746 4746 F DEBUG : r12 0000776fffdc9098 r13 000000000000006f r14 0000776fffdc90b0 r15 0000000000000000
11-15 07:28:36.748 4746 4746 F DEBUG : rdi 00007771603e9560 rsi 000000000000002f
11-15 07:28:36.748 4746 4746 F DEBUG : rbp 0000776fffdfac04 rsp 0000776ffef85790 rip 0000776fffd91e78
11-15 07:28:36.748 4746 4746 F DEBUG : 13 total frames
11-15 07:28:36.748 4746 4746 F DEBUG : backtrace:
11-15 07:28:36.749 4746 4746 F DEBUG : #00 pc 0000000000011e78 /data/app/~~4cx3MQIebnVbXxay37bPWA==/org.rili.rili-xcYvB6WmZeyLjB67mvvDWA==/lib/x86_64/libmain.so (Ecran::Efface(e_Sprite)+56) (BuildId: a28cd9aa4888e84522c4df9a46dc1f180dccdbd6)
11-15 07:28:36.749 4746 4746 F DEBUG : #1 pc 00000000000177c3 /data/app/~~4cx3MQIebnVbXxay37bPWA==/org.rili.rili-xcYvB6WmZeyLjB67mvvDWA==/lib/x86_64/libmain.so (Menu::SDLMain_Langue()+531) (BuildId: a28cd9aa4888e84522c4df9a46dc1f180dccdbd6)
11-15 07:28:36.750 4746 4746 F DEBUG : #2 pc 0000000000016bb9 /data/app/~~4cx3MQIebnVbXxay37bPWA==/org.rili.rili-xcYvB6WmZeyLjB67mvvDWA==/lib/x86_64/libmain.so (SDL_main+521) (BuildId: a28cd9aa4888e84522c4df9a46dc1f180dccdbd6)
11-15 07:28:36.750 4746 4746 F DEBUG : #3 pc 000000000004fc46 /data/app/~~4cx3MQIebnVbXxay37bPWA==/org.rili.rili-xcYvB6WmZeyLjB67mvvDWA==/lib/x86_64/libSDL2.so (Java_org_libsdl_app_SDLActivity_nativeRunMain+694) (BuildId: 86e308d3f89549d31159d6d88f2675f66c527b7b)
11-15 07:28:36.750 4746 4746 F DEBUG : #4 pc 0000000000391a4b /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+219) (BuildId: b6dc79e02101ea00827a35a55ab6597a)
11-15 07:28:36.750 4746 4746 F DEBUG : #5 pc 000000000036ec95 /apex/com.android.art/lib64/libart.so (nterp_helper+165) (BuildId: b6dc79e02101ea00827a35a55ab6597a)
11-15 07:28:36.751 4746 4746 F DEBUG : #6 pc 000000000000c474 /data/app/~~4cx3MQIebnVbXxay37bPWA==/org.rili.rili-xcYvB6WmZeyLjB67mvvDWA==/oat/x86_64/base.vdex (org.libsdl.app.SDLMain.run+156)
11-15 07:28:36.751 4746 4746 F DEBUG : #7 pc 0000000000175324 /system/framework/x86_64/boot.oat (java.lang.Thread.run+84) (BuildId: c78b6b6270062f2e659e76e5f8dac6d757f47ca6)
11-15 07:28:36.751 4746 4746 F DEBUG : #8 pc 00000000003784c4 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+756) (BuildId: b6dc79e02101ea00827a35a55ab6597a)
11-15 07:28:36.751 4746 4746 F DEBUG : #9 pc 00000000003c535c /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+204) (BuildId: b6dc79e02101ea00827a35a55ab6597a)
11-15 07:28:36.751 4746 4746 F DEBUG : #10 pc 0000000000853176 /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1510) (BuildId: b6dc79e02101ea00827a35a55ab6597a)
11-15 07:28:36.752 4746 4746 F DEBUG : #11 pc 00000000000cd06a /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+58) (BuildId: fa337969c798946280caa45e2d71a2e7)
11-15 07:28:36.752 4746 4746 F DEBUG : #12 pc 0000000000062d88 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+56) (BuildId: fa337969c798946280caa45e2d71a2e7)

[Bug] No sound after exiting and relaunching

Tried to run Li-Ri on my Android tablet. When I used the builtin exit button and relaunched the game, it had no sound output. But by killing the application and launching manually it works.

Some extra info I think may help:

  • OS: Android 7.0, EMUI 5.0
  • Processor: Snapdragon 435
  • Kernel: 3.18.31-g7d66bf5
    • huawei@ubuntu #2
    • Sun Jul 1 04:23:27 CST 2018

SDL Error on start

Device Info:
Manufacturer: Fairphone
Model: FP5 5G
Android: 13
Kernel: 5.4.219-qgki-g50c59753416a (#1 Thu Nov 23 01:37:02 CST 2023)

Application Info:
Version installed: 3.1.0
Source: F-Droid

When trying to start the application on my device I get the following error: "SDL C/Java Version mismatch (expected 2.28.4, got 2.28.5)

See image:
Screenshot_20240106-140437

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.