Troubles with tiling landscape

For questions about using Classic.

Post » Sun Feb 08, 2009 8:38 am

Hello!
Im newbie in game development and in Construct so please dont laugh at me if my problem is trivial :)

Im creating a simple arcade game with isometric view and theres number of surface types in my level: water, sand, grass and so on.

And my trouble is in creating logic of placing tiles of different surfaces
I applied an image so you could better understand what I mean. I need to create closed areas of different surface types. They must have fine, smooth edges.



I decided to create a number of tiles that represent sectors of the final area, but I cant understand how to make the program to recognize them automatically and place the right tile to the right position

Maybe it would be very useful to use tiled backgrounds but sometimes during the game tiles of landscape must change at a runtime. This is very important for me.

I will be very grateful for any help!
B
23
S
2
G
4
Posts: 36
Reputation: 2,822

Post » Sun Feb 08, 2009 10:53 am

You'll need to code this with events.

Perhaps you could put all of your tiles into one sprite animation with an animation speed of 0 so it doesn't play. Then you could create a series of events that uses a "For each" loop to check the sides of each tile to see if it's overlapping another tile. Then, based on which sides it has other tiles on, you set the tile to whatever animation frame it needs to be.

You could do this once at the beginning of the layout, then just run the loop once again each time the tiles need to change.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Feb 08, 2009 1:55 pm

I have done something like this in Play Ur Own Pac.
Maybe you want to have a look at it: PUOP

And deadeye is right, it basically works like he described. Tell me if you want to check out the source.
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Mon Feb 09, 2009 4:47 am

to deadeye
Thank you very much! I'll try it immediately!

to PixelRebirth
This is exactly what I need! I really would like to see the code! Thank you!
B
23
S
2
G
4
Posts: 36
Reputation: 2,822


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests