I'm working on a game that uses a grid-based battle system. Do you think diagonal spaces should be worth 1 tile, 2 tiles, or something different? Here is a shitty mspaint diagram of attack ranges and explosion radiuses to compare.
I'm working on a game that uses a grid-based battle system. Do you think diagonal spaces should be worth 1 tile...
Other urls found in this thread:
redblobgames.com
twitter.com
make the diagonals worth 2
Make it 2. You cover more ground
Make it class dependent. One class is better at reaching diagonally amd the other is better at verts and horizontals.
Use hexagons instead.
I was already planning on having magic-based classes have weird ass range, like chess style "diagonals only" type attacks, I just think I prefer the default to be diagonals=1 because I like roguelikes
lol
explain please, I would like to better understand your viewpoints
Honestly it's just that everything else looks retarded
Patrician
Some tabletops make it change depending on how many diagonal tiles you traverse, either the first one is worth 1 and the rest worth 2, or alternate between a 1 and 2 cost. Not sure how that would look though.
Instead of moving one square make your character move one square one direction and two squares in a perpendicular direction, like a Knight.
Do something interesting.
Diagonals=2
I have never once thought to myself while playing a TRPG
>UGH, why aren't these 2D sprites adhering to arbitrary turn-based rules and aligning themselves to a non-diagetic grid able to move equal distance in 360 degrees?! So unrealistic!
Any ruleset trying to make diagonals more realistic just adds unnecessary complexity that neither you nor your player will appreciate beyond a "Huh. They did that. Kinda cool."
wtf did I just watch
newfag detected
Diagonal is worth sqrt(2), obviously. Why is Yea Forums so bad at math?
Top-left is how most Jap tactical games do it for movement and when casting spells that have an AOE template
I made this to attempt to illustrate what that would look like, it looks about the same as the explosion with the rounded corners. interesting, I suppose
Would you really consider diagonals to be "added complexity"? I always considered roguelikes that don't have them to feel weirder in terms of movement, but that's just me.
I understand this, xcom does something similar(diagonals are worth 1.4 I think), I just don't know if it would add much to gameplay if it doesn't use an action points system like xcom does.
Just use trigonometry. It's not that hard, and if a player is stupid enough to be confused by it then fuck them.
forgot to reply to this, I plan to have special attacks be where weird ranges and attack shapes come in, knight and bishop are my 2 favorite chess pieces so that's sure to be a thing
I don't plan to use an action points system, I plan to have the system be "You move X spaces"
>Diagonal is worth sqrt(2), obviously. Why is Yea Forums so bad at math?
If you alternate between it costing 1 and 2, it averages to 1.5 which is about 0.09 off sqrt(2). If you're sticking to only whole number costs, it's probably the most accurate without sacrificing simplicity.
I see you like Disgaea/NIS games.
Aside from diagonals=1 and diagonals=2, yes, any of the other systems these anons are suggesting are needless conplexity for no gain
Imagine explaining in a tooltip
As far as 1 vs. 2, with 1, you feel like you're wasting tiles if you move in a straight line. 2 never has you feeling like you've wasted potential movement.
my primary inspirations are actually roguelikes and xcom games, sorry to disappoint you
that would be so fucking annoying dude, I don't understand what this would add to any game
oh, I agree with you then
the one on the bottom right seems the mos interesting
It makes sense since if it alternates, diagonals are worth 1.5
In reality diagonals are worth ~1.41 (square root of 2), which is close enough to 1.5
oh, thank you, the idea was for it to be some sort of shrapnel bomb that isn't a direct "explosion" but is instead modeled by projectiles flying out from the center
I think it would be annoying if every explosion was like this but for a certain ability or two it'd be fun I think
Make them worth 1.7
explain yourself
again I like this idea but it's difficult to model in a system where the average move may be 2-4 tiles and there isn't an action points system in place
Make it impossible to move diagonally, so all diagonals are worth 2 but you have to move using cardinal directions.
According to the Pythagorean theorum, to travel straight through to a diagonal space is 1.41 times the distance of a straight space. Rounds down into 2 but many games auto round to the least inconvinient number. Do what you will, just make sure if you choose to make it 1 space that it doesnt make mechanics exploitable, unless of course that is your intent to exploit.
I think that's the idea of why diagonals cost 2, my friend. Unless in your version this somehow means that ranged attacks can't move diagonally or something?
I do plan to not make it "exploitable", most of the movement is planned to be for the purpose of avoiding AoE attacks, difficult terrain, and adjusting your party members to not hit each other with explosions and shit, most of the monsters that have range at all will have very long range to be not kiteable or outranged for the most part
diagonals should be worth 1/2, simulate strafe running in your shitty rpg
oh, well I figured that could also work for ranged attacks
Extended Von Neumann Neighborhood
I will have basic ranged attacks follow the same formula as movement but special attacks have weirder range restrictions, like "can only target enemies at an even number of squares away" "can only attack diagonally" "attack every square adjacent to an enemy" and shit like that
little rude of you to assume it'll be shitty, user
I'll prove you wrong in like 10 years when it's ready
>Imagine explaining in a tooltip
You're not supposed to explain any of it in the game, you're instead supposed to SHOW affected squares. Never explain anything when you can instead show how it works.
If you had a point system in place then you could make straight movement cost 5 and diagonal cost 7 which is close to diagonal costing ~1.4
Typically, diagonal would be worth 2 tiles to balance melee vs ranged weaponry.
just use auts, but let the player actually see the auts so they can plan accordingly.
Diagonals should be worth sqrt(2) tiles
I do like the idea of a more complicated time/turn system employed by games like roguelikes and xcom, one of the main features of this game(hopefully) will be ease of use and simplicity of taking a turn, it's supposed to be very fast paced for a turn based strategy game(in terms of the average garbage enemy encounter, anyway)
If both characters can move the same way and attack the same way, how does making diagonals worth more balance melee vs ranged? I haven't thought about that.
2-1-2-1-2-1
Yeah, ranged attacks would also have to follow the no diagonals rule. So ranges would also be diamond-shaped, like FF Tactics.
necrodancer has a bunch of weird tile attacks like if you attack someone next to you it deals damage in a straight line behind them or if an enemy is a tile away you can damage them and whatever is to their sides
You. I like you.
This, for the sake of simplicity I'll accept 1.5 also
I'd argue that a countdown would be very easy to use; if you have 40 points, diagonals take away 7, as long as you keep the information open to the player so they know how much time certain actions take, it shouldn't be too difficult. What makes things drag on is when you have to constantly cancel movement to go back and check attack auts. Alternatively, let the player plan out their entire turn and just make them confirm it, rather than movement being a hard commitment that you can't back out of.
one of these days im going to click on this and its not going to be lil cheetus
It's literally irrelevant as long as the same rules apply to all sides of the battle.
diagonals should be worth 2 with only spears and other large weapons being able to hit diagonally
yeah, necrodancer's cast of weapons is a big inspiration to me, I'm a huge fan of the blunderbuss and rifle
I bet the original doesn't exist anymore, it's been completely replaced by lil cheetus
all attacks should be cone aoes
Make it a hex grid
make it a hex grid
retarded hexfags go and stay go
>literally unable to move in four cardinal directions
No hex no buy
diagonals should not be allowed
Diagonals 1.5 is the usual standard.
Alright I'll bite, please explain what hexes would add
I dislike them but battle for wesnoth is a good game and it uses hexes, I'd be willing to hear what you think they bring to the table
Depends on how attacks work.
If you can only aim in 4 directions then you must make diagonal movements worth 2 tiles, if you don't then you should make it worth 1 or 1,5 tiles.
The reason is simple: your character can be hit from more directions, so you need to position your character more carefully and generally move it around the map more, so if you make diagonal movement require too many "time units" the game gets more tedious and the game take more turns just for moving around.
Google "bees"
Hexes offer the clear advantage of uniform distances between tiles; It sidesteps the issue of diagonals entirely
They are clearly inferior because they don't support all four cardinal directions though
Yes, I'm aware that there is an insect that builds hex-shape structures because of their space efficiency, but they aren't a video game.
I don't disagree that their sidestepping of the diagonal issue is sometimes nice but they make it a lot harder to make wacky targeting patterns for abilities.
That "weird shit" is making it look circular, filling in a square if any part of it is filled by the circle. It helps it look more circular even at smaller sizes. Here's an algorithm that fills a square if a circle of the radius fills any part of the square.
Personally, I'd adjust it a bit to make radius 3 look a little more rounded.
Tile-based system will always be shit.
Came to post this
For instance, this is a tweaked equation that helps avoid some of the blockiness I was having in odd radiuses before.
Hexagons are superior for a lot of game types, but they really complicate the code and algorithms involved. See redblobgames.com
For a beginner game dev, you should stick with rectilinear.
use hexagons
I don't particularly care for making it look circular honestly, I think it just makes it harder to visualize in some cases, and doesn't add much other than making it look smoother(which it does do, admittedly)
complication of coding is not an issue for me, if you have anything positive to say about hexes I encourage you to do so.
The hex vs square debate ultimately boils down to how you want diagonals handled both for movement and for attacks
Gloomhaven is a board game that has multi tile melee attacks like Flamethrower that fan out as they go further, but of you are going strictly off of Necrodancer as an inspiration you can stick with cardinal movement only with diagonal being for special units so you can just make chess puzzles.
Just pick a system and stick with it, then. Manhattan distance, diagonal movement == 1, or direct circular distance are the most obvious choices.
The biggest advantage to a hex system in video games is the same as in tabletop RPGs: it looks less rigid and more organic, so it can feel better for wilderness, caves, etc, where a rectilinear grid makes everything look very constructed and manmade. In most tabletop RPGs I've played (especially Dungeons & Dragons), DMs switch, using both square and hex grids for different situations.
my primary inspirations are dungeon crawl stone soup, xcom, some elements of nethack and a lot of contemporary roguelite games
I could go either way, really, I'm just here to learn why people like one or the other
This one guy says chess is shit so it must be shit, my bad
>Hexagons are superior
that's all I wanted to hear, you may proceed with your game
You reversed the first two example images on the bottom row.
Just stick with Diagonals Worth 2 if you're going with a square grid layout or you'll have to program your AI to properly abuse movement and have players cheesing the system.
I don't think it should be set in stone.
Think of "Into the breach" Some classes have diagonal going 1 tile, and others 2.
Try and play what's the most simplest, and change if the gameplay requires it
I've debated this for a long time, here's the basic summary of your choices.
>diagonals = 2sq
The standard way to do it. Single square terrain or anything that prevents movement in a single square has a bigger impact on moving around the battlefield, since you essentially only move in cardinal directions. However, mapping out things like cones and radius attacks become a little more annoying to do.
>diagonals = 1sq
This makes mapping out radius/cones stupid simple and quick. However, to obstruct movement, single square obstructions do not cut it and have to be multiple squares in order to actually slow anyone down.
>hex grid
The biggest meme in tabletop. Hex grids are absolute shit because they do not accomplish anything. You can't move in straight lines in certain directions. Cones work well in some directions, but are a clusterfuck in other directions. Radius mapping similarly gets silly. Obstructions must be multi-hex, because you can't slow down movement otherwise. It doesn't even do facing rules better than squares. Basically, hex has all of the disadvantages of any given square grid method, but no advantages.
Personally, I prefer diagonal=1sq. While obstructions must be multi-square to actually affect movement, the usage of 1sq diagonals greatly simplifies many aspects of radius/cones/movement/attack range, especially when you have to start dealing with elevation levels for airborne or underwater components.
Fire Emblem uses this system and it works pretty well. It's more intuitive than the other option imo, and the shape allows for more interesting strategies than a square.
if you already planned on weird ass range, why not have both types of diagonal cost, depending on the spell?
Just depends on the spell. Use what feels right
>make this post
>realize what board I'm actually on
Holy shit I thought this was /tg/
that's ok, the way I'm thinking about it does have a lot of overlap with tabletop games, I'm thinking about posting this on /tg/ too
I disagree with your hex assessment. For square grids, you have 4 canonical directions in which movement and distance are well understood, and 4 directions that are done differently game-by game. The actual distance for a diagonal movement should be √ (2), or 1.414. Your most realistic option without fractions would be to make every even number (N) of diagonal movements cost 3N spaces, and an odd number N cost 3(N-1) + 1 (so moving diagonals costs 1, 3, 4, 6, 7, 9, etc), but that's generally unintuitive and weird. The solutions most people come up with are either significantly undervaluing diagonals, significantly overvaluing them, or using a radius calculation that the player can't easily mull in his head when planning a turn.
For hex, you have 6 canonical directions in which movement and distance are well-understood, and no other directions allowed. At worst, if you want to move along a pointy side, you have to spend 2 movement, when the actual distance is 1.73; significantly closer, so nobody worries about it. There are distinct advantages to hex, because you don't have to consider diagonal as a special case. As I said above, hex also looks less rigid and manmade than square, so you can better represent natural environments.
wtf is this sped up. I remember it being significantly slower
Let me post a simple image that shows why hex is dumb. The red line is what happens when you straight to move in a straight line. The green line is trying to map out a cone attack.
>There are distinct advantages to hex
What are they?
>As I said above, hex also looks less rigid and manmade than square, so you can better represent natural environments.
That's not true at all. Hexes are just as unnatural as squares.
bottom left is the correct answer
>hexes are as unnatural as squares
t. Never seen bees, rocks, literally any form of bubble, snowflakes, Saturn, water when spun, insect eyes, turtles, carbon atoms
Get a load of this squarefag
There's your cone nigger
Also
*ahem*
FUCK FOUR CARDINAL DIRECTIONS
That's trying to move a straight axis-aligned line, or rather a non-axis aligned line, as hexes have three axes that aren't perpindicular. Square has the same issue with all of its diagonals. Here is a 30-degree path with both hex and grid (red). A 30-degree cone with hex and grid (green), and a 45-degree path with hex and grid (blue). Hex is clearly more natural there.
> That's not true at all. Hexes are just as unnatural as squares.
Perpindicular lines don't look natural. Some animals work in hexes, very few non-human animals make perpendicular constructions.
Daily reminder every weakness of squares is avoided by having the map at a 45 degree angle. Your welcome
>solve diagonal problem
>create cardinal problem in its place
What did he mean by this?
Just rotate it again
>Not using the chad hexagon
Here are the same cones drawn in different directions on hex. Hex IS SHIT.
At least get an actual square grid, retard.
>Hex is clearly more natural there.
Wrong. Pic related.
>Hex looks like nature!!1
Go outside, you fucking imbecile.
I don't know how you expect anyone to answer this without knowing what kind of game it is. If it's going to involve a lot of moving around the map then you should probably have diagonal movement for convenience. If the map is small and it's just focused on battling whatever's in front of you then it depends on how much emphasis you want on positioning and blocking.
> At least get an actual square grid, retard.
I used a square grid. Each square is 60x60 pixels. What the fuck are you talking about?
> Pic related
I see diagonals of arguable distance on the right, because of the distance problem. Are diagonals 1 there, 2 there, or √ (2)? I don't really see what you're saying is wrong with the left.
> Hex looks like nature!!1
I never said that, you strawmanning retard. Don't argue against something I didn't say. Changing "looks more natural" into "looks like nature" is disingenuous at best, but I'll assume you're being retarded rather than an asshole.
I think you should put this shit to bed by using hexes
Make them worth 1.44 tiles.
1-2-1-2-1-2 repeating. It's the only way to really balance out the diagonal movement balance in a square grid.
That's nice. I'm working on a game that fucks your ass and strokes your cock as you play.
>game written in Python
>using a sqrt
Show's over folks, nothing to see here.
>actual square grid
He probably only saw this. Yea Forums X hover expansion isn't showing the actual lines in the smaller version. Need to open it full size to see the real lines.
>because of the distance problem
There is no distance problem. You are operating on a fallacy of trying to simultaneously make something unrealistic adhere to realism.
The world is not divided into square or hexes. People do not stand perfectly in the center of a square or hex. You cannot simultaneously use a square or hex as a unit of distance while also trying to actually measure objective physical distance. You either use a square/hex grid as you unit of distance or you measure distance with a ruler. You can't do both. It will never make sense because grids are an inherent extrapolation of distance.
>I never said that
You did and it's another fallacious argument on your part. Squares and hexes are not natural and one doesn't "look more natural for environments" than the other.
Stop being a fucking idiot and maybe we can have a real conversation.
came to post this, saw it, then came to post this
I'm neither OP nor am I writing a game in Python. I wrote up a quick example because Python is fine enough for prototyping. I could have done it in literally any language; Python was just going to be the quickest to type out and the fewest lines of code.
My bad, should've read the thread more carefully.
Hexagons do look more natural though, they allow you to make more rounded shapes to represent natural features rather than having sharp square corners.
That's hilarious. He's arguing this and he didn't even look at the fucking picture?
> There is no distance problem
How do you count the diagonals, then?
> The world is not divided into square or hexes. People do not stand perfectly in the center of a square or hex. You cannot simultaneously use a square or hex as a unit of distance while also trying to actually measure objective physical distance. You either use a square/hex grid as you unit of distance or you measure distance with a ruler. You can't do both. It will never make sense because grids are an inherent extrapolation of distance.
What in the fuck are you rambling about? Are you actually out of your fucking mind? You do know what a coordinate system is, right?
> You did
Quote my post where I said "Hex looks like nature!!1" or go fucking kill yourself.
Wow, he's really having a meltdown.
Meant to quote with that second part, and managed to fuck up my correction with a misclick.
Am this
And will add that both hex and square grids are both more or less convenience's for reach and spacing in TT wargames and RPG's, the old school games pre-1980's basically used sticks, string and measuring tape. There's pretty much no reason with today's computing power to really adhere to the grid based format other than tradition. If you want a good example of how a game will play without grids try the Temple of Elemental Evil from the early 2000's, it remains the most faithful translation of 3rd edition's rules into a CRPG environment while full on hearkening back to the OD&D (Chainmail and all that) method of play by ditching the grid entirely. You character can move X number of inches (where X is the equivalent of Y feet in the game world) in a turn. There's no grid, they didn't use those at the time, it was more common to just cut a piece of dowel, or card board or whatever to a fixed length for common move distances and be done with it. Seriously consider this. Especially if you run a TT group, it's intimidating and counter intuitive to go gridless at first but it actually REALLY speeds up play once in effect as there's no more of this "What's direction of movement cost." "How's my fifteen foot cone working over these squares as one of the three at 10 feet is untouched, how do you go about dealing with it at your table?"
>You do know what a coordinate system is, right?
I seriously hope you're not using cartesian coordinate system on a non-euclidean plane such as surface of the Earth
Of course, I only use orthodromic calculations for that.
First off, scrap the square grid and use a hex grid. Make the hexes 1 unit in diameter. Measure everything using that unit. Square grids ore terrible, chiefly due to the whole diagonal argument.
Hex autists are the furries of tabletop
...
Well it's sextuples. Must be true. RIP Japan.
holy shit user, i was having the same problem before, as i am making a tabletop game but not only using X & Y but also Z, best way to do it i've found so far? like an user already said, 1sq diagonals but plan out obstacles to be multi square. its less head breaking in the end and most people (which the game is supposed to be aimed at) will find it easyer to understand, 1sq = 1 movement required / 1 range required
*notices your hex-grid* What if I wewe to use my conye attack UwU
>what if I wanted to move in a straight line
OP, do you have anywhere I can follow development? Or are you still just planning? Though, even just reading about planning is interesting, because I'm making an SRPG myself.
Step 1: ignore hexfags
Step 2: stop trying to be extra and just use taxicab metric like every single game dev does
i thought i was the only one
kind of ruins the experience