How do I spawn predefined level blocks?

Get help using Construct 2

Post » Wed Oct 14, 2015 12:29 pm

I am currently building an endless runner that should spawn predefined level blocks.

Current situation:
I have a layout which contains all the level blocks as separate tilemap objects, so that I can call them separately.
There are several problems with this solution:
1.) For every different behaviour (collision, solid etc) I need to create a new tilemap object and lay it over each other. This results in a huge amount of objects which are difficult to manage
2.) The level blocks need different graphics depending on various factors. Tilemaps cannot change graphics on the fly. Again, I would need to create a new set of tilemaps for every level theme which is not doable.

I am pretty sure that there is a well known way to handle situations like this. Any ideas?
B
7
S
1
Posts: 41
Reputation: 525

Post » Wed Oct 14, 2015 6:33 pm

You should make a map editor , and pre make all of your pieces. Then you can save them as JSON format, so you can quickly re-draw the patterns.
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Thu Oct 15, 2015 9:09 am

Hi jojoe,

thanks for your reply.
Would that solve my problems? Can I specify a tilemap behaviour and .png inside a Json?
Do you have any links where tilemap+Json workflow is explained? Didn't find anything helpful about this topic.
B
7
S
1
Posts: 41
Reputation: 525

Post » Thu Oct 15, 2015 9:17 am

You could load data from json into an array and set the tiles of the tilemap based on the array-data?

You don't need to specify the tilemap or the png inside the json, for it would only contain the number of each tile that should be placed.
The tilemap object itself would already be there.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Oct 19, 2015 12:41 pm

Thank you guys,

however, can't figure this out since there is no info about it to find at all.
Guess I am going to workaround the problems.

thanks anyway
B
7
S
1
Posts: 41
Reputation: 525


Return to How do I....?

Who is online

Users browsing this forum: bluesun66 and 3 guests