Sonic and Sega Retro Message Board: Sonic Metatiles - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Loading News Feed...
 

Sonic Metatiles For those who might want them...

#16 User is offline Screwdriver 

Posted 02 December 2010 - 06:37 AM

  • Doesn't do wood.
  • Posts: 115
  • Joined: 01-December 10
  • Gender:Male
  • Project:Timey-Wimey detector.
  • Wiki edits:1
Wow, these are really handy to have, not only for mapping, but I wanted to make myself a Casino Night Zone iPod background. Thanks for doing this.

Also, it's really interesting to me to see how the tiles are layered.

#17 User is offline Mercury 

Posted 02 December 2010 - 11:09 PM

  • His Name Is Sonic
  • Posts: 1605
  • Joined: 13-November 08
  • Gender:Not Telling
  • Location:Location Location
  • Project:AeStHete (Sonic Time Twisted engine)
  • Wiki edits:130
QUOTE (Sonica @ Nov 30 2010, 11:26 AM)
Pretty nice Mercury, but it'd be great if you could have provided ones with 0% alpha backgrounds =/

You're right, this was a silly oversight on my part. I've figured out how to get them to export with transparency now, so future packs will have this. I'll also redo the first three as soon as I can.

I'm still working on the "accurate palette" thing.

#18 User is offline tokumaru 

Posted 03 December 2010 - 10:24 AM

  • Posts: 576
  • Joined: 17-June 07
  • Gender:Male
  • Location:Rio de Janeiro
  • Project:Platformer for the NES
Awesome, Mercury! I think it's great that you are considering everyone's needs, and I'm sure that a lot of us will find these even more useful once the images have transparency and indexed palettes. Thanks!

#19 User is offline nineko 

Posted 03 December 2010 - 10:58 AM

  • I am the Holy Cat
  • Posts: 5238
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251
That is yet another great advantage of using 8-bit palettized PNGs: adding transparency is the easiest thing ever. You can pick as many palette indexes as you want and set them to be transparent. If I'm not mistaken you'll need 4 transparent colors, at indexes 0, 16, 32, and 48 (the first color of each palette line). There, it's as simple as that.

#20 User is offline Varion Icaria 

Posted 03 December 2010 - 03:19 PM

  • He's waiting....
  • Posts: 975
  • Joined: 26-August 03
  • Gender:Male
  • Project:S4: Cybernetic Outbreak
  • Wiki edits:1
QUOTE (nineko @ Dec 3 2010, 10:58 AM)
That is yet another great advantage of using 8-bit palettized PNGs: adding transparency is the easiest thing ever. You can pick as many palette indexes as you want and set them to be transparent. If I'm not mistaken you'll need 4 transparent colors, at indexes 0, 16, 32, and 48 (the first color of each palette line). There, it's as simple as that.

That I did not know was possible with PNG, If that's the case it would make level designing a bit more easier through PSPXI.

#21 User is offline Techokami 

Posted 03 December 2010 - 04:26 PM

  • For use only on NTSC Genesis systems
  • Posts: 939
  • Joined: 19-November 05
  • Gender:Male
  • Location:HoleNet!
  • Project:Sonic Edge
  • Wiki edits:63
QUOTE (Mercury @ Dec 2 2010, 09:09 PM)
I'm still working on the "accurate palette" thing.

What language is your exporting tool written in? I can help you with calculating the palette data to be more accurate.

#22 User is offline Endri 

Posted 03 December 2010 - 08:30 PM

  • Officer I don't have my drivers license with me. Can I give you something else?
  • Posts: 1757
  • Joined: 18-November 08
  • Gender:Male
  • Location:São Paulo, Brazil
  • Project:Something special...
  • Wiki edits:7
QUOTE (Techokami @ Dec 3 2010, 07:26 PM)
QUOTE (Mercury @ Dec 2 2010, 09:09 PM)
I'm still working on the "accurate palette" thing.

What language is your exporting tool written in? I can help you with calculating the palette data to be more accurate.
Techokami's assistancy could be handy. He's really good with metatile ripping.

#23 User is offline Tribeam 

Posted 04 December 2010 - 09:26 PM

  • Posts: 55
  • Joined: 08-January 07
4 days ago I was assigned "build an application of your choice on the stuff you've learned so far" as homework for school, and I finished my project today, (do by Tuesday)

So I was trying to think of something to make, but nothing came to mind, and I was searching through the forums like I usually do, and seen this thread and it clicked, "I'll use these tiles for a level viewer".

And so I did that.


This probably has absolutely no use to anyone but I figured I'd share my app with the Sonic community.

With out further ado...

The Sonic Level Viewer:
(hope the image isn't too big, I have a really high resolution)


This doesn't read through ROM files, the layouts were dumped into bin files and are loaded from hard drive, then it loads the Metatiles created by Mercury.

Everything you need is in the zip(so you don't need anything)
Download

Enjoy.

EDIT: I forgot to mention that it requires .net 2.0.

EDIT2: oh and the code is a mess, and the way I rendered it is shitty and probably lags for some people.
This post has been edited by Tribeam: 04 December 2010 - 09:58 PM

#24 User is offline Mercury 

Posted 05 December 2010 - 05:09 AM

  • His Name Is Sonic
  • Posts: 1605
  • Joined: 13-November 08
  • Gender:Not Telling
  • Location:Location Location
  • Project:AeStHete (Sonic Time Twisted engine)
  • Wiki edits:130
QUOTE (Techokami @ Dec 3 2010, 10:26 PM)
QUOTE (Mercury @ Dec 2 2010, 09:09 PM)
I'm still working on the "accurate palette" thing.

What language is your exporting tool written in? I can help you with calculating the palette data to be more accurate.

Embarrassingly, Game Maker.

Basically it exports 32bit BMPs, and this is the GM default so I can't do anything about it. I then convert each file using ImageMagick to a PNG.

It's pathetic really. However, if I knew the format of the right type of PNG I could write the files binarily and skip all the rigmarole. I'm not sure there's any other way to be absolutely certain each tile has the correct palette in the Mega Drive order even if all those colours aren't present in the tile.

#25 User is offline nineko 

Posted 05 December 2010 - 07:22 AM

  • I am the Holy Cat
  • Posts: 5238
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251
If you have to write an image file in the good old binary way I don't recommend you to do so with a PNG file, because the format is a bitch (it's compressed and filled of checksums everywhere). I'd rather write a PCX file, which is billions of times easier. The palettes would be correct and sorted, though you won't be able to add transparency. Not a big deal, you can batch convert the files from 8-bit PCX to 8-bit PNG (making sure to use a converter that preserves palette indexes) and then massively add the "tRNS" chunk to the PNG, since it will always be the same for all the files as the transparent palette indexes are always the same (0, 16, 32, 48 iirc). Brutally adding a chunk to a PNG doesn't affect the checksums so you can totally do it. I'm up to help if you want.

#26 User is offline Techokami 

Posted 05 December 2010 - 10:27 AM

  • For use only on NTSC Genesis systems
  • Posts: 939
  • Joined: 19-November 05
  • Gender:Male
  • Location:HoleNet!
  • Project:Sonic Edge
  • Wiki edits:63
QUOTE (Mercury @ Dec 5 2010, 03:09 AM)
QUOTE (Techokami @ Dec 3 2010, 10:26 PM)
QUOTE (Mercury @ Dec 2 2010, 09:09 PM)
I'm still working on the "accurate palette" thing.

What language is your exporting tool written in? I can help you with calculating the palette data to be more accurate.

Embarrassingly, Game Maker.

Basically it exports 32bit BMPs, and this is the GM default so I can't do anything about it. I then convert each file using ImageMagick to a PNG.

Oh. I've been using PHP, because the GD libraries are actually quite handy, and work with paletted APNG images.
I should really update my tool to spit out priority-based images as well. But I should also figure out why the hell I can't get 16x16 tiles to properly transform with Sonic 1... mind helping me out with that? The wiki is useless in that regard. (transform in this case means the flip X/Y bits)

In the meantime, here's some code for calculating a Genesis palette entry. It's in PHP, but I'm sure that you can port it to GML:
CODE
$color = getByte($source);
$color2 = getByte($source);
// Genesis pallete entries are words - 0B GR
$red = 17 * ($color2 % 16);
$green = 17 * floor($color2 / 16);
$blue = 17 * ($color % 16);


#27 User is offline nineko 

Posted 05 December 2010 - 01:09 PM

  • I am the Holy Cat
  • Posts: 5238
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251
QUOTE (Techokami @ Dec 5 2010, 04:27 PM)
CODE
$color = getByte($source);
$color2 = getByte($source);
// Genesis pallete entries are words - 0B GR
$red = 17 * ($color2 % 16);
$green = 17 * floor($color2 / 16);
$blue = 17 * ($color % 16);
Yes, that's correct according to what we know.

#28 User is offline MainMemory 

Posted 05 December 2010 - 01:13 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 2678
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
Actually, IIRC GerbilSoft later told me that the answer in that thread is not the correct one.

#29 User is offline nineko 

Posted 05 December 2010 - 01:16 PM

  • I am the Holy Cat
  • Posts: 5238
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251
QUOTE (MainMemory @ Dec 5 2010, 07:13 PM)
Actually, IIRC GerbilSoft later told me that the answer in that thread is not the correct one.
You mean this?

#30 User is offline MainMemory 

Posted 05 December 2010 - 01:17 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 2678
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
He told me on IRC I think, but yeah.

  • 4 Pages +
  • 1
  • 2
  • 3
  • 4
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users