Yann's Forum Posts

  • Yeah basically, something secure should check if :

    • the game sent your score (and not by any other way)
    • you already sent your score (avoid flood)

    Because even I can code an evil application that will call "http://myurl.som/myscoringscript.php?user=plop&score=999999999" a thousand time :D

    The question is, how to be sure that it is your game that sent the values. And not an evil application or just a user entering the url in his web browser?

    Maybe you could generate a shared value between your server and the game like a random sessionID inside the game itself.

    But I think even that can be hacked looking at javascript values...

    So yeah, no real good solution yet.

  • Dunno there's no premade formula for animation. It depends on the pace and style of your game.

    • First make a prototype without animation to have a good feeling of pacing. In short, make it fun with only rectangles.
    • And then try attaching some animated sprite to your rectangle and set it to be invisible. Then you can test some timing with roughly sketched key poses and some in-between maybe.
    • Once your are satisfied, make the finished/polished final animations (:
  • Maybe you could stop its movement when it overlap the mouse.

  • In maxum's capx, he stores every tick the position of the ball, at the end of the event sheet. So if at the next tick, the position of the ball is the same (ie : the ball doesn't move anymore) oldX and oldY will equal actual X and Y position. He use these condition to check if the ball stopped.

    But there's an easier way to do that

    System: Ball.Physics.VelocityX = 0
    System: Ball.Physics.VelocityY = 0
        -> Ball: Destroy
        -> System : set OKToDrop = 1[/code:14mmb2q5]
    Also, while I'm at it, I would say that the OKToDrop variable is useless, you just have to check the Ball.Count value (which returns how many ball there's on the scene)
    Also he could replace event 2 by
    [code:14mmb2q5]System: Every tick
        -> Balldroper: Set X to Clamp(Mouse.X,25,300)
        -> Balldroper: Set Y to 18[/code:14mmb2q5]
    
    Well in short that would look like that
    [url=https://app.box.com/s/q7tkryhuc3m2arf34htv]maxumsEnhancedLuckyHit.capx[/url]
  • Log positions and spawn a sprite that will be driven by these positions.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have other plugins in mind... (:

  • I added another array in your test project there's no problem. The array appears in the 'Object types' folder of the project as well as in the 'GameLayout' objects panel.

    So you won't have any issue if you create new arrays.

    If it's not as I described (creating a new layout and deleting the former one) I don't really know why you ended up as you did.

  • If you add an array directly in your layout there shouldn't be any issue.

    What you did is probably create an array in layout1 creating layout2 and deleting layout1

    As you can't add an Array from the object list to a layout yet (because it's not a drawn object).

    I think Ash already knows this one but it won't hurt to report it. It's weird that it's still there I think.

  • I bet it's on Chrome. It's a known bug on Chrome's side.

  • There's an easy way to debug that.

    • rename the .capx to .zip
    • extract /Layouts/GameLayout.xml
    • open it
    • replace :<nonworld-instances />by
        <nonworld-instances>
            <instance type="MyArray">
                <properties>
                    <width>10</width>
                    <height>1</height>
                    <depth>1</depth>
                </properties>
            </instance>
        </nonworld-instances>

    - Save

    • Put this file back in the zip
    • Rename the zip into .capx
    • Open it and you should see you Array object in your GameLayout.

    And Merry Construct

  • whaleRip.capx

    (you really want to make the same game? just buy it and play it )

  • Well you can also just destroy the brick sprite and spawn some particles. Nobody will check if your "flew through the air" physics is mathematically right (:

  • Databases aren't the only way. PHP knows how to write in files for instance.

    Long a go I wrote a website on a server which ran PHP but no database (it was a free host). So I had to come up with my own system.

    Files work, but yeah... If you know the path of the files you can read them. Hmm unless you write outside of the root folder of your website... I didn't have such right.

  • r0j0sWater.capx

    Array are 0-based on C2