jeffige's Recent Forum Activity

  • So i got the high score localstorage logic down, and I've been trying to learn about saving top 10 high scores. Reading and watching tutorials on the subject, most are over 2 years old, some are using the webstorage and others are using the localstorage.

    The posts/tutorials i've seen either have deadlinks or only describe saving a single high score, while either using webstorage or local.

    Which is best to use for a local top 10 high score and eventually a leaderboard on google play?

    Thanks for any help with this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the replies.

    It took a lot of trial and error but i got it...finally - angle(X2_135.X, X2_135.Y, LayoutWidth/2, LayoutHeight/2)

    Although i read posts, tutorials, watch videos, it takes me a bit of time to comprehend things. That's just how my brain works. Sorry i'm not as quick as some of you guys.

    Again, thanks for the help. Very much appreciated.

  • Check your image point on every single frame. Sometimes when i insert an animation, mostly explosions, the image point is off by a few pixels. Even if you use the image point > bottom or whatever, it can be off because of your frame.

    Try slowing down the whole animation, 1 or 2 seconds, and then slow down each frame also. Run it. Watch the animation. I've spent a bit of time trying to get it exactly right at times.

    Save your project before you attempt this, but not during. So you can go back to the original in case things get too far off.

  • I'm trying to get an object to spawn at the player's position (got that) and move toward the windows center regardless of the players co-ordinates at the time the object spawns.

    I've tried many variations of bullet - set angle of motion > windowwidth/2, windowheight/2 but C2 won't let me use any of those.

    Thank you for any input on this matter.

  • calebbennetts I can't use container since the parent disk is destroyed with the star. May have to add a few events for each disk/star.

  • calebbennetts nimos100

    Thanks for all the help. At the start i was just planning on the AllPlats and Stars giving a general score, but since decided to try and add combos.

    This is why i think i need to pick the size of the disk.

    And i forgot all about containers. Gonna try and get the logic right for the ComboMultiplier.

    Thank you again for the help. Much appreciated.

  • On 2nd thought, the star does matter. If there was no star then the player would only have to come into contact with the disk to score. With the star the player needs to make it to the center of the disk.

    Besides, people love collecting things.

  • You can get the pinned UID when you use the pin behaviour.

    For instant:

    > On start of layout
          Pin object_1 to object 2
    
    On key pressed 'A'
         text1.text = str(object_1.Pin.pinnedUID)  <-- (Will set Text1.text to the UID of object2, you can use this to pick the correct disc and then get the correct size/score)
    
    [/code:32ofe0x5]
    

    You can see how i the stars and disks overlap.

    There isn't a key press. The game will use tilt for the gameplay and On Tap Object - Play - that will take the user to the main layout. This is how i have the pin event right now:

    I just made 3 more families - LgDisk, MdDisk and SmDisk. So i should be able to change and add 2 more events for - System - For each LgDisk/ MdzDisk/ SmDisk.

    And forgive me nimos100, i'm not understanding your text1.text = str(object_1.Pin.pinnedUID)

    Can i trigger that with - LgDisk > On Created?

    Thank you for the replies.

  • How I would do this depends on how much the star matters. Can you overlap a disc without a star being on it for less points? If each disc always has a star pinned to it then the star doesn't really matter does it and is only a visual thing, it's just the disc that matters and you award points based on the disc type being overlapped.

    Damn it - you just made my brain hurt. I never even thought of it like that. Always the wise one.

  • I have 3 different size disks - small, medium and large. On start of layout a blue star is created for each and every disk, then pinned to that disk. When the player rolls onto a disk and is overlapping a star it adds to score. But since these different sized disks can overlap each other, as if they were on different layers (they are on the same layer) how can i differentiate what star is pinned to what size disk?

    Example - large disk with star is worth 1000 points, medium = 2000, small = 3000.

    If there are 2 large disks, one on top of another, and a small disk underneath those two large disks, and the player rolls onto the top most large disk, he should score 5000 points. Large =1000 + large = 1000 + small = 3000.

    I know i'm going to need a variable, but i can't seem to get this right, since . . . well . . . i don't know what the hell i'm doing.

    Any help is immensely appreciated.

  • Sup with that Thanks for the reply

    No, the layout is static. It's a bit taller than the actual window, this gives the disks time to be created out of view and move in their direction(s). I almost had the expression right, but they were still being created closer towards the ViewportRight than ViewportLeft. After about 6hrs of messing with it, I decided to go back to the original plan.

    They are now created off screen, just above and below the largest viewport, and 32 pixels away from the window on the X axis.

    Tested on 3 different phones and 1 tablet. Although the tablet does have the biggest viewport, the disks are about a ball and a half width away from the edges on the X axis, and on the phones they are only a few pixels away. This i don't mind too much. It looks even and uniform.

    Again, thanks for the reply.

  • On the start of layout - blue circles should be created at random locations within the viewport and move either at 90 or 180.

    The green circles should be created just outside the viewport on the Y axis (top/bottom) and randomly along the viewport on the X axis and move either at 90 or 180 (circles move in direction of arrows).

    I've tried many different ways - viewportleft/right, windowwith, separate, together, X/Y....

    But when i run the layout, some of the randomly created green circles are outside the edge of the viewport along the X axis, as shown in the image below.

    This is the problem i'm having difficulties trying to solve. The green circles should be created within the viewport no matter the width of the phones screen.

    If anyone knows a solution, it would be greatly appreciated. My gamedev has come to a halt trying to solve this major issue.

jeffige's avatar

jeffige

Member since 28 Oct, 2012

None one is following jeffige yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies