Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Logos at Startup #3096

Merged
merged 7 commits into from
Oct 21, 2023
Merged

Conversation

jetrotal
Copy link
Contributor

@jetrotal jetrotal commented Sep 25, 2023

To add custom logos, you need to add image files named LOGO1, LOGO2, LOGO3, LOGOn to the Font folder.
It will always load the next logo file, while sequential files exist in the Font folder.

You can skip having LOGO0, it loads default easyRPG logo when LOGO0 doesn't exists.
EasyRPG logo is always displayed at bootup, to avoid a blank screen while loading a heavy game.

Some reference files for testing:

LOGO1
LOGO2
LOGO3

You must add images named LOGO0, LOGO1, LOGO2, LOGOn to the Font folder.
it will stop showing logos whenever it fails to find a file.

Update scene_logo.cpp
@Mimigris
Copy link

From a quick test:

  • I'm unable to replace the LOGO0 on my side, it is completely ignored and not read at all
  • Holding Shift while the other logos are displayed will wait until you no longer hold it to go to the next scene, as a leftover of the version details present on the default scene, I'm not sure if it should be kept?
  • The v0.8 line without the details is not erased when pressing Shift, so it is then weirdly displayed (look at v0.8)
    screenshot_2

Didn't tested more outside of that, but that seems promising 👍

src/scene_logo.cpp Outdated Show resolved Hide resolved
@Ghabry
Copy link
Member

Ghabry commented Sep 26, 2023

Also for discussion: Is Font\LogoN a good location for this? Are there better folder suggestions? Seperate Logo folder?

- Add custom functions preloadLogos() and DetectGame() to keep it easy to read and maintain.

- DetectGame() only happens after loading the Default EasyRPG logo. This happens to avoid a blank screen while loading game assets, as suggested by @Ghabry

- Disable the shift key behavior when not at LOGO0.

- Fix webplayer issue by adding the prefix ` Scene_Logo::` to the new functions.

------------------------

I guess this solves the issues? Lemme know if you guys need anything else.
Better for reading and organization.
@jetrotal jetrotal changed the title Jetrotal - Custom Logos on Startup Custom Logos at Startup Sep 26, 2023
Copy link
Member

@Ghabry Ghabry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rewrote the logo loading logic to always only load one logo and I got rid of global state. The remaining technique (such as invoking another logo scene) remained the same.

Is now much faster when loading 200 logos :P. There is no upper limit.

@jetrotal
Copy link
Contributor Author

I rewrote the logo loading logic to always only load one logo and I got rid of global state.

Thanks! When I use the flag --new-game with the 200+ logo collection, it gets stuck at the logos screen for some time.

Could a skip after the first be added in this specific case?

@Ghabry
Copy link
Member

Ghabry commented Oct 21, 2023

Right. The same will happen when running in test game mode. Will add a fix.

The engine objects are created by then so this is safe
@Ghabry
Copy link
Member

Ghabry commented Oct 21, 2023

The logos are now correctly skipped when TestPlay or BattleTest are used. --new-game will only skip it in combination with one of them (like before).

@MesaBlack
Copy link

how about a custom video at startup?

@Mimigris
Copy link

how about a custom video at startup?

At this point, you could probably skip the title screen in your game and manually create a video on your side when starting the game, it would probably be better to do it this way.

@Ghabry Ghabry added this to the 0.8.1 milestone Oct 21, 2023
@Ghabry Ghabry merged commit 75d3515 into EasyRPG:master Oct 21, 2023
4 checks passed
@jetrotal jetrotal deleted the custom-logo branch August 4, 2024 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants