Possible bug with Hollywood player for Android

Report any Hollywood bugs here
g0blin
Posts: 74
Joined: Tue Oct 04, 2011 9:06 am

Possible bug with Hollywood player for Android

Post by g0blin » Sat Mar 16, 2019 6:15 pm

Hello everyone,

I have to report a possible bug for the Android player which occurred, as far as I am concerned, with version 8.0 of the player.

After the update applets started not to work as I coded them:
- images on screen are correctly displayed, and the picture correctly fills the entire device screen. Yet ...
- hot spots are totally off. I coded a tech demo for a game where you have to press varius icons on screen to activate different features, but it all behaves like it was minimized in the bottom left corner.

Since this new game uses layers (which I am studing right now) I originally believed that it was due to my miscoding, but after I re-compiled "The Secret of Middle City" with Hollywood Supremacy and the APK Compiler 3.0 even Middle City shows the same errors and it is not working properly anymore (it was perfectly fine up to version 7.1).

This misbehavior only occurs on the smartphone, while everything is perfectly fine on my Win PC.

Did anyone else experienced the same problems?

User avatar
airsoftsoftwair
Posts: 3159
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Possible bug with Hollywood player for Android

Post by airsoftsoftwair » Sat Mar 16, 2019 6:26 pm

Can you post a very short example program which demonstrates the issue?

g0blin
Posts: 74
Joined: Tue Oct 04, 2011 9:06 am

Re: Possible bug with Hollywood player for Android

Post by g0blin » Sun Mar 17, 2019 2:42 pm

I guess it would be much easier if I send you the code so you can see it in action. It's probably more efficient than my words.

Anyway, here is the display declaration.

Code: Select all

@DISPLAY 1, {X=#CENTER, Y=#CENTER, Width=1280, Height=720, HidePointer=True, HideTitleBar=True,
     Sizeable=True, ScaleMode=#SCALEMODE_AUTO, FitScale = True, KeepProportions = True, Orientation=#ORIENTATION_LANDSCAPE}
As said, everything work fine on a PC, but on the smatphone it behaves like the entire screen was actually contained inside the yellow box of the picture.
Image

Left and right column icons, plus the MENU ones on top-center are working just fine on PC: on this Android screenshot, the screen is correctly displayed but only if you press inside the yellow box something will happen. Of course it is all screwed up (the game behaviour, that is :) )

I'll send you a mail asap.

g0blin
Posts: 74
Joined: Tue Oct 04, 2011 9:06 am

Re: Possible bug with Hollywood player for Android

Post by g0blin » Sun Mar 17, 2019 3:05 pm

Mail sent.

User avatar
airsoftsoftwair
Posts: 3159
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Possible bug with Hollywood player for Android

Post by airsoftsoftwair » Sun Mar 17, 2019 5:57 pm

That's much too big for me to examine. Please cut it down to a minimal sample that demonstrates the issue...

g0blin
Posts: 74
Joined: Tue Oct 04, 2011 9:06 am

Re: Possible bug with Hollywood player for Android

Post by g0blin » Sun Mar 17, 2019 6:01 pm

I didn't mean for you to examine the entire code, but only to give you the possibility to experience the difference between the old code and the new compiled ones. Sorry for the misunderstanding.

I'll try to put up a sample code and I'll get back to you asap.

Kind regards
Gianluca

g0blin
Posts: 74
Joined: Tue Oct 04, 2011 9:06 am

Re: Possible bug with Hollywood player for Android

Post by g0blin » Mon Mar 18, 2019 4:19 pm

Andreas,

as requested, here is a quick and dirty code that demonstrates what I am talking about.
The code simply draws a yellow box in the center of the screen. Every time you click on the box its color changes, cycling between yellow and red.
Nothing happens if you click outside of the box.

It works fine on my desktop, but on my Android 8 smartphone it misbehaves. Color change happens only if you click on the lower left portion on screen (the code orients the screen on Landscape).

I hope this helps.

Code: Select all

@DISPLAY 1, {X=#CENTER, Y=#CENTER, Width=1280, Height=720, HidePointer=True, HideTitleBar=True,
     Sizeable=True, ScaleMode=#SCALEMODE_AUTO, FitScale = True, KeepProportions = True, Orientation=#ORIENTATION_LANDSCAPE}


Function p_Update_input()
;store previous mouse state and read the new one
	laststate=currentstate
	currentstate=IsLeftMouse()
EndFunction

Function p_MouseState()
; compare present and previous mouse state to determine action to take. 
; Events are triggered only if mouse button was just release (mouse state=3) 
	If laststate=True
		If currentstate=True
			state=4		;still pressed
		Else
			state=3		;just released
		EndIf
	Else
		If currentstate=True
			state=2		;just pressed
		Else
			state=1		;still released
		EndIf
	EndIf
EndFunction 

SetFillStyle(#FILLCOLOR)
Box(#CENTER, #CENTER, 200, 200, #YELLOW)
color=0

Repeat
	laststate=currentstate=0 ; flush mouse buffer
	p_Update_input()
	p_MouseState() 
	If MouseX()>540 And MouseX()<740 And MouseY()>260 And MouseY()<460 And state=3
		If color=0
			SetFillStyle(#FILLCOLOR)
			Box(#CENTER, #CENTER, 200, 200, #RED)
			color=1
		Else	
			SetFillStyle(#FILLCOLOR)
			Box(#CENTER, #CENTER, 200, 200, #YELLOW)
			color=0 
		EndIf 
	EndIf 
Forever 


User avatar
airsoftsoftwair
Posts: 3159
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Possible bug with Hollywood player for Android

Post by airsoftsoftwair » Mon Mar 18, 2019 9:51 pm

Hmm, strange, works fine here. What's the build date of the Hollywood Player you're using?

g0blin
Posts: 74
Joined: Tue Oct 04, 2011 9:06 am

Re: Possible bug with Hollywood player for Android

Post by g0blin » Tue Mar 19, 2019 8:05 am

It's 02.03.19

g0blin
Posts: 74
Joined: Tue Oct 04, 2011 9:06 am

Re: Possible bug with Hollywood player for Android

Post by g0blin » Tue Mar 19, 2019 3:17 pm

I just tried to uninstall the player from the smartphone, cancel every Hollywood-related directory in the SD Card, reboot the device and reinstall Hollywood from scratch but it still does not work. I also tried to chance the @display settings from #SCALEMODE_AUTO to #SCALEMODE_LAYER as reported on another thread on the forum, but with no success.

Just to keep you informed.

Post Reply