NateB's Forum Posts

  • Doing a search for Kongregate in the tutorials brings up this as the first hit:

    https://www.scirra.com/tutorials/79/uploading-html5-games-to-kongregate

  • Setting the layer color

    Button -> On clicked ----> Set layer background color
    [/code:2v7vqgpc]
    [quote:2v7vqgpc]Set the background color of a layout. Note if the layer is transparent, setting the background won't change the appearance unless you also make the layer opaque.
    
    
    Setting a tiled background image
    [code:2v7vqgpc]
    Button -> On clicked ----> Load image from URL
    [/code:2v7vqgpc]
    [quote:2v7vqgpc]Load an image from a given URL. It is not shown until the image has finished downloading, and On image URL loaded triggers. Images loaded from different domains are subject to the same cross-domain restrictions as AJAX requests - for more information see the section on cross-domain in the AJAX object. Data URIs can also be passed as an image, e.g. from a canvas snapshot or webcam image.
    
    
    [url]https://www.scirra.com/manual/111/button[/url]
    [url]https://www.scirra.com/manual/125/system-actions[/url]
    [url]https://www.scirra.com/manual/118/tiled-background[/url]
  • Understood. And best of luck with your game, (not sarcasm, I really do wish you luck)

    -NateB

    P.S.

    If in the future you'd like to tack on KB controls, I've seen some twin stick shooters use WASD for the left stick and UpDownLeftRight for the right stick.

  • The question was more if I can expect the player to have one, or if I need to include keyboard- or touch-controls as well.

    No, you cannot expect the player to have a gamepad.

    So if you're interested in a gamepad, there's plenty of cheap ones out there that works great.

    Telling your player to go buy a gamepad in order to play your game will push them to go play a different game, not to go buy a gamepad.

    The point is I'm strongly against having everyone suffer because a few people can't keep up.

    Adding another control scheme doesn't inherently affect a previously implemented control scheme. The gamepad users in no way would need to "suffer" because you did the work to implement keyboard functionality.

    In the end, all you're doing is limiting your audience by not implementing alternate control schemes, nobody is going to buy a gamepad just for a single game no matter how good the game is, and lastly there are some players who absolutely refuse to use gamepads as they prefer the flexibility of the keyboard. I believe that's what we were trying to say.

  • This tutorial has a small quip about it.

    https://www.scirra.com/tutorials/569/easy-ways-to-publish-games#h2a3

  • Browser -> Open URL in new window -> facebook.com/sharer.php?u=http://google.com

    Of course replacing google with the location of your game.

  • Webstorage:

    https://www.scirra.com/tutorials/526/ho ... -savegames

    Comment on the tutorial from Ashley:

    [quote:3tvk08ti] it should work on both iOS and Android - all platforms support WebStorage which is where savegames go (or IndexedDB if supported).

  • If you are looking to have the player not move while on the ground, and is able to modify the direction while in the air:

    Player -> Is Falling
    or
    Player -> is Jumping
       Touch -> Orientation alpha > 30 ----> Player simulate move left
       Touch -> Orientation alpha < -30 ----> Player simulate move right
    [/code:4yjj569z]
    
    If you are looking to have the player not move while on the ground, and is NOT able to modify the direction while in the air:
    [code:4yjj569z]
    Global var jumpDirection = ""
    Section for doing accelerometer jump you already have
       Touch -> Orientation alpha > 30 ----> Set jumpDirection = "left"
       Touch -> Orientation alpha < -30 ----> Set jumpDirection = "right"
    
    Player -> Is Falling
    or
    Player -> is Jumping
       compare jumpDirection is "left" ----> Player simulate move left
       compare jumpDirection is "right" ----> Player simulate move right
    
    X Player -> Is Falling
    X Player -> Is Jumping  ----> set jumpDirection = ""
    [/code:4yjj569z]
    
    If you are looking to have the player able to move while on the ground
    [code:4yjj569z]
       Touch -> Orientation alpha > 30 ----> Player simulate move left
       Touch -> Orientation alpha < -30 ----> Player simulate move right
    [/code:4yjj569z]
    
    You may need to change the 30 and -30 for the leap to be a different value depending on how the Leap handles.  Anyway, good luck, and I hope this helps.
  • I would implement both the gamepad and the keyboard to ensure that someone that doesn't have a gamepad is able to play still.

    Edit:

    Gamepad functions that may be of use to you

    Has gamepads

    On gamepad connected

    On gamepad disconnected

    Source:

    https://www.scirra.com/manual/143/gamepad

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Amazing. Congratz Scirra. To the next Million downloads. Cheers!

  • All in one event

    Global (or instance) variable speedPowerTimer = 0

    Every Tick

    Set speedPowerTimer to clamp(speedPowerTimer - (60*dt), 0 , 99)

    Set Speed to speedPowerTimer > 0 ? 400 : 200

    When you get the power-up, you can set speedPowerTimer to X seconds

    PS: The expression "speedPowerTimer > 0 ? 400 : 200" is a conditional expression.

    Fantastic 7Soul! Go with this

  • Global variable speedPowerTimer = -1
    
    System->on every 1 second
           Compare variable speedPowerTimer > 0: set variable speedPowerTimer = speedPowerTimer - 1
           Compare variable speedPowerTimer = 0: set Max Speed to 300 : set variable speedPowerTimer = speedPowerTimer - 1
    
    [/code:yw4cq77q]
    
    Then add one of the following to the collision event
    
    This one will make it so the duration is always 3 seconds whether or not you get 2 power-ups in a row
    Set variable speedPowerTimer = 3
    
    This one will make it so that the power-ups stack
    Set variable speedPowerTimer = speedPowerTimer + 4
    
    The reason +4 is used is to move it up to 3 from -1.
    The reason -1 was used was to ensure that the  speed wasn't unnecessarily reset every second.
    
    One side effect is that when stacking 2 in a row, instead of going for 6 seconds, the speed is increased for 7 seconds.  
    The workarounds are either a minor performance hit by removing the subtraction from the check to see if speedPowerTimer is equal to zero and setting the value initially to 0, or to add sub events on the collision to check the value of speedPowerTimer, and setting it to 3 if it is -1, else set it to speedPowerTimer + 3.
    
    Another optimization in the future to look at would be using an instance variable on your player so that you could have multiple players or ai using powerups.
    
    Anyway, I hope I didn't ramble on for too long.  I tried looking for a tutorial to help out, but they were primarily concerened with on screen timers.  Good luck with your game.
  • You'll want to bump up the Max Speed instead of the Acceleration.