GDSag3's Forum Posts

  • Ok, phew, done it. The ball hits the same height all the time. What I need to figure out now is how to introduce more balls at the exact right time, so each ball can potentially be hit by the player every second. No longer, no sooner. Should I do this by simply using wait triggers or should this be a little more complex and require timers?

    First I have to time how long it takes the ball to drop from the top of the screen to the bottom. I have set up a time variable to do this but my issue is it only counts in seconds (right now, with the set gravity it takes two secs to drop from the top to the bottom and four seconds to bounce from players hand, reach the top of the screen, and fall bck down). I need more detail than that so how do I use the time variable to count milliseconds as well?

  • Right, so, using what you suggested I now have the ball falling to the ground from up above when created, it bounces off the players hand and I've got the angle (Set vx to BallSprite1.vx-120).... I just need to work on some form of gravity. Now, do I do that with the vx and vy or should I just use bullet gravity for bringing it back to earth?

  • Er, you've lost me. Under what action should I use for those variables?

  • Ok, I've resorted to using objects as a trigger combined with wait. So, when score is 2 and the first ball makes contact with a ceiling object, the second ball is created 2 seconds later. Using this method, with three balls in play, each one is within reach of the player and there doesn't seem to be any unfair situations.

    However, this isn't exact enough because when any ball is hit by the player, say at the side of the hand rather than on top, that thrown ball then does not get thrown as high as when it hits on top of the player hand. So eventually that will create a situation where each ball is no longer a second apart when returning to the ground.

    Right now, thrown balls is done via bullet behavior and I have it where if the ball hits the right hand, its angle arcs to the left. And vice versa. This is fine. What I have for movement is just basic bullet speed and this is what is preventing every ball from reaching the same height every time (speed of 700 when bouncing from the top of player hand will go higher than speed of 700 when bouncing from the side of the player hand). So, is there another way to make sure each ball hits an exact ceiling before gravity brings it back down again? With this, I should be able to maintain each ball always being a second apart.

  • Just to talk on this more. I already have it setup where each ball follows its own arc depending on where it was hit by the players hand. So what I need to do is control the speed of each ball when a new ball comes into play so the new ball can fit in to the cycle (almost like traffic). Except, I don't think merely altering the acceleration and speed on each ball will be enough as I suspect that will still eventually lead to an unfair situation. Rather, acceleration and speed of any ball actively changes when being compared to the other balls, to create an order. I'm not too sure. I know what I want it's just I'm not sure what would be the best way to go about it.

  • Think of a juggling game with multiple balls in play. ALL the balls have to be kept in play and the player has to move to each falling ball in order to throw it. So I'm trying to figure out a way to control when each ball returns to the ground, giving the player a chance to hit each one. Otherwise, eventually it ends up where two balls return to the ground at the same time and it becomes impossible to hit both.

    So, what I am thinking is:

    Game Starts = One ball.

    Time it takes for thrown ball to return = 4 seconds

    Score is 4 = New ball is spawned (two balls)

    Each ball is 2 seconds apart from each other when travelling the air and in returning to ground

    Score is 8 = New ball is spawned (three balls)

    Each ball is 1.35 seconds apart from each other when travelling the air and in returning to ground

    Score is 16 = New ball is spawned (four balls)

    Each ball is 1 second apart from each other when travelling the air and in returning to ground

    Something like that. And that distance is always kept in play, no matter what. That way it does not become unfair and the player has a chance to reach each falling ball (if they're good enough). Am I on the right start point in thinking that maybe distance travelled could be used for this?

  • Basically, the player sprite can charge a jump left or right by holding down the left or right arrow keys. The problem I have is by holding down the right key and then pressing the left key, it interrupts the charging I was initiating with the right key. And vice versa. How would I go about avoiding this? Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Now, change the values to get the sort of jump you like (in height or length) and how long it takes to charge, etc.

    postimg.org/image/ot02u68z7/full

  • Oh hello!

    Yes. It is not the most elegant of solutions but it does indeed work. Give me a sec, I will post it.

  • ...

    ..

    .

    .

    .

    Why do I always go about things in the most complicated way? I had set up this really long winded way to deal with it but was having issues with it. Thank you, that did the trick.

  • First off, I have a charged jump forward mechanic where the length and height of the jump is determined by how long a button is held. My issue is at the end of these jumps. I want to completely avoid sliding of the player object after it jumped and has landed back on the floor, so I crank up the deceleration. Thing is, this now has the knock on effect where the 100% charged jump now only covers as much ground in length as the 50% charged jump, due to the 100% jump going higher and thus deceleration having more of an impact on its movement forward. So, how can I work around this? Is there another way I can stop sliding without resorting to deceleration? Thanks

  • Ok, I've attempted the above and it seems to work. What I'm stuck on now is making sure the motion of the object after it has jumped ends instantly when the object comes into contact with the ground again. Right now, the object is sliding (I'm using physics behaviour). I need to make sure that each of the seven jumps (activated depending on how long the key is held for) covers the same distance if repeated. Can anyone help?

    Just another thing to ask, would physics behaviour be apt for this? If I want the exact same distance covered if the player repeats jump #3 (hold button for half a second) then is there another behaviour that would give me that exactness?

  • I had stuttering using a Galaxy Tab 2 7.0 at first boot up but later plays had it running fine, so your game works well on an old tablet at least. I suspect the stuttering had to do with the google account prompt and when connecting to Google Play.

    The design is deceptively simple. You end up thinking "Yeah, that's not going to be hard" but when it speeds up the tiniest amount it has you panicking. I agree on the coins. Having to drag coins to the chest takes you away from the core gameplay. Now, that might have been the original intention (having to balance when to swap dragon heads and when to go for the coins) but when it speeds up, you end up not bothering with the coins because no matter when you go for it, it's gonna mess up your current play. You could have a tap to collect OR you could have a flick to collect (flick it towards the chest).

    I don't agree with a life system, though. The sense of progression should come when you're adept enough to push on further and being able to purchase multiple lives sort of undermines that. A one time use lifesaver powerup would be a good compromise, though. Something that appears every so often and you have to drag it to the Dragon heads to activate it. For example... Fire Breath. When activated, if the wrong food gets eaten instead of a game over the dragon head that is about to eat the wrong food burns it to a cinder. One time use and doesn't stack (gotta make sure another powerup doesn't appear when it is currently activated).

  • Ok, I have an idea I'm going to try out but I'm stuck on one thing.

    Basically, I set a global variable known as Charge and have it where if the "C" key is held down a 1 is added to Charge every 0.2 seconds. The max for that charge will be 7, which would be reached in 1.4 seconds (I may change these timings depending on what feels good in terms of mechanics). Then, when "C" key is released, whatever value the Charge variable was at will be stored. What I do then is use that value to determine the length of the jump. So, if the value was between 0 and 1, a short hop to the right will be executed (x angle of motion). If over 1 but under 2, a slightly lengthier jump to the right is executed. And so on, with over 2 but under 3, etc, etc.

    Does that look good? If so, and this is where I'm stuck, how do I store the value of a global variable when the key is released?

  • Spring Ninja's spring mechanics is perhaps the best way to describe what I am aiming for. So, depending on how long a button is held down for, upon release, the object jumps at a certain angle to cover a certain amount of distance. So, a simple tap would just make the object hop slightly to the side (almost like a sidestep) whereas holding down for a second would charge up for a medium jump and any longer would charge up a larger leap. Again, the input only charges the jump. The actual jump action does not activate until the player has released the input. I was looking into Platform behaviour for this but now I'm thinking maybe Bullet behaviour would be more fitting (angle of motion and all).