How do I - several elements of iso game

Get help using Construct 2

Post » Fri Apr 03, 2015 1:09 pm

Hi ppl,

Working on isometric game and have several questions about it:

- What would be mest way of isometric map building?
- How would you go about elevations of terrain in relation to distance of projectiles?
- How would you handle z-ordering?
- How would you go about doing half-transparent fog of war: terrain is visible but npc are not?

Thx!
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
78
S
21
G
19
Posts: 1,932
Reputation: 17,316

Post » Fri Apr 03, 2015 6:28 pm

1.
Probably a grid based approach. I might use tiled and a parser to read the iso grid, but that may be an overkill. Or I might just place objects in the editor or make an editor so I also get sorting. The level design is just data and it should be possible to convert it to any format that's needed to use.

2.
The isometric view is just smoke and mirrors, I'd use a 2d array with the heightmap info for the grid, and compare the projectile isometric positions with that.

3.
I've devised complicated sorting before to find what order to draw the object's based on their isometric size and position, but it's not very fast as i boils down to being a topographical sort. For most isometric games it's acceptable to do sorting like this:
For each sprite sorted by 10000*isoX+100*isoY+isoZ
---- send to front

Well not exactly, you may need to change the positions around. Basically it reads that more y will be infront of more z and more x is infront of everything.

4.
I'd store the fog in an array like the heightmap and set the units to be invisible if they were on grids with fog.
B
89
S
30
G
95
Posts: 5,157
Reputation: 63,450

Post » Fri Apr 03, 2015 7:04 pm

@R0J0hound Thanks! :)
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
78
S
21
G
19
Posts: 1,932
Reputation: 17,316

Post » Fri Apr 03, 2015 9:56 pm

@Arima Hi, I know you had some successes with rts type formations and avoidance of moving characters. Could you help me with that? Thx!
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
78
S
21
G
19
Posts: 1,932
Reputation: 17,316

Post » Sun Apr 05, 2015 12:18 am

Getting that working was crazy complicated. Basically it involved using physics to push units out from each other as it's the best push out method for crowds.

Details if I remember them correctly, it's been a while since I worked on it:

Physics is cpu intensive so I was activating and deactivating physics for each unit depending on the distance to the next closest unit.

Had two movement methods, one updated physics velocities for movement when physics was on, event driven movement when physics was off

Was going to implement path obstruction via updating the path finding collision grid, stopped working on it before that feature was implemented

Had an idea for units to take turns getting though a small passageway if going opposing directions, some units would be designed to ignore that on purpose and shove everything it could out of the way

Used path finding, stored nodes in array

Would cycle through instances and have them reevaluate if they've made progress on their path since the last check. If not, check for path again. If still no progress after some amount of time, move somewhere else.

This was pretty hard to implement and it wasn't perfect either, but it was the best I had managed.
Moderator
B
92
S
32
G
33
Posts: 3,005
Reputation: 27,582


Return to How do I....?

Who is online

Users browsing this forum: ephrisian, ismael123, Jhorbam and 8 guests