How do I predetermine my results regardless of resolution?

0 favourites
  • 7 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • Hi guys, now imagine that I have a really simple spinning wheel, and when a button is clicked, it generates an int(random(1,8), which randomizes the number between 1-8, and if 1 is selected, it'll stop at "1", and if the random number is 4, it'll stop at "4". Currently I'm just setting the rotate speed like this:

    This is the image of the wheel:

    The problem is: When I'm spinning the wheel on different devices, (Tested across 3 different screen sized mobile phone) the arrow always points at a different place. Is it possible for the results to be fixed across all screen sizes? If so, can someone provide an example for me or point me in the right direction? Thanks!

  • Did you see the demo I posted in your other topic?

    dropbox.com/s/urehb4tsgeq816j/WheelOfFortune_Predictable.c3p

    You can tell the wheel to spin to exactly the chosen number, and the result will be the same on any device.

  • Did you see the demo I posted in your other topic?

    https://www.dropbox.com/s/urehb4tsgeq816j/WheelOfFortune_Predictable.c3p?dl=0

    You can tell the wheel to spin to exactly the chosen number, and the result will be the same on any device.

    I did, thanks I think I'm going to use build my components off your project. Thanks for the guide, will be playing around with it!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Did you see the demo I posted in your other topic?

    https://www.dropbox.com/s/urehb4tsgeq816j/WheelOfFortune_Predictable.c3p?dl=0

    You can tell the wheel to spin to exactly the chosen number, and the result will be the same on any device.

    Would you mind explaining how you are calculating where the sector lands? Now assuming instead of a 18 pie wheel, I only have a 8 pie wheel, which part of the code would I be playing around with? I don't really understand how tween works hence I'm ultra lost at the bottom part of the code.

  • Would you mind explaining how you are calculating where the sector lands?

    I am not calculating where it lands, I am telling the wheel where to land. It makes 5 full spins + the angle required to land on a specific number.

    You can change the number of pies in SectorCount variable.

  • > Would you mind explaining how you are calculating where the sector lands?

    I am not calculating where it lands, I am telling the wheel where to land. It makes 5 full spins + the angle required to land on a specific number.

    You can change the number of pies in SectorCount variable.

    That explains alot, thanks I think I finally figured it out! as 360*5 = 1800 + the angle of the number it lands on.

    Edit: If I were to change the indicator to the top like so:

    Which part of the code would I be modifying for it to start at "50"? As currently, once I click the start button, 50 goes to the right side before it starts spinning.

    Edit again: Nevermind, just realized rotating the wheel itself doesn't actually change it in the animations editor.

  • Yeah, if you need the pin to be at the top, change the expression to this:

    1800 + (winningSector*(360/(sectorCount))) - 90

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)