Request a Tutorial

This forum is currently in read-only mode.
0 favourites
From the Asset Store
Carousel Animation, make carousel of you image gallery or anything
  • GRR security error and I have to type this post again...

    The RTS behavior has 10x10 cell size, and my enemies are 5px large. This is problematic as they would not be ale to fit through 1px wide gaps.

    This also wouldn't work because the enemies take 5px steps after a set time. Having them glide towards the player in a non-fixed fashion would make it look awkward and unfitting with the rest of the game.

    In this case, yes, I do want to reinvent it, or at least build a shoddy wheel made of wood and dress it up and paint it, making it look new. <img src="smileys/smiley1.gif" border="0" align="middle" />

  • After reading the tutorial you linked, my first suggestion would be to raise the size of your ennemies to 10X10 px and use the rts behavior. This will be the quickest, less painful way of doing things. ^^

    Else, if you really want to handle A* as construct's events...

    For starter, be sure that the hotspot is in plain center of your sprites.

    Your depart will be your ennemy sprite, the target is your player sprite.

    So ennemy.X and ennemy.Y are your first node.

    Save its position to an array that will act as your open list (prepare also an array that will be your closed list and another array in which you may save F,G and H)

    To find adjacent nodes you add/substract 5 to your actual node's X and Y to find the center point of your next node.

    From there, follow the steps of the other tutorial.

    You'll have to set and test F, G and H's values (as described in the tut).

    To adapat the manhattan method you'll have to determine its position in relation with the current node (is it on its right? on its left ? up ? down ?...) and apply the correct calculation.

    Using the example in the tutorial target node is right ahead from depart node.

    So the calculation would be: H = ((Target.X - Ennemy.X) / 5) * 10

    (The distance between the X is "reduced" to the number of nodes between Target and ennemy(/5) and then the cost is added (*10). 5 here is your node width.)

    The calcul would be different for each direction.

    Lets pretend the target is one case above than in the tutorial.

    Calcul would be : (((Target.X - Ennemy.X) / 5) * 10) + (((Ennemy.Y - Target.Y)/5)*10)

    Then make sure that 5 pixels around your next node's center there is no object making it "unwalkable". Save its status to the correct array (open or closed list).

    Depending on your level of confidence and ability with Construct this might be hard to realize.

    If it too much, by all means, stick to RTS behavior. This will be the simplest and most effective way to do.

    This answer is by no mean comprehensive but it should helps you get started if you really want to handle codewise.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I was wondering if someone could make a tutorial showing how to make a top view map? I want my gameplay to pan out somewhat like the Civilization games. So a world flattened out that I can scroll around however I want. I want to see if it is possible to have maps randomly generated so I don't have to have premade maps?

  • I am almost certain there have been tutorials for mini-maps and map scrolling a la Civ games. I recommend checking out Jamesx's Tutorial List topic, as nearly anything and everything worth mentioning is in there.

    For Construct Classic, btw.

    EDIT:

    I'd also like to reiterate my request for a comprehensive How to Make a High-Score Table tutorial, preferably with arrays. :D

  • Yeah I just found one. I had happened to over look it because it was not named about creating maps.

  • Hi,

    I would like to request a tutorial on how to use a script and insert it.

    Tnk1000

  • Hello everybody,

    Is there a tutorial about making quiz-trivia games (with random questions etc.)

    Thanks :)

  • I was hoping someone could maybe do a quick tutorial on collision masks? Every time I try to use them, things always go wrong (For instance, I can't delete them for some reason), and having per pixel collision, as you can imagine, is usually problematic.

  • I know, it isn't a complex tutorial, but have you already seen this video?

  • Yeah, and I also saw his other video for copying a collision mask to all animations, which did help me out and answered some of my questions since making the request.

    Just to give an example of what's giving me trouble: Let's say you want your enemy to have a melee weapon which deals damage, and that to kill the enemy you jump on their head like in a traditional platformer. I would need two collision masks, but I'm just not sure how that whole deal works.

  • You might want to try using separate sprite objects for collision masks. For an enemy or your player, use a yellow box. This is your collision mask. Now have the sprite mask always set to 0,0 of the box. Tada - perfect collisions. The built-in collision masks are only good for platforms, bullets, collectables, etc.

    If your enemy uses a melee weapon, then do this..Add the enemy and all of his animations. Then, make a clone of the enemy. Now, erase the enemy from one object and leave the weapon, then erase the weapon and leave the enemy on the other. Now, always set the weapon position and angle to the enemy's. Tada- The weapon is now perfectly in-sync with the enemy and has it's own pixel-perfect collision mask.

  • Sorry to resurrect an old thread, but it seemed like the place to ask - Any chance anyone here can point me to an Endless-Runner type tutorial for construct 2 if it exists?

    *randomly generated levels (floor/platform tiles)

    *movement of tiles speedup over time (or event)

    or if these exists already in separate parts/tutes (cos i've been looking and cant find them).

    Thanks much for any help :)

  • silvereon I've not seen a tutorial on it, but I have seen someone make one before.

    Here's a quick example I threw together: RunningGame

  • Now I feel like an idiot, I just realised I posted this on a Classic Construct thread. I cant open cap files on Construct 2 can I?

    Thanks heaps for the example anyways, i'm still going to hang on to that one.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)