PDA

View Full Version : SuperTux MD - Part 2



Archer
12-31-2012, 05:26 AM
I have some good news for the ones who remember my old thread about SuperTux MD (http://www.sega-16.com/forum/showthread.php?16956-SuperTux-MD). I want to thank all that helped me back then to get me going in creating this game, but i hit a big wall that i was looking up against. Manually converting all of the sprites!

The conversion progress basically consist of the following actions.
- Combine sprites in one big PNG
- Convert semitransparent colors into solid colors
- Scale to 50% of the original size
- Convert semitransparent colors into solid colors, again to remove anti-aliasing scaling artifacts
- Convert colors to MegaDrive/Genisis palette
- Reduce colors to fit one palette
- Export to VDP format (C source or RAW binary and palette)

I have found an awesome program called ImageMagic that will make most of these actions scriptable, meaning it is a lot less painful. An added advantage is that any possible license issues with the sprites can be avoided because they can be generated from the original "source". The resulting images also look a lot better than what i would be able to do manually.

Another improvement is i have started using version control software (GIT), and eventually will put SuperTux MD as open-source on github. First i have to figure out which open-source license i want to use.

I will upload a version once i have:
- Replaced the old sprites
- a walking animation
- a gameover animation.

It might take a month or more to reach this goal, so don't expect it too soon. :D

Kamahl
12-31-2012, 05:37 AM
Good luck with your project, I'd love to see SuperTux on the MD. Just remember to rename it MegaTux. :D

Zebbe
01-01-2013, 04:57 PM
I wish you the best with your project! If you need a publisher for your game when it's done, let me know and I'll get you a good one :).

Archer
01-08-2013, 02:30 AM
@kamahl: Thanks, but i don think i will be calling it that. I like the name i picked for it. :D
@Zebbe: I am not even sure if or when it is complete, i think there is always something to improve. I am not even sure if publishing on cart is possible since there are some GPL licenses restricting closed source use, and i already decided to go open-source. But it would be awesome to have a real SuperTux MD cart some day. :D

And here a little update on what i have been doing:
- Since github did not ask about a license, unlike google code, i have put my code on github. Consider it a work in progress.
- I have made a script that
- Combines the tux sprites into one large PNG
- Makes all colors solid
- scale to 50%
- make colors solid again
- Then a 5 step color reduction from {original colors} -> 1024 -> 256 -> 64 -> 32 -> 16 (this gives the best results in my opinion)

It took some time to figure out how to get the best results using only imagemagic from a shell script to do all of the above. The script is not yet complete and i still need to convert the remaining colors to genesis safe values. For speed i am doing that with a PHP script to translate the RGB colors into a color palette ready to be loaded into the VDP color registers. Then i need to extract the sprites and convert them into VDP compatible sprites using the generated palette.

I will try uploading the PNG i have so far later, it's not working for some reason at the moment. It worked now.

Happy new year.

Archer
01-09-2013, 05:11 AM
I have been thinking about a few things, and i think i have to use a predefined palette's. I have looked at the sprite sets for fire-tux and ice-tux and it took the colors needed for the hats from the shades of black and gray used for tux, making tux look less good. I want to keep tux's colors looking the same no matter what powerup is active. Getting the colors for the background and play field right is also going to be a challenge. I have deep respect for the graphic designers that have made some great looking games on the genesis with these extreme color limits.

Kamahl
01-09-2013, 09:05 AM
If you look at most genesis games that look good they all have a certain approach to it. Flink for example uses only a single palette for the player, enemies, spells, etc... But choses the colors of that palette very carefully.
Most ports look poor because such optimization can't be made.

Archer
01-09-2013, 10:42 AM
I have looked at a video of Flink, and the colors look great. Although in my opinion, only based on the video, is that the cartoon'ish style uses a lot of black around the sprites. Another example of good colors is Puggsy, Mickey Mania, Aladdin, The story of Thor (beyond oasis) and a few more i can remember right now.

I was planning on using one palette for tux, one for enemies, one for play field and one for the background. Do you have one or more examples of poor ports so i know what not to do?

Although i don't see SuperTux MD as a port since the game engine is written from scratch by me. I am not using any of the source code from the original game. But i am using the graphics and level designs, so i guess it could be called a clone of SuperTux. Usually clones are a bad thing but SuperTux ofcourse a clone of another well known game. So i am not sure which term i like better.

Kamahl
01-09-2013, 03:52 PM
I was planning on using one palette for tux, one for enemies, one for play field and one for the background.
That's probably the simplest solution, but it's not making very good use of the palettes.
For example, on an Ice Stage, you mainly need shades of blue, for both backgrounds and even some enemies. That's 1 palette for all of that. You now have 2 free palettes to do whatever you want.

Archer
01-11-2013, 06:28 AM
Thanks for pointing out to me those colors are mostly the same and using a single palette might be enough, but it's not my first priority right now. Before i optimize the use of colors i want to be able to generate the correct raw format of sprites and palettes for the VDP.

I am working on a script now that:
- uses ImageMagic to get the unique colors in an image
- convert these into VDP color levels
- remove duplicate colors, an effect of color reduction ofcourse
- create raw palette for the VDP palette format

This final palette will be used to recolor the sprites.

Black_Tiger
01-12-2013, 12:33 AM
That's probably the simplest solution, but it's not making very good use of the palettes.
For example, on an Ice Stage, you mainly need shades of blue, for both backgrounds and even some enemies. That's 1 palette for all of that. You now have 2 free palettes to do whatever you want.

Each palette still only contains 15 unique visible colors and the tiles and sprites each have two sets that any one tile or sprite is colored from only one of. They can't take colors from other palettes unless they're just duplicates of colors from other palettes. In which case it leaves fewer unique colors for their own palette.

For something like an ice stage though, you could get by with only 6 - 8 shades of blue. But it would still halve the number of non-blue colors any of those palettes have to use after that.

matteus
01-17-2013, 04:22 PM
I have been thinking about a few things, and i think i have to use a predefined palette's. I have looked at the sprite sets for fire-tux and ice-tux and it took the colors needed for the hats from the shades of black and gray used for tux, making tux look less good. I want to keep tux's colors looking the same no matter what powerup is active. Getting the colors for the background and play field right is also going to be a challenge. I have deep respect for the graphic designers that have made some great looking games on the genesis with these extreme color limits.

Are the palettes that restricted can't you just load a new palette when he becomes fire-tux?!?

Archer
01-18-2013, 08:38 AM
For something like an ice stage though, you could get by with only 6 - 8 shades of blue. But it would still halve the number of non-blue colors any of those palettes have to use after that.The "ice stage" which is actually called snow btw, also contains some black, gray-ish blue's and white. In the current demo i have only 7 colors for the stage, but originally there are some shadows that use different shades. I think i may end up with around 12-14 colors. I hope i have enough left to fit the background image in there too.



Are the palettes that restricted can't you just load a new palette when he becomes fire-tux?!?
Ofcourse loading a new palette when tux becomes fire-tux or ice-tux is what i will do. The problem is that i am converting all sprites to 16 colors separately, and some colors for tux are replaced with red for the fire hat. I need to decide which shades of black, grey, yellow and orange i want for tux and keep the number between 12-14 colors.

I tried using imagemagic to generate palettes on the fly, which is working, but the color selection i still have to do by hand. Which is what i am working on now. But the colors are all mixed up unsorted. so i need a way to sort them by rgb value. Think i have to write a script for that.

I do have the import_builder script doing the folowing:
- scale to 50%
- remove scaling artifacts (explained in earlier posts)
- reduce colors in 5 steps to 32 (or less if specified, i use 24 now)
- create an "image_pack" containing all sprites of a set in one image
- create a palette image with only unique colors, normalized to VDP levels
- remap colors to specified palette (disabled because of above problem)

I now want to make a selection of colors to define a palette for small tux, keeping in mind the big, fire and ice sprite sets. To make the selection easier i need to write a script that sorts the colors in the palette by rgb value. That way i can easily see what shades of colors are almost identical and can be removed. When i have this palette i am going to write another script that converts the PNG sprites into VDP sprites ready to be included into the game.