Guizmus's Recent Forum Activity

  • You can "encode" it (I don't remember the right word right now) if you want to hide it, but basically yes, the code is accessible. Un-readable, but there.

    If you were interested on how thing were implemented, you can go in the C2 installation repertory, eporter, html5 and you'll see all the plugins and behaviors. Check the SDK manual if you want to make a new plugin then.

  • Only problem that I see to develop this to the end is content. You'll need the rights for the songs/videos you want to subtitle like this, and you'll need to time a LOT of sentences...

  • So your question is how to start ? What end to tackle first ?

    Maybe first, create a card sprite, will the whole deck as the animation. Then try to make a function that would spawn a single card, random or specific (specific frame to show ?).

    Next step is spawning the deck at the bottom.

    Then handle the click on a single card (the movement you want) to the top space.

    The IP verification is more to be handled on the PHP side of the site.

    Then maybe, start by doing some tutorials, it will maybe help understands how the layers of making your game could be set.

  • You should post a capx using dropbox maybe, it can help when you need assistance.

    In your case, you select all the enemies and make the die. It could come from numerous cases... and a simple instruction could correct it. Without the code though, the only general solution I see is, in the event where you remove 1 from health, add a sub event where the trigger is "enemy.health<= 0" and the action is the animation you put later.

    Or if you want to keep the animation somewhere else (because multiple ways to die), you change the trigger with a Function call, and call that same function on the sub event I described before.

    As you are starting with C2, all this may make no sense, so I strongly suggest, as did LittleStain, that you post a .capx showing the problem the simplest way possible...

  • Yes and no. The map size isn't the problem. The problem is the number of points on the map and the trigger "on every tick". My code wasn't optimized, I put it like this for explaining. You'll make it faster by updating the map every 0.1 second for example, or 0.2. Also, you could hide the points of the enemies whose icons are outside of the map if you have a big layout. There are numerous ways to optimize this for a bigger map, but it would be a little harder to read/write.

    I suggest you don't bother too much about it for now. Optimization should come later in your game, when it starts to be a problem, or when you are shipping it to another support than PC. When this comes, take a look at my signature ^^

  • AllanR Nice ! I spent a lot more time than I thought on this one (lots of little bugs I couldn't see at first ^^) and it's nice to see it expended so much and so fast ! I don't know what Mark was aiming for, but your additions are niiiiice !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, so there are multiple problems here. (I managed to download/test it).

    First, name your sprites. I renamed them, it's a lot more simple to read.

    Second, you don't use the pathfinding behavior right. First "Find path", then in another event, you use the trigger "on path found", and then you move along path. I changed it in the code.

    Using this correctly, and using image points where I want the character to go exactly (in the **middle** of the top and bottom sides), it works more like you wanted it.

    Another problem there were was the top of the ladder not being solid, and we would fall through as the platform behavior was resumed. You may have did it so the pathfinding works, but I put again the solid behavior, witch I deactivated, as well as the collisions, in the editor. I activate them as soon as you click on the first ladder. The pathfinding won't be bothered by the solid, as it has already calculated its obstacle map.

    Here is the link.

    Feel free to ask if anything isn't clear :)

  • Could it be anything in the index.html that pulls the focus somehow ?

    Ho, and by the way, last time I used C2 inside a webpage, I prefered to use directly the canvas and start the runtime with onload :

    <div id="c2canvasdiv" width="990" height="207">
       <canvas id="c2canvas" width="990" height="207">
          <div id="c2canvas_off"></div>
       </canvas>
    </div>
    <script type="text/javascript"> 
       jQuery(document).ready(function () {
          cr_createRuntime("c2canvas");
       });
    </script>

    If it is the index that pulls the focus somehow, this would solve the problem.

  • Saving in an array is a valid solution here. Don't go making a huge level and putting everything inside, you'll most likely diminish the performances, depending on how you deal with the items outside of layout. About this subject, it is you that decides how the items outside a layout should behave. In a case like this one (having a large layout and enemies everywhere on the map), the best you can do (of my knowledge) is "unload" the enemies outside a "game box", a large sprite, larger than the screen by something like 30%. Loading/unloading something is roughly disabling its behaviors/collisions or reactivating those, so a useless object doesn't weight too much in the game logic. You won't have problem with the display performance (something outside of view isn't drawn) but the game logic won't be happy if you have thousands of objects at the same time, all active.

    Back to your case now. If you can store a level state in an array, then do it. You'll benefit from the built-in save functions, and can unload all objects from a not-currently-useful level.

  • If you're a newbie in C2, let me give you this example.

    This is a simple minimap, a button to spawn enemies, and the code is commented to explain everything.

    If you have any question, feel free to ask.

    I didn't put in the families to simplify everything. You can now just duplicate everything for your "energy" object, or for the player too.

  • Hey Tarkion !

    The problem is quite simple : don't use "On touch" on a button. Go in the Button triggers, and chose "On Clicked" from the button object, not from the touch object. Buttons are specific in this.

  • Ok, so I implemented what I said, but not the click on a lyric part.

    dropbox.com/s/urqpxou3knaye0j/songfollow.capx

    You'll have to adjust the 2 constants I added (one is for the height of a sentence, the over is an offset to position your reader right). I only configured the time (approximately) for the first 4 lyrics. You can add more by completing the array. If there is an implementation question, just ask :) (PS it may still be uploading, as the song is quite heavy)

Guizmus's avatar

Guizmus

Member since 26 Mar, 2013

None one is following Guizmus yet!

Trophy Case

  • 11-Year Club
  • x4
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies