Closed jetrotal closed 6 months ago
Honestly I do not see the usecase for this. You could just distribute your Windows game with a shortcut that passes --project-path mygame.zip
to the Player similiar to how some other games do it (the ones by vgperson all have such a launcher).
This is Windows specific because on Linux you usually distribute a desktop file with the launch options and on macOS you would simply put it inside the application (which is actually a folder).
If you really want a standalone mode
for Windows I would suggest an approach that embeds the game into the exe, e.g. create a new resource entry EASYRPG
and under this entry a resource GAME
that contains the game as e.g. as a ZIP. (Note: As this is windows specific it could use the Windows API instead of our hacky EXEReader)
A problem with Windows shortcuts is, they are harder than expected to create them containing relative paths. If absolute, a usual breaking case happens when the user moves the game folder somewhere else. "Portable" apps are quite common as well, and drive letters change often.
Exe embedding is nice but they trigger low quality antivirus heuristics due to the hacky PE stuff that makes it work.
Despite this is mostly a Windows specific solution, this patch looks simple enough and harmless behaviour on other platforms compared to implement Windows specific code.
okay, fine. Lets add this. But I will do some small UX improvements before: :)
Relaxed it a bit and made it work from the logo scene: The player will now autorun a game if it is the only game in the directory and ends on .easyrpg
. Does not matter if folder or (zip) archive.
Testing this fake 3D game with the memory leak PR, looks like it went from unplayable to very laggy...
Link to it:
https://biloumaster.fr/download/[BConcept]-Vaisseau3D.zip
It has a version optimized for easyRPG too, but it may be interesting to check the rm2k3 one.
With very very agressive caching (never delete it) I can even reach 166 FPS (refresh rate of my display) but it needs 10 GB of RAM xD. Though the blend effect will still frame drop because it causes a cache miss.
Guess the issue is similiar to Aedemphia: Lots of tone blit effects that are not efficient to do on 32 bit graphics without GPU support compared to the simple palette editing 8 bit can do.
If a game filename contains
![image](https://github.com/EasyRPG/Player/assets/45118493/d428c9b2-107d-48d4-8e58-4f8ab27d05f2)
gamedata.easyrpg
and there's only one game in player's folder, the player will autorun it.It would be better if I could skip the game_browser scene or hide the screen with default system. But this is working fine.