Turn based strategy system

[=;206485]
It should be pretty easy to alter the grid to work with a Z plane, especially if you only need 1 of them. You could even use Navmesh for the ground as usual, and then have special transitions to the air grid where A* takes over.
[/]

Using the navmesh is an interesting solution. I’ve though about using navmesh on a few occations, though I’ve decided to keep everything within my own system so far, and I’d prefer to keep it that way if I’m able. A similar solution without a navmesh would be to simply have hovering units use a simple breadth first search for hovering units, and perhaps have a separate pawn array if you’d want to open for the possibility of having multiple pawns on the same tile.

Getting the system to work on a Z-grid is simple, but it comes with a few issues that might be harder to solve. If you search up and down in all directions every step of the pathfinding this would slow things down considerably. If you just want different heights, but only one node at each XY coordinate it becomes simpler, though you would have to include some way of assessing whether the height difference between two nodes is too big to cross, which might only be true when going from lower to higher. In other words I would need new ways of weighting edges in the pathfinding graph to take height differences into account. This is pretty high on my to-do list, but if I want to make it flexible and powerful it’s a non-trivial overtaking.

I think flying could be greatly simplified, assuming you don’t want fly-able mazes.

You could pretty much always pathfind on a 2D grid, and if you have a target that is higher or lower in the air, then your pawn first moves to that Z by some simple process, and then pathfinds on the XY plane to the target. You should be able to handle combat in any open 3D space that way. I would have a few checks near the surface that might say, if distance is over X, then move up 1 Z and check again, if shorter, use second path, etc.

If you want dog fights to happen spontaneously in the air, weaving under arches and over rocks, things are going to get complicated. If you just want basic flight for the NPC’s, should be manageable, especially in open spaces.

I agree that flight would be simple to add, and what you’re suggesting could be a good way of doing that. However, I want to implement height differences in terrain for pawns on the ground, which makes things a lot trickier. I’m hesitating to add flight before I have this worked out, as the flight system would probably have to be reworked after adding height differences to terrain anyway.

I sure could use this system too. I have been having problems trying to build such a system for a while now. Height differences would be cool as an extra feature, could be handy for my future levels.

Hope this will be available in a month or so.

Good work.

[=pleewpleew;207059]
I sure could use this system too. I have been having problems trying to build such a system for a while now. Height differences would be cool as an extra feature, could be handy for my future levels.

Hope this will be available in a month or so.

Good work.
[/]

Thanks! I hope Epic will get it up on the Trello board soon. I’ve started working on height support a bit earlier than planned because of your and 's requests. It’s still quite rudimentary, but it’s shaping up well. I’ve posted a video of my progress below. Height does not currently affect walkability or movement cost, but it does affect visibility. At the moment pawns slide through the tile mesh corners if the incline is too steep, which is something I intend to fix. I’ve also added some new functionality for ranged attacks, which displays a trajectory when you aim at an opponent, and launches a projectile along that trajectory on attack. This is also very much a work in progress.

https://.com/watch?v=JDxGG2z2LWM

[=;206359]
Thanks! At the moment it only works for a single ground plane, with no more than one pawn per tile. This is one of the first things I want to add, however. I’m not sure if I’ll be able to include it before the release, but if not I’ll try to include it shortly after. I’m not entirely sure what you mean when you talk about paths opening and closing. Do you mean whether new obstacles can be added at runtime, which the pathfinding will take into account? That works right out of the box, as every path is generated anew at the start of each pawn’s turn.
[/]

Great to hear! And with the paths opening/closing I meant actually closing during a move. I’d be interested in using it for slow moving objects, and more than one at a time (so not really turn based). There might be cases when paths they started out with might close once they get halfway…

[=;207920]
Great to hear! And with the paths opening/closing I meant actually closing during a move. I’d be interested in using it for slow moving objects, and more than one at a time (so not really turn based). There might be cases when paths they started out with might close once they get halfway…
[/]

I’m not planning to add support for real time games in the initial release. It should be possible to add this without too much work, however. This would require recalculating the path every step of movement and storing individual path arrays for all pawns. This could work for a limited number of pawns, but would probably very quickly become very slow as the amount of pawns increased. Thus if you’re planning to make a real time game I wouldn’t recommend using my system.

[=;207640]
Thanks! I hope Epic will get it up on the Trello board soon. I’ve started working on height support a bit earlier than planned because of your and 's requests. It’s still quite rudimentary, but it’s shaping up well. I’ve posted a video of my progress below. Height does not currently affect walkability or movement cost, but it does affect visibility. At the moment pawns slide through the tile mesh corners if the incline is too steep, which is something I intend to fix. I’ve also added some new functionality for ranged attacks, which displays a trajectory when you aim at an opponent, and launches a projectile along that trajectory on attack. This is also very much a work in progress.

[/]

Cool. I’m not in a huge rush for the height system but it could come in handy.

I might have a few problems though. As an example, I want to play a creature and have it then be able to move about. These could be limited to say 8 per player or so. So the matches won’t start with characters as an example, instead I plan on creating them as the game/match progresses.

It is not a must though I might have trouble finding a way around this. As an example, you could look at duel of champions, which is a card game of course, but to prove a point. You can play a card/item, and select it to be played in an area. Once played you can move it around based on its stats. Though it is a 2d grid i’m sure, and not as complex as yours might be, I’m sure there are simmilarities there.

other than that the kit looks cool and I like the new ranged based features. keep it up man.:stuck_out_tongue:

[=pleewpleew;208140]
Cool. I’m not in a huge rush for the height system but it could come in handy.

I might have a few problems though. As an example, I want to play a creature and have it then be able to move about. These could be limited to say 8 per player or so. So the matches won’t start with characters as an example, instead I plan on creating them as the game/match progresses.

It is not a must though I might have trouble finding a way around this. As an example, you could look at duel of champions, which is a card game of course, but to prove a point. You can play a card/item, and select it to be played in an area. Once played you can move it around based on its stats. Though it is a 2d grid i’m sure, and not as complex as yours might be, I’m sure there are simmilarities there.

other than that the kit looks cool and I like the new ranged based features. keep it up man.:stuck_out_tongue:
[/]

Creating new pawns as the game progresses is no problem at all. I might not have communicated this well with my updates as I have focused on creating the viewport editor. From a scripting point of view, creating pawns and terrain at runtime is actually simpler than adding them in the viewport for this kind of system. If I understand your problem correctly this won’t be a problem at all :slight_smile:

[=;208155]
Creating new pawns as the game progresses is no problem at all. I might not have communicated this well with my updates as I have focused on creating the viewport editor. From a scripting point of view, creating pawns and terrain at runtime is actually simpler than adding them in the viewport for this kind of system. If I understand your problem correctly this won’t be a problem at all :slight_smile:
[/]

Cool. Thank you.

I look forward to checking out your kit. I will need some other custom features that I will have to figure out myself, though this will help allot as it is one feature I do not have to figure out entirely by myself.

//edit: oh yeah, and what about characters/object that can take up more space based on their size, and maybe increase their range based on size also?

It’s been a few days since I’ve added a major new feature, but that’s because I had to rework large parts of my pathfinding algorithm to add the newest feature: Edge costs! This means that it is now possible to create thin walls between nodes, making it possible to create much more believable dungeons, houses and much else. It is also a necessary step to be able to get height differences working the way I want.

With this in place it should be possible to designate which tiles are too high to climb from a certain angle, and which slopes are so steep that they should have added movement costs. That’s for the next update, however. For the moment, here is a short video that shows a simple dungeon built using walls on tile edges:

https://.com/watch?v=S0kfUxpmS5c

That will be helpfull. Coming along nicely.

Hey ,

This is amazing stuff! I’ve been trying to work on a Final Fantasy Tactics style level builder myself but haven’t had much time to dedicate to it. I’ve got the initial generation down but now I still have to get it to organize the layout better, highlight movable squares, set up the paused movement, etc. then add in things like jump height based on squares, bridges, inclines, etc. I’m going to subscribe to this thread to keep an eye on your progress and look forward to more of what you come up with!

Thanks ! Great to hear that from you! I’ve been working on this for a while, and it’s really shaping up now, I think. I submitted it to marketplace review a month ago, so after the marketplace-guys have gone through their Christmas backlog you’ll be able to play with it yourself if you’re so inclined :slight_smile:

Are you working in blueprint or C++ and is this a private project or something you’re planning to release to the community?

[=;204460]
I’ve made a new preview video of the blueprint running on a hex map, with a combination of visible and invisible tiles. I’m not much of a modeler yet, so I’ve made it it a clean, simple low poly look. Somethin along these lines will be used as an example level for the marketplace release.

https://.com/watch?v=SicrglnZzEY
[/]

Hello ,
I’m interested in you project from visual side.
How you draw hexes on this green plane in your preview video? Just instanced static meshes? Is this mesh imported from some FBX file with zero thickness hex model or this is some sort of another approach? And your cursor is just a UV map with different channels?

[=chmoknutij;211335]
Hello ,
I’m interested in you project from visual side.
How you draw hexes on this green plane in your preview video? Just instanced static meshes? Is this mesh imported from some FBX file with zero thickness hex model or this is some sort of another approach? And your cursor is just a UV map with different channels?
[/]

You pretty much got it right, though the “cursor” (if you mean the three white lines) is also just an fbx with zero thickness. There are other ways of doing this that might have some benefits, some which have been suggested earlier in this thread, but the current setup is simple, reasonably efficient and flexible. Users can drag and drop meshes onto the public variables of the grid blueprint to easily change the appearance of the cursors and reachable tiles, and can use 3D meshes if they so desire. Visuals are definitely not my strong suit at this point, so I feel that the best I can do is make it as easy as possible for users to choose their own meshes.

Hi ,

Everything I’m doing is in Blueprints. While I have a bit of scripting knowledge from Unrealscript, I am nowhere close to the level of proficiency most coders have, much less an actual programmer! I’ve been trying to wrap my brain around C++ but until I start understanding what I’m looking at I steer clear of it. Once I get it built (it is derived heavily from Ian Shadden’s work on procedural generation, he helped me set up the initial system that I’ll be using and expanding upon once I have the time), I plan on making a tutorial for the specific setup which will be on the wiki. I can’t guarantee when this will be, however, as it is a lengthy project that I have to work on when I have free time. There may be several other, smaller tutorials that will come out first as I have a bit more time to work on smaller projects.

Hey ,
Just curious about a few things -

Marketplace -

  1. Will this be sold on the marketplace?
  2. If this will be sold on the marketplace how much will it cost?
  3. Is there any way I can get my hands on this sooner?

Units -

  1. Does this handle two or more different unit types (Example: Flying units and Ground units) on the same tile?
  2. How big can the maps go before you start running into problems?
  3. Does this support non ground (Example: Air, Water or Space) based units?
  4. Will this support units within a unit? (Transport Aircraft, Transport ships, Siege tower, etc.)
  5. Can we specify unit facing in-game?

Multiplayer -

  1. Is this multiplayer ready?
  2. Does this support LAN?
  3. Does this support Split Screen Play?

Vehicles -

  1. Are vehicles supported in this plugin?
  2. Is bailing / getting out of a knocked out vehicle supported? (Spawning the crew of the destroyed vehicle next to it)

Platforms -

  1. What platforms will be supported?

Thanks for your time,

, almost all of those questions are game specific. This is a framework, you implement whatever game mechanics you need on top of it.

[= ;211519]
Everything I’m doing is in Blueprints. While I have a bit of scripting knowledge from Unrealscript, I am nowhere close to the level of proficiency most coders have, much less an actual programmer! I’ve been trying to wrap my brain around C++ but until I start understanding what I’m looking at I steer clear of it. Once I get it built (it is derived heavily from Ian Shadden’s work on procedural generation, he helped me set up the initial system that I’ll be using and expanding upon once I have the time), I plan on making a tutorial for the specific setup which will be on the wiki. I can’t guarantee when this will be, however, as it is a lengthy project that I have to work on when I have free time. There may be several other, smaller tutorials that will come out first as I have a bit more time to work on smaller projects.
[/]

Ok, looking forward to seeing what you’ve made. It’s always interesting to see how different people try to solve the same problem. I’m planning on converting some parts of the project to C++ when I’m done with the essentials (though the list of what I consider essential keeps growing :stuck_out_tongue: ), though at the moment I think I’m pretty much at the same place as you in when it comes to coding.

[=;211642]
Hey , Just curious about a few things -
[/]

Hi . As noted, many of the questions you ask are game specific, and as I’m creating more of a framework there will probably always be a lot a user will have to make on their own for their specific games.

Turn based strategy games have a lot of differing rules, and if I try to include everything, the blueprint could quickly become quite bloated and cluttered. I aim to make the blueprint as flexible as I can, however, and most of what you ask can be added quite easily. If you download my project feel free to contact me with specific questions and I’ll try to give you solutions that work within the framework.

That being said I’ll try to answer your current questions as best I can.

[=;211642]

  1. Will this be sold on the marketplace?
    [/]

Sure will! It should be on the marketplace voting board aaaany day now, and should be on the marketplace proper about a month later.

[=;211642]
If this will be sold on the marketplace how much will it cost?
[/]

I haven’t completely decided yet, though probably something close to similar items on the Unity marketplace.

[=;211642]
3. Is there any way I can get my hands on this sooner?
[/]

I don’t plan on making it available before it hits the marketplace. Besides, it’s not polished enough at the moment, and the commenting could be better, so I wouldn’t feel comfortable distributing it quite yet.

[=;211642]
Does this handle two or more different unit types (Example: Flying units and Ground units) on the same tile?
[/]

Not at the moment, though this shouldn’t be too hard to add. I’ve discussed this earlier in the thread. The easiest way to do it would be having a separate pawn array for flying units.

[=;211642]
How big can the maps go before you start running into problems?
[/]

That depends. The grid itself can be very big without any problems. I’ve frequently tested the system on 200200 tile grids without any slowdown. What matters more is how you choose to render the grid and the movement speed (tiles/turn) of your units. If you use instanced static meshes your grids can be much larger than if you use regular static meshes. This does of course also depend on what kind of hardware you’re running the game on. For a grid up to about 4040 you probably wouldn’t go wrong no matter how you build your level.

[=;211642]
Does this support non ground (Example: Air, Water or Space) based units?
[/]

By asking this you’re asking whether you can have units that treat different sorts of terrain differently, right? Water could for instance be treated as a wall for one unit, but as walkable for others? The system does not allow for this at the moment, but it’s near the top of my to-do list. I’ll see if I can include it before release.

[=;211642]
Will this support units within a unit? (Transport Aircraft, Transport ships, Siege tower, etc.)
[/]

Probably. This could be implemented in several ways, and would depend heavily on the specific game.

[=;211642]
Can we specify unit facing in-game?
[/]

That’s not included at the moment, but it would be easy to implement. Just read and modify the rotation of your pawns.

[=;211642]
Is this multiplayer ready? Does this support LAN? Does this support Split Screen Play?
[/]

Not out of the box. Turn based strategy is probably one of the easiest genres to set up for multiplayer, but I know nothing about how to add multiplayer integration, and have not built my system with this in mind. I will try to add it at some point, but that’s still a long way away.

[=;211642]
Are vehicles supported in this plugin?
[/]

Depends entirely on what you mean. You could of course replace the mesh of a pawn with the mesh of a tank, if that’s what you mean.

[=;211642]
Is bailing / getting out of a knocked out vehicle supported? (Spawning the crew of the destroyed vehicle next to it)
[/]

No, that’s pretty game specific. Doesn’t sound hard to implement, though.

[=;211642]
What platforms will be supported?
[/]

I have only tested it on desktops running windows at the moment, though I see no specific reason why it shouldn’t work on other platforms. It would of course depend on the graphical capabilities and processing power of the platform you’re running it on.