TMX map with ETC1 compression anyone?

  ... the case you feel the need for a new feature or want to submit one.

TMX map with ETC1 compression anyone?

Postby nazgee » Thu Jan 26, 2012 3:36 am

If you want to get TMX map that uses ETC1 textures instead of raw bitmaps, here is what you should do:

1# design your level as you do usual. When done, save your map.tmx somewhere
2# generate .pkm (compressed texture) from the regular tileset (.png/,jpg) you've used during the design
Syntax: [ Download ] [ Hide ]
Using c Syntax Highlighting
  1. etc1tool my-tileset-file.png --encode
Parsed in 0.001 seconds, using GeSHi 1.0.8.4

3# modify your map.tmx. source tag should now point to gfx/my-tileset-file.pkm compressed texture, instead of regular .png/.jpg
Syntax: [ Download ] [ Hide ]
  1. <image source="ggfx/my-tileset-file.pkm" width="1024" height="1024"/> 

4# apply my patch:
https://github.com/nicolasgramlich/AndE ... it/fae3599

and enjoy few times smaller textures used by your map :P
Last edited by nazgee on Sat Jan 28, 2012 11:18 pm, edited 2 times in total.
Dirt Rider Mayhem is PUBLISHED now!
Image
User avatar
nazgee
 
Posts: 527
Joined: Fri Oct 21, 2011 10:31 pm
Location: Poland, Wrocław

Re: TMX map with ETC1 compression anyone?

Postby Niffy » Thu Jan 26, 2012 3:18 pm

Saw this over on github. Nice one, it could come very handy in future, probably even included in the main branch
Niffy
 
Posts: 284
Joined: Sat Sep 17, 2011 8:39 pm

Re: TMX map with ETC1 compression anyone?

Postby chayfo » Fri Feb 03, 2012 3:26 am

Great job. However one small caveat, ETC1 doesn't support transparency. Still a very useful resource.
chayfo
 
Posts: 18
Joined: Thu Mar 10, 2011 2:27 pm

Re: TMX map with ETC1 compression anyone?

Postby nazgee » Fri Feb 03, 2012 9:05 pm

Oh yes, forgot to mention non-transparency in the first post. Thanks!
I use it only for the background/base layer (still quite significant saving on a 1024x1024 tileset) - it is not a problem in this case.
Dirt Rider Mayhem is PUBLISHED now!
Image
User avatar
nazgee
 
Posts: 527
Joined: Fri Oct 21, 2011 10:31 pm
Location: Poland, Wrocław


Return to Features

Who is online

Users browsing this forum: No registered users and 7 guests