Show splash screen while app is loading?

Discuss any general programming issues here
User avatar
midwan
Posts: 74
Joined: Sun Jun 19, 2016 1:15 pm
Location: Sweden

Show splash screen while app is loading?

Post by midwan »

I have written an app that uses RapaGUI, but it takes several seconds from the moment you double-click it until the GUI shows up (3 seconds in WinUAE, more than double that on real Amigas).

I would like to show a splash screen during that time, to at least indicate that it's doing something. I have a picture I could use for this, so I tried using the BGPIC line to have it load it:

Code: Select all

@BGPIC 1, "assets/my_logo.png", {LoadAlpha = True}
...but it doesn't seem to work as I expected. It's never actually seen when starting up, perhaps because it's showing it at the same time the GUI pops up as well (?)

Am I missing something here, or is this not possible at all?
p-OS
Posts: 167
Joined: Mon Nov 01, 2010 11:56 pm

Re: Show splash screen while app is loading?

Post by p-OS »

As soon as RapaGui is used, Hollywood Displays are only visible inside Rapagui Hollywood class. Tbus open a RapaGui window for the Splash Screen
User avatar
jPV
Posts: 600
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: Show splash screen while app is loading?

Post by jPV »

When you use the RapaGUI plugin, it doesn't auto-open the default Hollywood display but keeps it hidden. You can open it with the OpenDisplay(1), so put that somewhere in the beginning of the script (before creating the GUI) and you'll get a splash window without using RapaGUI.

BTW. IIRC it isn't enough to use Hidden=False in @DISPLAY... I don't know why. OpenDisplay() is probably the only way.

But is it Hollywood itself that takes the time or GUI creating? If the most of the time goes for Hollywood to launch, then you can't get a splash window that quickly. But if GUI takes some time too, then it's better than nothing.

I don't know if it would be possible for Andreas to make some splash window feature in Hollywood... which would first start some kind of Hollywood Player launcher, which would show a user defined picture, and after that launch the actual player etc. Similar to Wayfarer and Iris on MorphOS. Probably would need quite big changes how it works now.
User avatar
midwan
Posts: 74
Joined: Sun Jun 19, 2016 1:15 pm
Location: Sweden

Re: Show splash screen while app is loading?

Post by midwan »

Thanks for the replies, using OpenDisplay works. I'd prefer more control over the type of window it opens, but it's good enough for now I guess.

The GUI takes no time at all on other platforms, but on AmigaOS 3.x it takes a few seconds to show up, probably due to MUI as well. Therefore it's good to show something on the screen, to let the user know that the app is still alive... ;-)
User avatar
midwan
Posts: 74
Joined: Sun Jun 19, 2016 1:15 pm
Location: Sweden

Re: Show splash screen while app is loading?

Post by midwan »

Coming back to this, as I noticed a problem...

If I use OpenDisplay(), then the app will no longer work on native (non-RTG) modes, on AmigaOS. It throws an error (unable to open window) and aborts.
Removing OpenDisplay() again, removes that problem and it will launch on a PAL screen as well.

That's rather unfortunate, as I'd prefer not to have a hard requirement for RTG, for this system app I'm preparing. It should be possible to use on any screen mode.

I guess the Hollywood Display requires RTG no matter what?
User avatar
jPV
Posts: 600
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: Show splash screen while app is loading?

Post by jPV »

midwan wrote: Fri Mar 17, 2023 10:59 pm Thanks for the replies, using OpenDisplay works. I'd prefer more control over the type of window it opens, but it's good enough for now I guess.
You can define pretty much everything for that window with the @DISPLAY preprocessor. Set its size and position, make it borderless etc.

midwan wrote: Sat Mar 18, 2023 11:46 am If I use OpenDisplay(), then the app will no longer work on native (non-RTG) modes, on AmigaOS. It throws an error (unable to open window) and aborts.
Maybe if you'd use the Plananarama plugin for AmigaOS3?

Something like this (not tested):

Code: Select all

@IF #HW_AMIGAOS3
    @REQUIRE "plananarama"
@ENDIF 
Although I don't know how it looks on RTG then... or could it be detected somehow... no time to test now :)
User avatar
midwan
Posts: 74
Joined: Sun Jun 19, 2016 1:15 pm
Location: Sweden

Re: Show splash screen while app is loading?

Post by midwan »

I tried adding the Plananarama plugin, just to test this out:

Code: Select all

@IF #HW_AMIGAOS3
    @REQUIRE "plananarama", {Link = True}
@ENDIF 
But it fails to build for me, and I can't figure out why:
This program requires plananarama.hwp!
The "plananarama.hwp" file is in the expected location, under

Code: Select all

Hollywood\LinkerPlugins\m68k-amigaos
(building this on Windows), together with the other plugins I'm using (hURL and RapaGUI), but it doesn't seem to find it.
I tried removing the Link = True option as well, but it still failed the same way.

Is something special about this plugin? :?
plouf
Posts: 462
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: Show splash screen while app is loading?

Post by plouf »

Plananarama is a special case .can only be done (currently) only when compiling under amiga os68k version

As explained
https://forums.hollywood-mal.com/viewt ... 01#p18001
Christos
User avatar
midwan
Posts: 74
Joined: Sun Jun 19, 2016 1:15 pm
Location: Sweden

Re: Show splash screen while app is loading?

Post by midwan »

plouf wrote: Mon Mar 20, 2023 7:07 pm Plananarama is a special case .can only be done (currently) only when compiling under amiga os68k version

As explained
https://forums.hollywood-mal.com/viewt ... 01#p18001
Ah, thanks - that explains the situation at least. :)
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Show splash screen while app is loading?

Post by airsoftsoftwair »

plouf wrote: Mon Mar 20, 2023 7:07 pm The "plananarama.hwp" file is in the expected location, under

Code: Select all

Hollywood\LinkerPlugins\m68k-amigaos
(building this on Windows), together with the other plugins I'm using (hURL and RapaGUI), but it doesn't seem to find it.
I tried removing the Link = True option as well, but it still failed the same way.
Is this on Hollywood 10 or an older version? On Hollywood 10 this should work.
Post Reply