How do I create an "infinity" map using tilemap

Get help using Construct 2

Post » Sun Oct 11, 2015 4:00 am

Glad it was useful. I'll take a look at what your capx tomorrow.

I thought of a simple way to save changes to the array.
Basically just change the tiles on the tilemap like normal, but when you do, set a Boolean variable to save that tilemap.
When that Boolean is set and before moving a tilemap that moved off screen, store that tilemap in a dictionary object.
With this key
X&" "y
And this value:
Tilemap.asjson

Then after moving check if the current tilemap position is in the dictionary. If it is, load that json. If it isn't call update.
That way only tilemaps that are changed are saved.

Enemies could be tricky if they're off screen since they would no longer have a tilemap to interact with. Two ways around that come to mind. One would be to put the object to sleep if offscreen. Another would be to maintain some tilemaps around the enemies, however this could prove complex.
B
94
S
33
G
113
Posts: 5,353
Reputation: 73,267

Post » Mon Oct 12, 2015 1:49 am

@kossglobal
You can improve the rendering speed of the tilemaps by setting "seamless mode" to off in the tilemap properties.
In addition to that set "pixel rounding" to on and "fullscreen scaling" to low quality.

Here's the latest of my capx that saves chunks that were modified.
https://dl.dropboxusercontent.com/u/542 ... lemap.capx
B
94
S
33
G
113
Posts: 5,353
Reputation: 73,267

Post » Mon Oct 12, 2015 7:53 pm

@R0J0hound

Awesome! Your example gave me some ideas on how to do other things as well. Thanks!
B
56
S
21
G
3
Posts: 602
Reputation: 6,612

Previous

Return to How do I....?

Who is online

Users browsing this forum: COGames, MadSpy, sean080 and 9 guests