Possible bug with Hollywood player for Android
Re: Possible bug with Hollywood player for Android
Player Seems ok, But how can this update modded to APK compiler3 ?!
Christos
Re: Possible bug with Hollywood player for Android
Thank you Andreas. It works like a charm!
Re: Possible bug with Hollywood player for Android
Thank you, Andreas. It works like a charm!
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Possible bug with Hollywood player for Android
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
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
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Possible bug with Hollywood player for Android
Sorry to hear that.
Please try to create a little example and then I can take a look and fix it...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.
Re: Possible bug with Hollywood player for Android
Ok, I'll work on it asap.
Re: Possible bug with Hollywood player for Android
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.
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
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Possible bug with Hollywood player for Android
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
Re: Possible bug with Hollywood player for Android
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.
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.