Closed lawrencebrooks closed 7 years ago
This seems a great feature to have in the main branch. It seems there is no reason not to merge?
Could you revise this modification? I still didn't merge it since I never looked in this part of the Uzebox repo, and well, it was up even before I gained admin rights here. If you using GConvert like this feature, then I would just merge it (does it change the interface, I mean would it impact users not being aware of this modification?).
Would you like me to revise or review it? I don't mind making some changes if you feel some is required. This feature was built to not interfere with existing functionality. So a user not being aware of this feature, won't notice the difference. I've used this feature for Iros actively until very recently so the code shouldn't be stale (I don't think gconvert has changed at all recently).
One change that could perhaps be made is to change the terminology from 'Megatile' to 'Metatile' which seems to be a more standard way of referring to this type of feature.
Let me know what changes you would like to see and what tests I can perform to ensure you are comfortable with merging this in.
If and when everyone is happy and this feature is merged, I will follow this up with a wiki entry.
OK, merged. Just had to ask since it was a little old, so to know whether it is all right and up to date!
I've implemented mega tile compression in the gconvert tool. This allows a user to define a big level map that would normally be too large to be practical (eg. when doing big scrolling levels). The tool will then automatically create a 'mega map' with de-duplicated mega tiles. The original level map will then index the mega map instead of the tile map. The mega map in turn indexes the tile map. . Now you can draw out your entire scrolling level in your favorite graphics editor and gconvert will perform this compression for you automatically on request. Below is an example configuration and conversion. I hope the community finds this useful.
Example conversion: ...
#define MAP_LEVEL_6_WIDTH 8
#define MAP_LEVEL_6_HEIGHT 5
const char map_level_6[] PROGMEM ={
8,5
,0x0,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0x0,0xa,0xb,0x0,0x3,0xc,0xd,0xe,0xf,0x10
,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x6,0xc,0x1d,0x3,0x1e,0x1f,0x3,0x20``};
#define MAP_EXTRA_MEGA_TILES_MEGA_TILE_WIDTH 4
#define MAP_EXTRA_MEGA_TILES_MEGA_TILE_HEIGHT 5
#define MAP_EXTRA_MEGA_TILES_MEGA_TILE_COUNT 33
const char map_extra_mega_tiles[] PROGMEM ={
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1d,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x1d,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
...The code has been tested and works fine.
I've replied to the gconvert forum post on this topic: http://uzebox.org/forums/viewtopic.php?f=6&t=639&p=17561#p17561