instinct / GameFroot

GameFroot iOS and Bundlenator
www.gamefroot.com
5 stars 0 forks source link

the Map Width and Map Height level properties can cause the browser to become unresponsive because build_canvas is "heavy" #298

Closed nunomorgadinho closed 12 years ago

jmgomezg commented 12 years ago

This is an issue as well on the iPhone engine, big maps makes loading slow and increases memory used, I would recommend we limit the size, right now the default I think is 60x60, I probably will use as max, or maybe 100x100, but definitively we need to limit or someone would be able to make a 1000x1000 map that will make the game crash.

marsh0lion commented 12 years ago

This is something that we'll need to explore for next release. I want to re-engineer the way the terrain tiles are handled in the editor (which would speed the editor up considerably). Still this is an issue we'll need to talk through

jmgomezg commented 12 years ago

But I will limit the max map size, bear in mind the limited memory on phone devices compared with computers. And since we can now load another level using robots scripts, if we need a big level we could just split in separate levels. Only way to support massive levels would be to load in parts, or load only active areas, but that will ruin the play user experience from my experience, with lags on the game play.

marsh0lion commented 12 years ago

Could you let us know what a sensible tile limit would be for the iPhone. I've been playing with a 300x300 level on my dev (granted I haven't added too many items or enemies yet), and it runs smoothly in the level editor and flash player.

jmgomezg commented 12 years ago

The limit on the iPhone is mainly the memory, much limited on this devices. Bear in mind we started this with a fixed map size (60x60) where the size was not an issue. Since you guys recently changed to a dynamic map size, this is an big concern, since the iPhone is loading the whole map. Alternatively we would need to re-factor the base engine to me bit more dynamic (ideal candidate is a class called HKTMXTiledMap) which will require quite a bit of coding.

marsh0lion commented 12 years ago

The default size is still 60x60 (but the user can still changed it). I'm asking for a sensible size (preferably in a number of tiles) so that I can limit this in the level editor. From what I can tell the flash player could easily handle well over 100,000 tiles (assuming they are not animated or have robots attached), the level editor handles around 40,000 (200x200) with no apparent slowdown (I'm thinking of setting that to be the limit, unless you let me know that the iPhone can't handle that).

jmgomezg commented 12 years ago

I'm sure iPhone versión can deal with 40,000 tiles, but will make a test tomorrow.

El 23 Mar 2012, a las 00:44, marsh0lion reply@reply.github.com escribió:

The default size is still 60x60 (but the user can still changed it). I'm asking for a sensible size (preferably in a number of tiles) so that I can limit this in the level editor. From what I can tell the flash player could easily handle well over 100,000 tiles (assuming they are not animated or have robots attached), the level editor handles around 40,000 (200x200) with no apparent slowdown (I'm thinking of setting that to be the limit, unless you let me know that the iPhone can't handle that).


Reply to this email directly or view it on GitHub: https://github.com/instinct/GameFroot/issues/298#issuecomment-4650896

marsh0lion commented 12 years ago

Cool, I've set the limit to 50000 tiles.