ranma's Forum Posts

  • nope, it's super easy to preview what is sent via post.

    one way to secure it is to use https (via ssl) or to make it more difficult tu post fake scores using cryptography using 3rd party plugin, if i remember right it's called "cb hash". construct itself does not have md5 calculation implemented so for arcade there's no way to do this.

    hope that helps

    also, this forgotten topic: http://www.scirra.com/forum/md5-maybe_topic54223_page2.html

  • use a local variable then and store floor(ATTACK * 1) + floor(random(1,5)) in it.

  • there is an event for text object: Set Text, you are using it on "dam" and "hp" objects.

    create new text objects and set its text to floor(ATTACK * 1) + floor(random(1,5)) like you do for "dam".

  • you can create a text object and set its text to the same value that you subtracted from HP. give it a fade behavior with fade in 0, wait 1 and fade out 1, destroy after fade checked, and it will fade nicely every time you inflict damage.

  • game will do an alert if it can't find at least one instance in layout, so yes, you must have at least one instance of every sprite created NOT by events. I think a quite good solution would be to create a layout with all game sprites, and never go to that layout if you cannot bare having instances outside standard layouts and destroying them on start :)

    as for onCreated - well create object event triggers on created - that's obvious. already created objects are not created during the game, they are there from the beginning - that's why the oncreated doesnt trigger I think.

    hope that helps

  • Sprite is not on screen?

    Sprite: set platform movement to inactive :)

    try it, but I don't think it will help. mobile performance is generally quite poor.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • or try:

    on start of layout
    for every Sprite
    add local variable old_x and set it to Sprite.X
    add local variable old_y and set it to Sprite.Y
    destroy Sprite
    create Sprite at x = old_x, y = old_y
  • floor is rounding down - it acts like round() but when you have floor(1.9) it rounds down to 1 when round() rounds to 2, while ceil is the opposite it rounds always up, so ceil(1.1) becomes 2. useful with random().

    back to your question, you can simply subtract 10 + something from HP you dont have to limit yourself to a value you can subtract a whole expression like 10 + variable1 * 2 - variable2 from HP.

    or maybe i don't get the real issue here :(

  • if you mean randomly subtract 9 to 11 then:

    subtract ATTACK - 1 + floor(random(3)) from HP

    or if you want 10%:

    subtract ATTACK - floor(ATTACK * 0.1) + floor(random(ATTACK * 0.3)) from HP

  • thanks Mipey , this is great idea and should be working - would never think of it this way

  • In Construct Classic there was this great functionality that is missing from C2 which for I would be grateful to the end of my days.

    Remember "On loop" ? - You could assign a loop named "create cloud" and run it 100 times on start of layout and 10 times every 5 seconds. It acted like a function but without arguments and is currently impossible to implement without 3rd party plugins.

    If it's not much of a hussle pretty please add this functionality to C2 I run a "beg you" loop 100 times.

    Cheers!

  • Status:

    I have a game that communicates with server from time to time via ajax.

    I need the game to know all in every tick, what is the server time.

    What I tried:

    1) I tried sending server time to game, set a global variable "now" to this value, and in every tick add dt to "now" with no luck, because when game goes out of focus, this will break (c2 pauses)

    2) I tried messing with wallclocktime, sent server time to game, set a global variable "server_time" to this value minus current wallclocktime on receive and every tick set a "now" global variable to "server_time" + wallclocktime. My logic tells me this _should_ work, but it doesnt, every time I get new current time from server, "now" goes back around 10 - 20 seconds. why?

    any ideas would be greatly appreciated.

  • appmobi will not make your app run faster unless you use their direct canvas which is not yet supported on android. the only way is to use the cocoon option, but this one is still in beta with no way to export to a real android app yet. that's just the (sad) way it is for now.

  • if you can use external plugins use moveto behavior

    if you can't, well you're stuck with lerp

  • Secondly, about the games. I don't see any big problems keeping Construct 2 games from running on Ouya that aren't already being solved for exporting to Android. Evilot is a game targeting Ouya's launch that is using HTML5. Eventually an Ouya exporter for Construct 2 before the end of 2013 would be nice and I would experiment with it.

    http://www.syrenaica.com/evilot-the-first-chilean-game-on-kickstarter-aims-for-ouya/

    Well, first of all, great and very informative post, LobsterSundew

    Also, as WebGL for android 4.0 was released some time ago as open source, I don't see a reason for construct games to run great on ouya if they just take some time to implement it into their android browser. Then a simple phonegap export would be enough to create an ouya game in c2.