Giant image or many objects as map? (RTS)

Discussion and feedback on Construct 2

Post » Mon Feb 18, 2013 1:46 pm

Hi,

I am currently working on a isometric strategy game. While creating the map background (terrain, rivers, ...) I was thinking if it is better to make a (very) large image as background (X000px x X000 px) instead of placing object for object separate.

I may hit the limit of my english knowledge but I try to explain my problems:
A river or a rock do still need a collsion box.

If I use a huge image as background I would need a image as invinsible hitbox for each object I need collisions for (I do this already for all my units) .

If I would set every stone, tree and a single river as a object I would still need a hitbox for each object which would double the amount of objects.

What would you do? What is the best way to make a RTS Map with the least perfomance hit?

The amount of work is nearly the same so that is not a problem.

Some informations that may be relevant:
- the player can't create new objects (buildings, units).
- I have basically the following layers now (down to top): background (see above), units, other objects (buildings, usually objects the player can interact with), HUD.

Thanks :)
B
15
S
4
G
2
Posts: 16
Reputation: 2,129

Post » Mon Feb 18, 2013 2:14 pm

[QUOTE=Dayjay] Hi,

I am currently working on a isometric strategy game. While creating the map background (terrain, rivers, ...) I was thinking if it is better to make a (very) large image as background (X000px x X000 px) instead of placing object for object separate.

What would you do? What is the best way to make a RTS Map with the least perfomance hit?
[/QUOTE]

It's been stated few times that you should avoid large images and try to divide your layouts into smaller objects. So I'd go with that approach. You can probably find some recent discussions about the topic with forum search :)
B
24
S
8
G
7
Posts: 756
Reputation: 7,192

Post » Mon Feb 18, 2013 2:37 pm

[QUOTE=Dayjay]
If I would set every stone, tree and a single river as a object I would still need a hitbox for each object which would double the amount of objects.[/QUOTE]

For backgrounds like grass, road... use tileBG's

For objects you can use sprites and make them all as a frames
frame = 0 - stone
frame = 1 - tree
etc.

And using sprites you can alwasy set collision polygons for each object.

However I would not recommend using single trees or single stones if you don't need to. If you can make small groups of them (little forests ;)) to keep your object count at reasonable amount.

shinkan2013-02-18 14:37:47
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 12 guests