DarkViGaCi's Forum Posts

  • How I can make level like this:

    I tried to use mesh deformation

    https://www.dropbox.com/scl/fi/o156htkng7vacwkjs1b0y/Mesh.c3p

    The main difficulty is in making smooth transitions. O know about "lerp" expression, but I don't know how to apply this. Does anyone have any ideas how to create a level like on the first picture?

  • It doesn't matter, but the topology of the map you created with this wrap-around in x and y is a torus, not a sphere. In a sphere if you move north from any point you will come to the same point sooner or later (the north pole).

    You're very welcome for the explanation! My understanding of geometry is quite basic.

    I would like to see rivers as hex-side terrain. These hex-sides could also be walls or doors in a dungeon setting.

    Do you mean something like that?

  • UPDATE

    Added the mechanics of infinity map panning, similar to the game Civilization. Imagine your map as a planet. As we know, planets have a spherical shape. You can continuously move in any direction and never reach the edge of map.

    How it works:

    • I do not use "scroll to" action for movement. Instead, I move the objects themselves.
    • When the objects go beyond the screen, I move them to new position.

    A more complex task is to adapt the pathfinding to an infinity map. The cells of the array can't be moved as easily as the hex sprites. It would have been an unnecessary complication. So, I came up with simpler solution. Now, the starting position for pathfinding is always at the center of the array.

    When a player clicks on a unit, the hexes adjust their virtual coordinates (instance variables) as if the unit were in the center of the map. Thank to this approach, I didn't have to make significant changes to the pathfinding (which is based on 2D array).

    Try on Arcade

    Download template

  • I thank all of you for the feedback! I've been studying Construct 2/3 for over 6 years. Very often I heard the opinion that this engine is only good for casual games and is not suitable for anything more. My goal is to break this stereotype. So I will continue working on the template. Also, I promise that this template will be free of charge always.

  • I am very inspired by the fact that the post above has received so many likes. So I decided to continue developing this template and add new mechanics to it.

    So, let's say we want to create a turn-based game. Let's add numerical a variable "MP" (movement points) to the unit and set its value to 3. This way, the unit can move 3 hexes in one turn.

    Now let's add new types of hexes: forest and mountains. Let's make it so that a unit can move through all hexes, but each hex will have a different movement cost. For example, the "forest" hexes has a cost of 4 points, the "mountain" costs 6 points, and the regular hexes costs 3 points. Also, we'll set the unit's movement points to 9. And the "water" hexes will remain impassable for the unit.

    Now let's add a line to indicate the movement boundary for the unit. It's very simple to do this. We need to check the values of neighboring cells in the array, and if the value of a neighboring cell is greater then the unit's movement points, then we set a boundary line between two hexes.

    Like this post if you like my template. Perhaps I will continue to develop this example and add new mechanics to it ;)

    Try on Arcade

    Download this template

  • After looking more closely I was wondering how you could assign a movement cost to each hex? Like swamp takes two counts of move vs one for open areas.

    It is a very good start.

    yours

    winkr7

    I have implemented this mechanics in another turn-based example (sorry for bad English there). But in that case, I use a square grid of tiles. So, I will update hex-grid template to add movement cost mechanics in few days :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've created the template with a hex pathfinding algorithm. It's based on 2D Array object. I don't use any additional plugin and behavior (except "MoveTo").

    HOW IT WORKS

    1. At the beginning, an array is filled with numbers using the "Wave Algorithm" method. This means propagating "waves" around neighboring tiles until the destination point is reached.
    2. Then, a revers path is found using a simple subtruction of the index from the current value through a loop.

    Basically I used a wave algorithm to fill the array. The main feature is how to determinate neighboring hexes:

    Try this on Arcade

    Download template

    Tagged:

  • Added some minor improvements to the logic of group movements for units. Just one condition "For each (ordered)" and one action which start the "wait" timer makes units movement more natural.

    BEFORE

    AFTER

  • Another way to make switch languages system

    It's works with only 2 events

    Download Example (*.c3p)

  • Do it this way

  • Just one event

  • Example. Press "X" to add "else" condition.

  • Events in Construct 3 are executed sequentially, from top to bottom. In your case, first the variable sets the value to "French", and then (in the event below) it changes the value to "English" again.

    Use the "else" condition.

  • #1. Procedural World Generation

    Try on Arcade

    Download *.c3p

  • I think the best way to grow your Construct skills is to make a clone of another game. This is not for earning money, but only for educational purposes. I want to create a turn-based strategy game like Civilization with Construct 3 in the future. It's a really difficult task, and first, I should start by creating something simpler. So, I've decided to make a clone of a very special game.

    Revival is a Civilization-like strategy game published on the J2ME platform for old mobile devices over 15 years ago. I spent hundreds and hundreds of hours playing this game when I was a teenager. It's a great honor for me to recreate this game using Construct 3.

    This project will be published on Scirra Arcade. I will also be sharing the source code. I hope this will help you find some ideas that you can use in your own projects. An important detail is that I will not be using any JavaScript code or any third-party plugins or behaviors for my project.

    Wish me luck ;)