Full tilemap vs custom object placement map

Hi, does anyone here have some experience or opinion that want to share with me?
Im planing to start working on one really big scale game and i choose to try my luck with phaser.

The game will have a couple of maps like inside houses, village, forest etc… like every other to say “pixel art” retro game. Something like stardew valey map.

What i never liked in games like that is patterns that map design follows and that follow grid for example, road, object placement. You can basically see that everything is placed with tile grid.

I have plan to design full map in photoshop and use as a background image, all trees, houses and things that go above player will go on another layer and be placed on map. I will use deep sorting, and place on some places zone or rect to block path or start event. I saw an example with 40.000 body collision and its working fine. I will probably dont have more than 500-1000 objects on map.

Same thing just easier can be done with simple tilemap.

What im worry about if i go with my approach should i worry about performance or tilemap is superior for that?

I think only a huge background image would be a problem.

Agreed, I think a large image could become a problem quickly. I’m not sure if rendering the image is going to be expensive, but you will easily run into limitations with the texture size (the max size is hardware-dependent, but somewhere around 2048x2048 or 4096x4096 is a good estimate). If you want decent performance, you will have to cut the image into chunks and cull them (or just create/destroy them dynamically) as the player moves around. This is effectively how tilemaps work and remain performant even for large maps. You also have to be careful with the memory used by all of the images.

On another note, have you considered the logistics of this idea? Exporting the separate layers from Photoshop, creating their tile bodies, and editing the maps are among the details you should figure out, especially when scaled to a large game. Ensuring all of the bodies are placed correctly and consistently is another difficulty of this approach - unlike a tilemap, you can’t make one set of working tiles.

1 Like

I will do test first but i will probably go with the tilemap.
One of the possible solutions are that i need to test first, would be to design 1024 or 2048 map in photoshop. I already did this for a couple of requests of game devs i had before as a freelancer.
To use photoshop script and export tile data into json, i also have scripts for ps to map grid and set which tile is solid or trigger some event. Then phaser can use tilemap but whole background as spritesheet for mozaik tile placement. In that case that would not be a problem?

maybe you can try Phaser Editor for creating the map :slight_smile:

I already try phaser editor but I found out that phaser editor support only Tiled map and i really dont want that because of limitation that tiled have. (i really want sick looking map something like graveyard keeper).

Phaser suport only tiled map and csv map, they have some custom json maps but from what i saw you can create only 1 layer. Correct me if im wrong, im new to phaser.

About the phaser editor i will continue to look at them because i think its going to be really nice tool if they add tilemap creator like in unity. That would be game changing experinace in industry.

I will write my progress with this in case that someone in future have similar problem like me.

Right now i decided to go with photohop created map. To test first. I will write script and extension for photoshop (i will post that also in case that someone need it) for creating tilemaps. I will mark red what is solid and blue what is zone to trigger some event same like in tiled. Then map will be expored into json and phaser will load like mosaic only one layer (i really dont know if phaser can create multiple layers with tilemap without tiled, i tried but i couldtn do it, only solution is to copy tiled json structure but i dont need that because im not using spritesheet assets, i use bacground).

Hi!

It would be great if I can understand better what’s your workflow. I mentioned Phaser Editor because it is a good complement to Tiled maps. The pattern is: you create in Tiled the grid-part of the world, and create in Phaser Editor the object layers.

The Scene Editor of Phaser Editor allows importing the Tiled map and adding other layers with the objects. The advantage of creating the objects with Phaser Editor is that you can create reusable assets and behaviors, using prefabs and user components.

You can take a look at the Sunny Land project template in the editor.

1 Like

Thank you for directing me. I tried once phaser editor and thats why im stopped learning that.
Now i take a look again and i see a lot of improvement and maybe the solution for what i need.

I will definitely dig into phaser editor for the next couple of days and see what i can learn.

I was always more coding guy and writing everything from zero line by line, but i see that phaser editor can speed up that process. I just need to learn how to use it.

That’s great! I invite you to the discord server: https://discord.gg/CPcESpQHth
A community around the editor and I can help you on any issue. Also, feedback is very appreciated!

1 Like

Thank you, i will join.

Since i dont have deadlines and i want to make one large scale game with my team, i want to try go with phaser instead of unity (i really like to challenge myself and try new things) i will start learning phaser editor for next couple of days/weeks and see if i can stick to it :slight_smile:

1 Like

Update:

i spend whole day yesterday and today to look at phaser editor 2d tutorials, playing and testing demo and i find it amazing. I will still continue in this week to play with it. I decide to abandon my idea of using photoshop for level design and ps script to export and to use phaser editor 2d only.

Instead of creating full map in photoshop i will prepare nice looking spritesheet with variations in texture packer and create level design in phaser editor 2d.

Im just concerned about one thing and thats performance. Im still not going to use tilemap but i will use spritesheet to place object on map. I really wonder what is best aproach tilemap vs spritesheet so i need to test.

Using tilemap you are bound to grid and all assets needs to be prepared acroding to grid and you will see a lot of repetion and grid patterns and i want to escape that.

Using spritesheet all map objects as one image sprite and place them as image on map, also using tileSprite if i have repeating pattern is at some point same if tilemap have a lot of tile variation (i read this on unity forums but i dont know about phaser3). People are saying if your map is not big sometimes sprite placement can be even faster than tilemap.

I will see how that will impact on performance and big level design, i will probably need to use bliter and load only object that are in camera. Sprites vs tilemap.

Here screenshot of some random assets that im playing with, creating level in phaser editor 2d without tilemap.

i dont know about the performance but you can make really deatiled things using phaser editor 2d

image

For walls you just need to set tileSprite and check assets and you can make whole wall with just one click and one object. Using prefabs i already found something really cool. For example you create prefabe for light and user component for light and its done! Just drag and drop your light physics/effect torch assets and you have whole game done with light without messing up with code again.

Haha that’s great! Your levels are beautiful! I’m not an expert on the Phaser renderer at all, but I think it uses balanced tries for rendering only the objects that are visible by the camera. I think the best is if you create a large level with physics included and check the performance. If you face any issue with the editor, I can support you and find a solution. Good luck!

1 Like

Thank you, right now im just playing placing random items in large quantity and its working fine. If i see that something is not okay i can always try and use bliter and texture for render. But i think i will not need that. So far with a lot of objects its working really good.
But true answer i can get only when i add more npc, more layers of effects and world logic.

If i found no issue i will go full phaser licensed editor because my teammates are not programmers like me and good thing is when i prepare fully project, write logic, add components and code stuff they can use phaser editor and design levels and everything other with from world logic, npc, events with no knowledge of programming and that will speed up the whole project drastically!

1 Like

Yeah! That’s the way! You can prepare prefabs and user components for them and create an in-house framework. For the next release I want to add reusable scene scripts, for common “global” behaviors.

1 Like

I cant wait to see future updates. Phaser Editor 2d can really become something big like construct or unity one day. Possibility for future updates are endless!

1 Like

Thanks!