large tile maps

For questions about using Classic.

Post » Sun Nov 14, 2010 9:18 pm

Has anyone figured out how to effectively make large alterable array based tile maps?
Like 500X500,
{So 250,000 objects}
without the fps dropping to around 4
B
6
S
2
G
5
Posts: 249
Reputation: 2,323

Post » Sun Nov 14, 2010 10:25 pm

I think your only option for something like that is to lower the tile count by only creating sprites when they are on screen. A virtual map kept in the array basically.
You can also lower the tile count by pasting them into a canvas.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Sun Nov 14, 2010 11:08 pm

this is kind of what i was thinking of making: [url:5ubohd4j]http://www.youtube.com/watch?v=nHLkVyctac0&feature=related[/url:5ubohd4j]

if i just drew the tiles on screen, collision detection and path-finding wouldn't be able to happen else were.

and if you used the canvas object to paste tiles that change type, wouldn't you have to remake all the tiles and paste the current changes. I assume that would just cause massive dips in fps
B
6
S
2
G
5
Posts: 249
Reputation: 2,323

Post » Sun Nov 14, 2010 11:36 pm

[quote="Bartosh":3akgrqcg]this is kind of what i was thinking of making: [url:3akgrqcg]http://www.youtube.com/watch?v=nHLkVyctac0&feature=related[/url:3akgrqcg]

if i just drew the tiles on screen, collision detection and path-finding wouldn't be able to happen else were.[/quote:3akgrqcg]

Well you would have to keep track of that in the array using another method other than collision detection... virtually.

[quote:3akgrqcg]and if you used the canvas object to paste tiles that change type, wouldn't you have to remake all the tiles and paste the current changes. I assume that would just cause massive dips in fps[/quote:3akgrqcg]

Not really, canvas is very fast, but you would have to do some sort of quadrant scrolling.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Mon Nov 15, 2010 12:06 am

quadrant scrolling is an interesting solution.

i was thinking since the only tiles that have collisions are on the edges of the terrain. i could just have the edges persistent and have the rest kept in the array, drawing those when the screen is near, or draw them to a canvas.

wish i could just drop the tiles all together and just use the canvas, problem with that is there seems to be no efective way to save a canvas. :?
B
6
S
2
G
5
Posts: 249
Reputation: 2,323


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests