2
\$\begingroup\$

I'm building a game using Tiled tilemap editor.

I was originally creating tilesets to stamp around and create my map in Tiled.

Id prefer to create the base map in a Adobe Illustrator and stamp in the whole map as the level. Then stamp in trees or whatever on more layers as needed.

What are the implications on performance doing it this way vs creating the tilemaps and stamping them in tiled?

Example:

Tile:

enter image description here

Stamped Map:

enter image description here

\$\endgroup\$
  • \$\begingroup\$ I'm not sure there are any real implications on performance by doing this. The thing that sticks out most in my mind is the amount of work you'll be doing to add your own level loader/layout code. Compared to using the Tiled map loader, which already exists and is functional. Are you prepared to reinvent the wheel? Is it really necessary? \$\endgroup\$ – Jason Oster Jan 18 '16 at 4:55
  • \$\begingroup\$ @JasonOster Thanks for the response Jason. I think there is confusion. I am still using Tiled. Instead of creating the map using tiles in Tiled, I'll create the entire map in some multiple of 64px (6400 x 6400 Illustrator canvas size) then save it as png and import into Tiled. Then I can just stamp the map there. \$\endgroup\$ – Growler Jan 18 '16 at 5:12
  • \$\begingroup\$ I see. That sounds like just a manual step for a feature that melonJS can automate for you: melonjs.github.io/docs/me.sys.html#preRender \$\endgroup\$ – Jason Oster Jan 19 '16 at 22:05
1
\$\begingroup\$

Having a huge image for your map will take more texture memory than a tileset would. Assuming a 32bit color depth, a 6400 x 6400 px map will take 156 MB of texture memory. Not much for PCs and consoles but might be too much for some low-end mobile devices.

But drawing it will be slightly faster because you don't need to iterate tiles but can just blit from the original image (assuming your graphic engine is actually doing this and isn't stupidly blitting it tile by tile because the TMX file says so).

\$\endgroup\$
0
\$\begingroup\$

As the other answer mentioned it will take more memory to use but will be faster to render... that being said why not use a combination of both?

What I mean by that i sthat you could draw out the level using a very specific colour palette then when the level loads (or using a tool then saving the result) you could generate a map using the pixel colour of the full map as a guide for what tiles place in the actual game. So a green pixel could be grass, a grey one a road etc..

With a bit more logic you could place small variations of tiles so that the map looks better without having to do much more work or even create rules so that when a pixel is surrounded by X tiles of the same type it uses a different tile which is more related than the basic one. E.g. a basic tile could be short grass while a tile that is surrounded by 6 tile of the same type is long grass. It could also help make transitions between terrain types smoother (depending on what is required).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.