Mirage Source http://www.miragesource.net/forums/ |
|
[MS4] Supporting multiple Tilesets per map http://www.miragesource.net/forums/viewtopic.php?f=201&t=4886 |
Page 1 of 1 |
Author: | Nean [ Thu Dec 25, 2008 9:42 pm ] |
Post subject: | [MS4] Supporting multiple Tilesets per map |
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 |
Author: | Labmonkey [ Thu Dec 25, 2008 11:17 pm ] |
Post subject: | Re: [MS4] Supporting multiple Tilesets per map |
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 . |
Author: | Nean [ Thu Dec 25, 2008 11:57 pm ] |
Post subject: | Re: [MS4] Supporting multiple Tilesets per map |
So If I had two tilesets I would add Tileset1 As Byte Tileset2 As Byte ? What'd I do after that? Is that all? |
Author: | Matt [ Fri Dec 26, 2008 12:08 am ] |
Post subject: | Re: [MS4] Supporting multiple Tilesets per map |
You should use an array. |
Author: | GIAKEN [ Fri Dec 26, 2008 1:07 am ] |
Post subject: | Re: [MS4] Supporting multiple Tilesets per map |
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... |
Author: | Matt [ Fri Dec 26, 2008 1:31 am ] |
Post subject: | Re: [MS4] Supporting multiple Tilesets per map |
*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. |
Author: | GIAKEN [ Fri Dec 26, 2008 1:35 am ] |
Post subject: | Re: [MS4] Supporting multiple Tilesets per map |
I'm confused why and how you want to set up an array. |
Author: | Matt [ Fri Dec 26, 2008 3:45 am ] |
Post subject: | Re: [MS4] Supporting multiple Tilesets per map |
Nevermind dude. Lol. |
Author: | GIAKEN [ Fri Dec 26, 2008 3:53 am ] |
Post subject: | Re: [MS4] Supporting multiple Tilesets per map |
Alright. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |