Share My Creation Roulette Zero

Discussion in 'Share Your Creations' started by danijel, Nov 12, 2018.

  1. danijel

    danijel Member Licensed User

    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
     
  2. ilan

    ilan Expert Licensed 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
     
    Johan Hormaza likes this.
  3. danijel

    danijel Member Licensed 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.


     
  4. ilan

    ilan Expert Licensed User

    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.
     
    Peter Simpson likes this.
  5. danijel

    danijel Member Licensed 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

    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?
     
  6. ilan

    ilan Expert Licensed 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.
     
    Peter Simpson likes this.
  7. danijel

    danijel Member Licensed 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:
     
  8. ilan

    ilan Expert Licensed User

    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?
     
  9. danijel

    danijel Member Licensed User

    This is manifest:
    Code:
    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)
    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)
     
  10. Erel

    Erel Administrator Staff Member Licensed User

    Why have you added this line:

    SetActivityAttribute(Main, android:configChanges, "orientation|screenSize")

    ?
     
  11. ilan

    ilan Expert Licensed User

    for what are you using this?
     
  12. ilan

    ilan Expert Licensed User

  13. danijel

    danijel Member Licensed User

    Just to prevent the activity from recreating. Is something wrong with that?

    Thx @ilan , I'll investigate it.
     
  14. Erel

    Erel Administrator Staff Member Licensed User

    Yes. The activity size will not be correct.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice