Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1401004 Posts in 67843 Topics- by 61373 Members - Latest Member: noartech

May 23, 2022, 09:16:30 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsOut Of Bleach - turn based tactics
Pages: [1]
Print
Author Topic: Out Of Bleach - turn based tactics  (Read 648 times)
marcgfx
Level 7
**


if you don't comment, who will?


View Profile WWW
« on: April 29, 2022, 08:22:49 AM »

I'm a big fan of subset's Into the Breach and decided to see if I could make something along these lines. As making a game like that is not hard enough I want to make it completely configurable via JSON files, loading data on the fly. My idea was this might make it easier for me to change things quickly, but it does add some overhead.

I made a fairly decent image last night, so I guess it's time to start posting.


Hours before this, I was working on hopping and you can see it did not look nearly as nice.


I have already defined various movement mechanics. Directional movement let's units move from field to field. Hopping enables jumping from one field to the next over larger distances. It is also possible to move in straight lines like the queen in chess, or simply move to any square within a specified radius.

The knights move is defined as:
moveLock:1,
hopR:4,
hop:[[2,1],[-2,1],[-2,-1],[2,-1],[1,2],[-1,2],[-1,-2],[1,-2]]


This means the knight can hop 4 times to any of the specified points and does not rotate. To let the player chose where to go I first calculate all possible end-points. This is fairly straight forward as I just have to iterate through all possible jumps.

Finding the way back to the start turned out to be a bit trickier for me, as I did not want to store all possible paths. I instead store lists containing valid fields for every jump distance (the white numbers you can see in the image). Using the target as the starting point I filter out all 4-fields that can't be reached and then use the remaining fields to filter out the 3-fields. This seems to do the trick and it narrows down to only a few possible paths of which I then randomly chose one to display.

I've added lasers, bullets, lob-shots, explosions, teleporting, terrain altering in fairly basic fashion.


It's possible to use/gather/produce/resources and create units. So I could think about adding some base-building.
I've made a basic start to define elements, add status changes, events and .... you get the idea.

Lot's of stuff and systems but there is no real game so far. I'm not even sure where this journey is going.
« Last Edit: April 29, 2022, 08:29:07 AM by marcgfx » Logged

marcgfx
Level 7
**


if you don't comment, who will?


View Profile WWW
« Reply #1 on: April 30, 2022, 09:55:24 AM »

Trees
I was thinking about creating trees in a geometry shader, but as I have no idea how to do that... I decided to go the simpler root using simple meshes and instancing. Trees are randomly placed and I tried to make the colors more interesting using a vertex shader. I was quite confused by the result as it was quite blotchy.


On seeing the actual vertex count of my tree model, the problem was quite obvious. I had done a quick export of a primitive and had not expected the mesh to have so many vertices. Changing the model fixed my problem.

Besides the trees I also reduced the complexity of my terrain and have managed to reduce triangle count by about one third, down to around 300k triangles.


Resources
Creating trees like this gave me the idea of using trees as resources. When resources are used I can simple remove a tree or two. I think this might work for SC2 like chrystals as well. I had to adapt the placement algorithm, it's not brilliant but looks ok I believe.


This is entirely non functional at the moment and simply testing out ideas Smiley

Logged

Alain
Level 7
**



View Profile WWW
« Reply #2 on: May 03, 2022, 12:53:57 AM »

Cool, so good to see you are working on a new game! I'm looking forward to see how things develop.
Logged

marcgfx
Level 7
**


if you don't comment, who will?


View Profile WWW
« Reply #3 on: May 03, 2022, 04:27:06 AM »

Thanks Alain. I know I need to do a lot of things differently this time. Maybe get out an early Itch version for people to play around with. Kick-Starter. Early-Access... all that shizzle. Not sure if I am capable of these things, but we will see.

On a dev note, I've found out why "Into the Breach" does not support big units. It's a pain in the backside.

Pushing is a lot more difficult. Large units can hit multiple other units at the same time. What happens if a unit that can't swim is partially over water? Or on a mountain/mid-air?? I don't have a solution to this yet. So far code for preview and action were written seperatly, but as it was getting complicated I needed to unify. This caused some refactoring, but I am pretty sure it will be better for me in the future.


Teleportation was easier to handle, but there are a lot more special cases. Same issue with water/gabs below a unit though.
Logged

Alain
Level 7
**



View Profile WWW
« Reply #4 on: May 03, 2022, 08:56:24 AM »

I loved Into the Breach. It was just amazing, but if I had to criticize something, it would be that it did not sell the fantasy of controlling a giant mech fighting Kaijus. Somehow the visual style collided with that fantasy for me. As you mentioned, there were only single-tile units in there, maybe having multi-tile enemies could have helped to sell some enemies as being gigantic?
Logged

logophil
Level 0
***



View Profile WWW
« Reply #5 on: May 03, 2022, 02:00:07 PM »

Great title! Will cleaning products be a theme?

Seriously though, looks like a good start, and I always like the idea of multi-tile enemies. I think my suggested solution to the pushing problem might be - don't include pushing as a mechanic (since there a lots of other potential turn-based combat mechanics to make a game like this interesting).
Logged

marcgfx
Level 7
**


if you don't comment, who will?


View Profile WWW
« Reply #6 on: May 04, 2022, 03:40:27 AM »

@Alain: I'm thinking biiig boss-fights. With multi-tile and 3D enemies, I think I can probably achieve some cool effects. I've never done low-poly modeling or in-game 3D animation at all though. So it will be challenging.

@logophi: The title is just a joke at the moment Smiley But maybe I can make a short demo game based on cleaning producs. That would be a good idea. The easiest solution would be to simply not teleport or push large units. But... I will see if I can make it work first. I did love all the little mechanics that make the world be more alive. The pushing is also very satisfying as it could be used to block enemy attacks, or simply shove a strong enemy into water/lava for an instant kill.

I'm currently stuck on tree problems.


1. How do I show believable burning trees?
2. When units are on a tile, how do I prevent overlap with the trees?
Logged

marcgfx
Level 7
**


if you don't comment, who will?


View Profile WWW
« Reply #7 on: May 10, 2022, 02:20:59 PM »

I did make a bit better fire. But I have noticed my trees are not that great for performance even without the fire. I find this quite shocking, as they are really simple. Will have to look into this.


I've worked on an "influence" system. In the GIF the tank moves into the influence area of the horse (5 whitish dots). In this area the tanks stats are buffed. Reach is increased by 3, HP +1 and quite a few status changes (that currently do nothing).


The area of influence works exactly like unit movement, so it can now be defined in JSON in an identical manner and will be blocked by mountains by default.

Code:
influence:{
multi:{
reach:{
lineR:[2,8],//straight line 2-8 fields away
line:[0,2,4,6],//right, up, left, down
area:[0,1.5]//anything within 1.5 distance (so diagonal too)
},
data:{
hull:{h:1, hp:1}, //inc health + inc hp capacity
move:{dirR:3},//inc dir movement
resist:[gollum],//resistance to gollum attacks
armor:{fire:1},//fire attacks are reduced by 1
shield:{ice:1},//not sure what an ice shield does...maybe converts ice attacks to hp?
affected:[anger]//some kind of status effect, nothing implemented
}
}
}

The values for resist, armor, shield, affected can be any kind of strings. I can define a weapon with element "gollum". This weapon does not cause damage, if resist "gollum" is set on the target.

I currently have not defined any element-element relations, but I will probably give it a shot.
Logged

logophil
Level 0
***



View Profile WWW
« Reply #8 on: May 11, 2022, 06:42:16 AM »

That fire does look better - but yea I guess you do have a bit of a problem when units are on the same square - I can't remember how Into the Breach solves this problem?

Always nice to use JSON files for stuff, that's what I'm trying to do as well!
Logged

InfiniteStateMachine
Level 10
*****



View Profile WWW
« Reply #9 on: May 11, 2022, 08:08:30 AM »

re : tree performance, what engine are you using?
Logged

marcgfx
Level 7
**


if you don't comment, who will?


View Profile WWW
« Reply #10 on: May 11, 2022, 04:36:05 PM »

@InfiniteStateMachine: I'm using Unity and GPU instancing. I just read that with very low poly models it's better to create a single mesh. So I might end up coding the tree mesh... seems a little crazy to me right now, but maybe there is some mesh merging code I can use.

@logophil: Into the breach just places the unit on top, it is just pixel art after all. JSON is nice, but I'm wondering how much time I am wasting making features possible that I might never need. On the other hand I hope to have something robust and versatile when I start actually making a game. Probably should get on that bit soon now though Smiley
« Last Edit: May 11, 2022, 04:52:37 PM by marcgfx » Logged

Alain
Level 7
**



View Profile WWW
« Reply #11 on: May 11, 2022, 11:55:49 PM »



The smoke makes your burning trees look nice! Hope you can figure out the performance issues.
Logged

Beastboy
Level 3
***

Happy birth day mom!


View Profile
« Reply #12 on: May 12, 2022, 02:46:56 AM »

I love the visual layout
Logged
InfiniteStateMachine
Level 10
*****



View Profile WWW
« Reply #13 on: May 12, 2022, 06:44:07 AM »

@InfiniteStateMachine: I'm using Unity and GPU instancing. I just read that with very low poly models it's better to create a single mesh. So I might end up coding the tree mesh... seems a little crazy to me right now, but maybe there is some mesh merging code I can use.

@logophil: Into the breach just places the unit on top, it is just pixel art after all. JSON is nice, but I'm wondering how much time I am wasting making features possible that I might never need. On the other hand I hope to have something robust and versatile when I start actually making a game. Probably should get on that bit soon now though Smiley

Weird, you'd think GPU instancing would work quite well but those trees are quite low poly. Maybe their mesh data is close to the size of the material properties?

This may help https://docs.unity3d.com/ScriptReference/Mesh.CombineMeshes.html

Logged

marcgfx
Level 7
**


if you don't comment, who will?


View Profile WWW
« Reply #14 on: May 12, 2022, 03:12:05 PM »

@Alain: I will probably use some animated smoke for the fire, then I wont need as many particles.
@Beastboy thank you, glad you like it. I'm happy with the layout of the world, but currently have zero idea how my UI should look.
@InfiniteStateMachine CombineMeshes... oh yes, that does looks promising. thanks Smiley
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic