Pode's Forum Posts

  • Now, I just need to find a quick & clever way to know when all the tiles are ordred in the right order...

    If somebody has an idea...

  • I'm trying to make a Fifteen-like game (also known as Mystic Square and things like that).

    The link for the project : http://dl.dropbox.com/u/1412774/fifteenGameNormal.capx. That one uses a linear presentation for the tiles. Here's one which needs the Random Array (at least the first version of the plugin...) : http://dl.dropbox.com/u/1412774/fifteenGameRandom.capx

    I've recreated the simple barrel mechanism to switch together two values (here two tiles of the game). What's bothering me is that the player can make "jumps" across the board. I need a simple mechanism to prevent players to switch tiles that aren't nearby. Any idea ?

    Edit : at the very moment I hit the "Post" button, I realised what's the solution.

    So I updated the two files. They are know working as intended. Sorry everybody...

  • The random stuff is clever, then !

    Thinking about that, removing the x/y offsetting and putting the sprite directly on the mouse position also works...

  • Okay ! I didin't think of that solution. It's a bit dirty, but quick. Thanks ;)

  • Yann: I really like your implementation ?

    I have a few questions about it, though. When you click on a Sprite, you are picking a random instance. Why ? Doesn't break the idea of finding the Sprite underneath the mouse cursor ?

    You also are using an offset for x and y when referring to "Self". In that context, which object is adressed by "Self" ?

  • Just to point a quick problem : you seems to have changed the namespace or something between the two iterations. I made a project with the first version you posted, and we trying to reopen it with the new version, I have a text box saying that there's a name problem with the plugin.

    I opened the project XML file, and saw that the first version was declared as something like :

            <object-type name="RandomArray">

                <plugin id="rL" name="Random Array" />

            </object-type>

    and the new version declares something like :

            <object-type name="RandomArray">

                <plugin id="rA" name="Random Array" />

            </object-type>

    Just editing the change inside the XML doesn't allows Construct to load the project. I reverted back to the old version for the moment, and when I have the time, I'm going to copy/paste in a new project, with the new version, but it's a little problem for the moment...

  • Aw. Logical, but I don't know why I didn't set that...

    Anyway, here's the new version : http://dl.dropbox.com/u/1412774/exclusiveClickTest2.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • By the way, a problem can arise sometimes when your browser is a bit slow : the mouse cursor can go outside the desired target between two ticks, so the target doesn't fllow the mouse anymore...

  • To TELLES0808 (& others) : I give here the link of an example I made to illustrate my way of doing it. I don't know if it's the "right" way of doing it (or even an efficient one !).

    Exclusive mouse click attach : http://dl.dropbox.com/u/1412774/exclusiveClickTest.capx (should work by using touch instead of mouse also).

  • There's a behavior I find myself always reimplementing : pressing on an object (or touching it), attaching it to the mouse cursor or the finger, and releasing it when I let go the mouse button or the finger.

    Everytime I seems to implement it a different way, never too happy with the results and the slight variations.

    One of the biggest problem I encounter is the right way to make it "exclusive" (I don't want to attach every instance of the same object when I pass on it when I'm already attached to one).

    Does that kind of thing merits its own behavior ?

    Is there a quick and efficient way to do that every time ? (something that doesn't break on border cases...)

  • Very useful ! It's going to help to have a better integration between the C2 playground and the surrounding website, when trying to make something a bit different from a game, but close to an "app".

  • Okay... I think I'm at the very root of the problem : between the keyboard and the chair...

    I realised that I was testing only on Firefox. When using extension slike Flashgot, some configuration can download attached media by default, preventing them to execute inside the page's environment. So in fact, that was what was preventing Firefox to finish the execution of the JS script...

    Sorry for the bothering.

  • Sorry for the delay, I got sidetracked testing other things on the Construct2 platform...

    Here's the file, with the same problem in the revision 65 of Construct2. It's a tiny example, mimicking what I'm trying to do in my project...

    http://db.tt/7bcZXLyB

  • Thanks ! Exactly what I needed for one of my project.

  • : thanks for the quick answer.

    Do you know if the phonegap implementation allows for reliable audio playback ? Because for the moment, when I test code on the ipad, the execution of audio loops and SFX are very unreliable (i.e. it starts after some random delay, or not at all...)