RTS cells

New releases and general discussions.

Post » Thu Jun 12, 2008 5:23 am

The RTS behavior is obviously quite useful, although I was wondering if it is possible for the cell sizes to go smaller than 10 x 10, as this would allow use for games that favor a smaller scale.

edit: also is it possible so that it remembers if you had the grid on (in layout) when you open the program, plus what the dimensions of the grid were?
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190

Post » Sun Jun 15, 2008 1:08 am

Are your objects really small? I avoided making the grid go all the way to 1x1 sized (pixel perfect) for two reasons: one, the generated paths will be right up against the obstacles (which is unsuitable for many types of movement), and two, the CPU usage could be very high. With a large map and 1x1 cells you could end up with enough cells to literally hang the game for a second or so while it generates the optimal path - it's running a fairly intensive search algorithm to determine the best path - and many games need to frequently regenerate paths. So could you shed some more light on where you're trying to go with this?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,590

Post » Sun Jun 15, 2008 2:45 am

Well I'm just testing an isomteric type graphic thing, and when theres only a 1 space tile between the solid tiles theres not quite enough room

blue being solid, I was just wondering if the cell size could go slightly smaller it would be able to fit.
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190

Post » Sun Jun 15, 2008 12:14 pm

The RTS movement moves and pathfinds based on a top-down grid - it won't work properly if you try and crowbar it in to a 2D isometric pattern like that. It's still using squares, it won't line up in any sensible way. You could try keeping an offscreen top-down map of the play area, then use the isometric view to display what is happening on the 2D offscreen map. That's how pathfinding is usually done in an isometric game.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,590

Post » Sun Jun 15, 2008 1:20 pm

Oh yes, you're right. That's a much more sensible way of going about it e_e
That's exactly what I was doing with MMF anyhow, don't know why I didn't think to do it with this as well.
Thanks! ^-^
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 2 guests