Mirage Engine
[MS4] Supporting multiple Tilesets per map - Printable Version

+- Mirage Engine (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: [MS4] Supporting multiple Tilesets per map (/showthread.php?tid=2454)



[MS4] Supporting multiple Tilesets per map - Nean - 25-12-2008

How can I do this? GIAKEN told me a little bit, but I'm still in the dark. I'm not planning on making some shitty mixed tilesets game, in fact I have some pretty good tiles, I just need to know. Thanks


Re: [MS4] Supporting multiple Tilesets per map - Labmonkey - 25-12-2008

It depends how you want to do this. The logical way would be to add variables to the rec.

like if your layers are ground, mask, animation, fringe; add groundtileset, masktileset, animationtileset, fringetileset.

This is how Elysium does it, you can rip some of thier code if you must..
OR

calculate how many tiles are in your tileset. Then when drawing, if the number is over that many tiles, subtract it, and go to the next tileset. This will cause less packetlag, but more ingame drawing lag. I suggest the first way, though if you optimize the second (only convert after you get the packet) it will be slightly better. But not noticeably. Do the first way Wink.


Re: [MS4] Supporting multiple Tilesets per map - Nean - 25-12-2008

So If I had two tilesets I would add

Tileset1 As Byte
Tileset2 As Byte ?

What'd I do after that? Is that all?


Re: [MS4] Supporting multiple Tilesets per map - Matt - 26-12-2008

You should use an array.


Re: [MS4] Supporting multiple Tilesets per map - GIAKEN - 26-12-2008

No you don't have to use an array. There's already an array set up with the tile set surface. All you do is add GroundSheet, FringeSheet, etc etc...then when blting instead of Map.Tileset do GroundSheet, MaskSheet, etc...


Re: [MS4] Supporting multiple Tilesets per map - Matt - 26-12-2008

*shrugs* The method he was doing, was wrong. He should use the current array.

Good job on saying I'm wrong then proving me right. Tongue


Re: [MS4] Supporting multiple Tilesets per map - GIAKEN - 26-12-2008

I'm confused why and how you want to set up an array.


Re: [MS4] Supporting multiple Tilesets per map - Matt - 26-12-2008

Nevermind dude. Lol.


Re: [MS4] Supporting multiple Tilesets per map - GIAKEN - 26-12-2008

Alright.