Large Canvases drop fps

For questions about using Classic.

Post » Tue Feb 08, 2011 7:57 pm

having 1 large canvas(10000X10000+) has little to no effect on frame rate, but having 2 large canvas drops it to 15 fps.
Why?
And is there anyway to mitigate this?
B
6
S
2
G
5
Posts: 249
Reputation: 2,323

Post » Tue Feb 08, 2011 9:52 pm

A 10000x10000 canvas uses 256mb of ram. Two use 512. Don't do that, as it seriously limits the number of people who can play your game.

A canvas generally shouldn't have to be larger than the screen - what are you using it for?
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Wed Feb 09, 2011 1:01 am

well its actually 8000 X 6000

large world tile map, 200x 200 tiles each at the size of 40x30.

40,000 objects is just impossible. since there is no proper tile support , I figured creating at array x y, pasting to canvas, then deleting was the only option. didn't factor in my 4 year old computer being to cutting edge. (it probably is for a lot of people).

suppose your right. only way around is to dynamically generate the tiles based on the screen position. Maybe just keep the edges of the terrain persistent for path finding. but what a nightmare....
:(
B
6
S
2
G
5
Posts: 249
Reputation: 2,323

Post » Wed Feb 09, 2011 2:10 am

Why not 10 layouts @ 800 x 600?
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Wed Feb 09, 2011 4:07 am

its an RTS. so the world needs to be seamless

a large map in aoe2 was 255x255 tiles
so its not a unrealistic size for a rts.
B
6
S
2
G
5
Posts: 249
Reputation: 2,323

Post » Wed Feb 09, 2011 5:29 am

Ahh, well if your using the rts behavior, you might have some issues managing it dynamically.
You can maybe get path finding to cooperate with things on screen, but what to do with things off screen?
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Wed Feb 09, 2011 6:32 am

Use an array to store RTS elements (units, terrain). Only render what is supposed to be on screen.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Wed Feb 09, 2011 8:16 am

keeping an array for units or anything else isn't really necessary, unless i plan on writing my own A* path-finding algorithm using an array(that's not going to happen).

As I said, I could have the terrain be rendered according to the screen position and just keep the tiles at the edge of terrain for path-finding to navigate around. that should keep the tile-objects in the 1000-7000 range.
But it just seems cumbersome and inefficient.

for all the amazing things construct can do with such ease, the difficulty in using tile maps (something thats been a staple in 2d games since the 8-bit era) is ridiculous.
B
6
S
2
G
5
Posts: 249
Reputation: 2,323

Post » Wed Feb 09, 2011 5:26 pm

[quote="Bartosh":1r3q43wg]
for all the amazing things construct can do with such ease, the difficulty in using tile maps (something thats been a staple in 2d games since the 8-bit era) is ridiculous.[/quote:1r3q43wg]
All people who wants tiling feature, we should hire someone to write it :)
B
2
S
2
G
2
Posts: 158
Reputation: 1,366

Post » Wed Feb 09, 2011 6:27 pm

I would just like an object that never gets checked.

Don't get me wrong.A tiling feature/editor wold be nice, but it doesn't even seam possible to make your own from scratch.
B
6
S
2
G
5
Posts: 249
Reputation: 2,323

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests