pr0fess0r's Forum Posts

  • 6 posts
  • Thanks guys

  • Hi Guys

    I have a game where I send a ping back to a server using AJAX every 10 seconds.

    When the game is not running, I dont want this to happen. I'm using the visibility of the "Start Game" button to check this.

    Once the "Every 10 Seconds" is triggered, how do I stop it once the game is over?

    This is the Event

    http://imgur.com/hzAyc

    Is the condition that the textStartGame is not visible only required to start the Every X Seconds timer, or is it checked each time the timer is run? How do I stop the timer?

    Cheers

    Lucas

  • Thanks :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey guys

    I've worked through the Breakout clone tutorial project and am now playing with adding sounds to the game.

    I have a bounce sound used when the ball hits the paddle. It seems to be playing more than once when the ball hits the paddle - i.e. so often it's almost a buzzing sound. I suspect this is because the ball hitting the paddle isn't a discrete event, because it's triggered on overlap:

    http://imgur.com/IKKGo

    Is there a way to make the sound only play once? Maybe some sort of delay to restrict how soon after the sound plays that it can play again?

    Cheers

    Lucas

  • Hey EyeHawk, I need to use RC4 as well for a project, because it's reversible encryption and there are versions for PHP and ActionScript which makes it very handy for cross platform games.

    It would be great if you could add RC4 functionality to your plugin. I could send you the JS RC4 encrypt/decrypt functions.

    The output is binary, which is a hassle if you need to use it in a URL for example, so what I normally do in PHP is use PHP's pack() and unpack() functions to convert it to hex

    For example

    unpack("H*0", rc4crypt::encrypt($password, $string));

    returns something like

    319d4323fed9d324436fc1d137884a92cc00aefc0eeccf0f01da95ee1b7087aac69c11250b7540a509b7705b3409c8b4178edbbce5

    Which is a lot easier to use.

    Then at the other end you'd use PHP's pack() function to return it to it's original form:

    pack("H*", $encryptedstring);

    I think there's a pack() function for JavaScript but no unpack() function. The source of PHP's unpack() function is available so it should be straightforward to convert to JS. So if you were to add RC4 encryption you could also add options to convert to and from hex.

    Cheers

    Lucas

  • Hi Guys

    How would I embed a YouTube video into an app? Ideally I want to be able to click a button and have a YouTube video play, then return back to the layout with the button afterwards. is this possible?

    Cheers

    Lucas

  • 6 posts