Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Hand-drawn levels for a platformer in Phaser. The complications and theory


kriket
 Share

Recommended Posts

I am going for quality over quantity and hand-drawing my level. Since I am targetting mobile, I can't make any individual background image (which will not be a tiling sprite as its gorgeously unique artwork and not intended to be seamless), bigger than 4096px or else it will lag on mobile. So instead, I am going to make several of these background sprites and position them side by side to form my hand-drawn artsy level. The world size will be around three such backgrounds so 4000x3 = 12000 px. I am also going to utilize states heavily since states release resources and deal with garbage collection, etc. States won't be different levels. Just extension to the 12000px of level1. So stage2 could be further 12000px of level 1 (making level1 24,000px long over two stages). Anyway, the point of multiple stages but same level is to release resources and memory. 

 

Any other things I need to consider? Will this work?

 

 

 

 

 

Link to comment
Share on other sites

It has already been discussed here (I haven't searched where and when).

I'm interested in your game, i hope you'll give us news about it.

 

I would suggest making smaller tiles for your backgroup since 4000 is already huge:

Since the game will potentially have to load 4 tiles at once (when you are near the end vertically and horizontally), then if the tiles are 4000x4000 it'll be 4000*4000 * 4 to manage and that's huge.

Link to comment
Share on other sites

It has already been discussed here (I haven't searched where and when).

I'm interested in your game, i hope you'll give us news about it.

 

I would suggest making smaller tiles for your backgroup since 4000 is already huge:

Since the game will potentially have to load 4 tiles at once (when you are near the end vertically and horizontally), then if the tiles are 4000x4000 it'll be 4000*4000 * 4 to manage and that's huge.

 

Yeah, srry I forgot to delete this. I tested it and it works well on mobile even with 3000x600 images and three of them. But for my actual game I will obv not go this crazy. But still, phaser's object culling removes the other two images that are not in view so it pays off to go slightly larger than your intended screen-size I think. 

Link to comment
Share on other sites

If you don't use squares for platform it could be a bit of a pain, but you can create collision detection with bitmap data, not that its more efficient but this would allow you to draw maps pretty easily.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...