Possible bug with Hollywood player for Android

Report any Hollywood bugs here
plouf
Posts: 72
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: Possible bug with Hollywood player for Android

Post by plouf » Mon May 13, 2019 8:23 pm

Player Seems ok, But how can this update modded to APK compiler3 ?!

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

Re: Possible bug with Hollywood player for Android

Post by g0blin » Tue May 14, 2019 2:49 pm

Thank you Andreas. It works like a charm!

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

Re: Possible bug with Hollywood player for Android

Post by g0blin » Tue May 14, 2019 2:50 pm

Thank you, Andreas. It works like a charm!

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

Re: Possible bug with Hollywood player for Android

Post by airsoftsoftwair » Wed May 15, 2019 9:35 pm

plouf wrote:
Mon May 13, 2019 8:23 pm
Player Seems ok, But how can this update modded to APK compiler3 ?!
I'll release an update that contains those fixes for the APK Compiler soon...

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

Re: Possible bug with Hollywood player for Android

Post by g0blin » Wed Jul 10, 2019 11:25 am

Good morning Andreas,

with reference to my last post claiming the persistance of a possible bug, I did perform a few tests with a minimal code. As a matter of fact, it does seem to be that the bug is finally solved (thank you for that), however more complex code (like the infamous Middle City) keeps having a strange behaviour on my Android device, with not-precise "button mapping" to the left/right edges of the screen.

My best guess is that the problem could be related to the screen overstretch: the game has a screen resolution of 816x551, which is absolutely non-standard. This is due to how the graphics were conceived 15 years ago, so there is nothing to do about it, expecially after Stefano (the creator) sadly passed away 3 months ago. On Android such graphics is streched to a resolution of 1280x720, and that is maybe the problem.

Anyway, your code works fine for today's applications, so I guess I will use a work-around for the game by increasing the size of the hot-spots.

Thanks for your ongoing support.

Have a nice day
Gianluca

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

Re: Possible bug with Hollywood player for Android

Post by airsoftsoftwair » Thu Jul 11, 2019 11:04 am

g0blin wrote:
Wed Jul 10, 2019 11:25 am
Stefano (the creator) sadly passed away 3 months ago.
Sorry to hear that.
g0blin wrote:
Wed Jul 10, 2019 11:25 am
with reference to my last post claiming the persistance of a possible bug, I did perform a few tests with a minimal code. As a matter of fact, it does seem to be that the bug is finally solved (thank you for that), however more complex code (like the infamous Middle City) keeps having a strange behaviour on my Android device, with not-precise "button mapping" to the left/right edges of the screen.
Please try to create a little example and then I can take a look and fix it...

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

Re: Possible bug with Hollywood player for Android

Post by g0blin » Thu Jul 11, 2019 3:57 pm

Ok, I'll work on it asap.

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

Re: Possible bug with Hollywood player for Android

Post by g0blin » Wed Jul 17, 2019 9:34 am

Good morning Andreas, and I apologize for keeping you waiting.

Please find attached the code you requested. It is a mod of the one I originally published. I basically used a smaller screen size (816x551) and then forced it to overstretch to the current device resolution (1280x720). You may notice that the hotspot is a little offset to the right of the box, since pressing directly over the box won't cause a color change. Instead, a touch on the right of the box will make the change happen. If you wonder why the heck I displayed the box starting from x-coordinate 27 is to mimic the exact Middle City behaviour, where icons where inside a decorative frame.

I hope this helps.

Code: Select all

@DISPLAY 1, {X=#CENTER, Y=#CENTER, Width=816, Height=551, 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(27, #CENTER, 50, 50, #YELLOW)
color=0

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

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

Re: Possible bug with Hollywood player for Android

Post by airsoftsoftwair » Mon Jul 22, 2019 6:10 pm

Sorry, I don't know what should be the problem here. Your program behaves in exactly the same way on desktop and on Android. I have added some code to show the hotspot rectangle in blue. Both on Android and on desktop systems the red/yellow rectangle only changes its color when the mouse click or the touch happens inside the blue rectangle.

Code: Select all

@DISPLAY 1, {X=#CENTER, Y=#CENTER, Width=816, Height=551, 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(27, #CENTER, 50, 50, #YELLOW)
SetFillStyle(#FILLNONE)
Box(27, 260, 50, 200, #BLUE)
color=0

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

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

Re: Possible bug with Hollywood player for Android

Post by g0blin » Tue Jul 23, 2019 10:17 am

I don't know what to answer. On my Samsung7 my code misbehaves: when in Orientation_Landscape, the color don't change if you directly press on the square button; it only does if you click to its right.
But as I said in a previous post, just don't bother: game resolution was way off-standard, and now it doesn't matter anymore ...

Thanks for your time and have a good day.

Post Reply