Share My Creation Roulette Zero

Roulette Zero is European Style Roulette Simulator.
Wheel animation done with LGDX library.

Download link:
Google Play - Roulette Zero

I'll be glad to hear from you any suggestion for improvement.

001.png 002.jpg 003.jpg 004.jpg 005.jpg 006.jpg
 

ilan

Expert
Licensed User
Longtime User
Really nice game 5 stars from me.

2 things i would recommend u.

1. The graphics are not centred on my phone.

2. You should consider to add a welcome screen and the aftere hitting the "go to table" button open the game screen.

Screenshot_20181114-110110-888x432.jpg
 

danijel

Active Member
Licensed User
Longtime User
Thank you very much. I really appreciate it.
  1. Logic behind centering:
    Everything was calculated based on 100%x & 100%y.
    First I determinate
    LineWidth as int=1%y
    SquareSize as int = f(LineWidth, 100%x, 100%y) 'best fitting size
    PanelBoard.Width = 15 * Linewidth + 14 * SquareSize
    PanelBoard.Height = 6 * LineWidth + 5 * SquareSize
    PanelBoard.Left = 50%x-PanelBoard.Width/2
    Board is drawn with Canvas and as I see y-centering is good with same logic
    (There is a place for an ad that has obviously not been loaded).
    I tried with many aspect ratios on simulator and math for fitting and centering is good.
    I think NavBar causes problems and i am not sure how to resole them without testing with that phone.
    Do you have any idea what went wrong?
  2. Thats a good point I will certainly add.


 

ilan

Expert
Licensed User
Longtime User
Thank you very much. I really appreciate it.
  1. Logic behind centering:
    Everything was calculated based on 100%x & 100%y.
    First I determinate
    LineWidth as int=1%y
    SquareSize as int = f(LineWidth, 100%x, 100%y) 'best fitting size
    PanelBoard.Width = 15 * Linewidth + 14 * SquareSize
    PanelBoard.Height = 6 * LineWidth + 5 * SquareSize
    PanelBoard.Left = 50%x-PanelBoard.Width/2
    Board is drawn with Canvas and as I see y-centering is good with same logic
    (There is a place for an ad that has obviously not been loaded).
    I tried with many aspect ratios on simulator and math for fitting and centering is good.
    I think NavBar causes problems and i am not sure how to resole them without testing with that phone.
    Do you have any idea what went wrong?
  2. Thats a good point I will certainly add.


i am sure there is an issue in your calculations. but why are you using simple views like canvas and also use libgdx?
why not use only libgdxand draw everything using libgdx? or use only canvas. the rotating wheel should also work well using only canvas.

anyway it is hard to tell why it is not centred i (we) will need to have a look at the code and also what means that linewidth and squaresize?

why not just use 100%x and 100%y??

if you want i can help you with that but i will need more information about the code.
 

danijel

Active Member
Licensed User
Longtime User
Hey @ilan , I found Samsung G S8 to test it.
Results:

First run
FirstRun.jpg


On First run I see board is not centered.
On second run board was centered and I tried to uninstall and install again and everything was centered!?

I also played with gamelauncher (with witch I'm not familiar) and try to run in full screen and with and without navbar buttons and I was not able to repeat not centered scenario.


SecondRun1.jpg


SecondRun2.jpg


i am sure there is an issue in your calculations. but why are you using simple views like canvas and also use libgdx?
why not use only libgdxand draw everything using libgdx? or use only canvas. the rotating wheel should also work well using only canvas.

So calculations are good but I think that gamelauncher causes problems on first run or something.
I started all game with simple views and canvas but rotating wheel was not so smooth, so i just implement libgdx for rotating.

LineWidth and SquareSize is explained here:

expl.png


In short, I am using this so I can create unique best fitting board for every possible screen ratio. (I do not stretch any image for board. Its drawn from scratch)
Can you try run it again and see is it any different, or look at that gamelauncher options?
 

ilan

Expert
Licensed User
Longtime User
starting the app again without doing anything indeed fixes the problem. although you need to remember that it takes only 2 seconds to remove an app so if the user eperience such a bug he will immidiatly remove your app and not wait for the second start.
 

danijel

Active Member
Licensed User
Longtime User
I completely agree with you.
For days I am thinking about how it is possible and it's not clear to me.
I mean, the program is the same for both the first and the second run and still a different result.
What could be causing this :confused:
 

ilan

Expert
Licensed User
Longtime User
I completely agree with you.
For days I am thinking about how it is possible and it's not clear to me.
I mean, the program is the same for both the first and the second run and still a different result.
What could be causing this :confused:

it is hard to tell without seeing the code.
maybe something wrong in your manifest? are you storing anything related to screensize in your code?
 

danijel

Active Member
Licensed User
Longtime User
maybe something wrong in your manifest?
This is manifest:
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="26"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.DarkTheme)
SetActivityAttribute(Main, android:configChanges, "orientation|screenSize")
AddManifestText(<uses-feature android:glEsVersion="0x00020000" android:required="true"/>)

CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAdMob.FirebaseAds)
are you storing anything related to screensize in your code?
No, everything is drawn from scratch on every run.

BTW, this unusual positioning occurs only on the Samsung Galaxy S8 and only on first run (from tested 5-6 cell phones)
 

danijel

Active Member
Licensed User
Longtime User
Why have you added this line:
SetActivityAttribute(Main, android:configChanges, "orientation|screenSize")
?
for what are you using this?
Just to prevent the activity from recreating. Is something wrong with that?


Thx @ilan , I'll investigate it.
 

Similar Threads

Replies
1
Views
944
  • Article
Share My Creation Treeview
Replies
15
Views
12K
Top