Advanced Search

Author Topic: Tiles... they (usually) aren't that hard, guys.  (Read 35526 times)

0 Members and 1 Guest are viewing this topic.

October 17, 2014, 09:19:02 PM
Read 35526 times

Offline NemZ

  • MM8BDM Extender
  • ****
  • Date Registered: October 13, 2010, 03:00:53 PM

    • View Profile
Tiles... they (usually) aren't that hard, guys.
« on: October 17, 2014, 09:19:02 PM »
So I mentioned this briefly in my other thread, but I thought it might be good to put it here too and maybe answer a few questions for people who want to do this stuff for themselves.

Lesson 1:  Hardware Limitations

First, if you're going for accuracy you need to know how the NES actually handles graphics.  If you don't care about accuracy... well, at least you should know what limitations you're breaking so you know why it doesn't look quite right, or have some idea about just how much you're bending things.

The Nes has a very small palette of colors.  This one, specifically, though due to the way the colors were coded they would look slightly different depending on your tv so there is no one-and-only true palette that you can absolutely depend on.  I just stick with this version.



The way the NES processes graphics is that it places 8x8 pixel blocks into a grid to form the graphic base, then applies color palettes to them in 16x16 pixel blocks.  The graphics seem to be 16x16 in size because of this (and in practical terms for MM8BDM they probably should be anyway), but are actually put together from these smaller pieces which can thus be used in multiple places to create a lot of variety with minimal actual data.  Incidentally, the lack of color is the reason why the GB titles could get away with so many thin platforms to stand on.  It's actually the exact same graphics engine just with a single universal palette (or two for GBC, one for sprites and one for tiles).

The NES only actually uses four 3-color palettes + a background color they all have in common, which is usually (but not always) black.  Every 16x16 area has to fit one of these 4 available palettes... though the later games sometimes changed one of the palettes midway through the stage to broaden that range a bit.  The sky in Knightman, for example, or the train cars in chargeman.  In general though you should try and stick to just 4 per stage.  Also, you ever notice that as you walk forwards sometimes in the old games you can see the tiles are all one color then change quickly?  that's because they're all being applied with palatte #1 by default until the hardware finishes rendering them fully and assigns the correct 16x16 palette areas.

Sprites also have the same restriction by the way, though because they often use a black outline and white for highlights they often really only have one other color to work with unless you get into sprite layering.

I'll add more to this thread later, but if there are any questions on what's here so far let me know.

Edit:

Actually here, have a homework assignment as well.  Look at this tileset from the MM8FC guys and discuss amongst yourselves what is wrong (several things, actually):


October 17, 2014, 10:53:50 PM
Reply #1

Offline BookofDobson

  • Standard Member
  • Date Registered: September 05, 2014, 11:04:24 PM

    • View Profile
Re: Tiles... they really aren't that hard, guys.
« Reply #1 on: October 17, 2014, 10:53:50 PM »
But if you don't care about accuracy, what's the point of this?

And who made these tiles?

October 17, 2014, 11:30:40 PM
Reply #2

Offline Beed28

  • MM8BDM Extender

  • Putting the 'bounce' into your world.
  • ***
  • Date Registered: June 20, 2011, 08:07:58 PM

    • View Profile
Re: Tiles... they really aren't that hard, guys.
« Reply #2 on: October 17, 2014, 11:30:40 PM »
The MM8FC tileset doesn't even load here.

October 17, 2014, 11:53:15 PM
Reply #3

Offline Blutorus

  • MM8BDM Extender
  • *
  • Date Registered: March 07, 2014, 03:02:23 AM

    • View Profile
Re: Tiles... they really aren't that hard, guys.
« Reply #3 on: October 17, 2014, 11:53:15 PM »
Quote from: "NemZ"
Look at this tileset from the MM8FC guys and discuss amongst yourselves what is wrong (several things, actually):

[image]
One thing I noticed is that the tile with the red and green blinking lights uses more than 4 colors per palette, those being yellow, white, black (which I assume to be the background color), red, and green. You could get away with it if you had green and red not showing up at the same time, but if you really wanted those lights you'd have to do some sprite layer trickery.

Another thing is that even though the background color is black, the tiles for outside seem to use a light blue as their background color. This would be fine if all the other tiles also had their background color changed at the same time, or had them fade from blue to black, but when you put them together with the two independent colors, you get Clashfest 2014. I'm sure there's something else, though...

October 18, 2014, 02:07:30 AM
Reply #4

Offline NemZ

  • MM8BDM Extender
  • ****
  • Date Registered: October 13, 2010, 03:00:53 PM

    • View Profile
Re: Tiles... they really aren't that hard, guys.
« Reply #4 on: October 18, 2014, 02:07:30 AM »
My bad, must have hotlinked them the first time.  I rehosted the images so they should be fine now.

And here's the entire stage made with these tiles.  Might help spot some problems if you remember how Mega Man games work with screen transitions.

http://cdn23.atwikiimg.com/rockmanforte/?plugin=ref&serial=8

October 18, 2014, 03:51:24 AM
Reply #5

Knux

  • Guest
Re: Tiles... they really aren't that hard, guys.
« Reply #5 on: October 18, 2014, 03:51:24 AM »
Quote from: "BookofDobson"
But if you don't care about accuracy, what's the point of this?
Quote from: "Nemz"
If you don't care about accuracy... well, at least you should know what limitations you're breaking so you know why it doesn't look quite right, or have some idea about just how much you're bending things.
Quote from: "BookofDobson"
And who made these tiles?
Quote from: "Nemz"
Look at this tileset from the MM8FC guys
That aside, I used the MM8BDM palette to recolor some tiles for one of my maps. Now I am confused about whether that's legit or not as far as NES colors go.

October 18, 2014, 04:19:41 AM
Reply #6

Offline BookofDobson

  • Standard Member
  • Date Registered: September 05, 2014, 11:04:24 PM

    • View Profile
Re: Tiles... they really aren't that hard, guys.
« Reply #6 on: October 18, 2014, 04:19:41 AM »
Quote from: "Knux"
Quote from: "BookofDobson"
But if you don't care about accuracy, what's the point of this?
Quote from: "Nemz"
If you don't care about accuracy... well, at least you should know what limitations you're breaking so you know why it doesn't look quite right, or have some idea about just how much you're bending things.
Ech, didn't see that last part
Quote from: "BookofDobson"
And who made these tiles?
Quote from: "Nemz"
Look at this tileset from the MM8FC guys
Were they used for the actual maps in MM8DM? Just trying to make sure of something before I say it.
That aside, I used the MM8BDM palette to recolor some tiles for one of my maps. Now I am confused about whether that's legit or not as far as NES colors go.

October 18, 2014, 06:21:17 AM
Reply #7

Offline NemZ

  • MM8BDM Extender
  • ****
  • Date Registered: October 13, 2010, 03:00:53 PM

    • View Profile
Re: Tiles... they really aren't that hard, guys.
« Reply #7 on: October 18, 2014, 06:21:17 AM »
^No, they're for a mm&b game they started to do but did not complete.  The link I gave for the stage map is on the site where what little they did get done is kept.

I'll be back on Monday for part 2.

October 20, 2014, 12:42:19 PM
Reply #8

Offline Jdude330

  • Standard Member
  • Date Registered: July 22, 2013, 12:57:40 PM

    • View Profile
Re: Tiles... they really aren't that hard, guys.
« Reply #8 on: October 20, 2014, 12:42:19 PM »
too many colors at once, transition would cause too many colors to be onscreen at once,  the map is filled with ice spikes that defy the colors in the palate.

October 20, 2014, 11:03:59 PM
Reply #9

Offline NemZ

  • MM8BDM Extender
  • ****
  • Date Registered: October 13, 2010, 03:00:53 PM

    • View Profile
Re: Tiles... they really aren't that hard, guys.
« Reply #9 on: October 20, 2014, 11:03:59 PM »
Okay... first up, answers:
(click to show/hide)

Lesson 2: Planning and Preparation

The first step is obviously picking a map.  Any map will do, but it is MUCH easier when you have a full rip of the stage available.  Before doing anything else take some time to look at it, figgure out how it works and do some planning.  Analyze how the different scrolling room sections would be broken up and how that would affect palette limitations.  Keep a sharp eye out for places where a new palette is introduced suddenly and check if that's just using one that hadn't shown up before, if it's a reusing previous tiles but with a new palette applied, or if it's something more drastic that might require special attention.

For example, let's look at Knight Man's stage: (spoilered because it's kinda huge... might want to view that in a new tab)

(click to show/hide)

Okay, so at first glance this is REALLY colorful.  red/orange, green, another green, blue, purple, pink... lots of stuff going on here!  And that's not even getting into how the whole stage is given a makeover if you revisit later... which sadly (or fortunately?) I don't have a convenient pic of.  With this much color it's a sure bet some palate changes are going on.  So, let's walk through it and see what's what.

First screen gives us two different green block sections that will form the backbone of the whole stage, a bright orange sky and a bit of purple background wall peeking in.  That's 4 palettes right from the start... Capcom is just showing off here!  As you travel down into castle the sky disappears... a good sign that it's being reloaded to something else while we can't see it.  

Next there's an unusual horizontal transition and the purple goes away as well because there's a fancy Dustman-like crusher room, which is animated by scrolling the background tiles downward, hence the need to go to all black otherwise.  After another transition, the purple is back, but what has palette #4 gotten up to?

A lot, apparently!  The next room is just graphically fantastic.  Animated wheel tiles, animated flame tiles, and an enemy sprite which makes use of two different palettes (which is why it's the only thing in this room, much like a boss).  The wheels are the same old green and nothing else is flashing so we're looking at a tile replacement animation, but the flames are new and the parts are color cycling, so that's a completely different form of background animation.  This is actually our missing palette #4, with the purple just a non-cyling part that matches with the surrounding walls.

The next few screens are missing the torches, which is kind of a letdown... but also a sure sign something else is in store again.  Sure enough, when we climb up a bit further we see the sky tiles are back, but in a new color.  Nothing is color cycling here, so they must have needed the time to turn that code off and reassign it back to the previous sky pattern.  Those with a keen eye may have noticed the windows earlier actually used this blue rather than purple, so the transition can be pegged as happening while we were in the second screen with rotating wheels and a solid black background.

Next we're back inside... but now all the previously purple walls are pink!  Those devious Capcom guys used one color swap to distract us while they did a second one in short order!  Pressing onwards we see some blue pipes which are using the same palette as the night sky earlier, but we get yet another animated green tile, this time using sprite overlays for it's bounce reactions (which you can tell because they don't ALL flash on a bounce).

Finally we get to one of the boss rooms, still using the same lime green/yellow green/pink/blue... or are we?  Take a closer look at those tapestries and you'll find they also have pink in them and filling in around the pointed bottoms.  I guess they just couldn't resist doing one last palette change while were in the boss hallway!

So how about that... I bet you guys have much greater appreciation for just how amazing this stage is.  Remember that the next time someone complains about the mega man games all being the same after the first one!  Honestly 6 isn't high on my personal favorites list because I just don't think a lot of it is all that fun and I dislike the palette choices themselves in many areas because it's just too clashing and bright for my tastes, but there's no denying they really pulled out all the stops in designing these stages around the NES's limitations.

======

So, to proceed from here I'll ask you guys to pick a single stage from any mega man game I haven't yet converted... (wily wars mm3, x2+, maybe even MMZ or ZA?) in my other thread but for which maps are readily available at places such as http://www.vgmaps.com or elsewhere.  So cast your votes by posting a link to the map of your choice, discuss it amongst yourselves, and then I'll start working through whatever you guys pick as an example for next few lessons, showing you how I tackle it from start to finish.  I'd like to have the selection finalized by Friday so I can work on it over the weekend, okay?

We'll get to advice on creating original tilesets and tile animation later on as well.  :D

=====

If you'd like more practice, you can also have a look at what the same team did to Ground man's stage HERE  (run through Google Translate), with the menus on the right sidebar.  There are also links to check out behind the scenes stuff at the mm7fc and mm8fc projects as well!

October 21, 2014, 08:20:36 PM
Reply #10

Offline Superjustinbros

  • MM8BDM MM9 Contributor

  • Something
  • *
  • Date Registered: October 29, 2012, 03:32:09 AM

    • View Profile
    • http://superjustintheblog.blogspot.com
Re: Tiles... they really aren't that hard, guys.
« Reply #10 on: October 21, 2014, 08:20:36 PM »
As someone that likes following the limits of the NES, I enjoy this topic. I'd be interested in seeing what else can be dug up here. Though I will say I'm more into seeing what's wrong with the NES/Classic-themed maps rather than the SNES or GBA maps (because there you can't really be creative with the limits you have to follow)

I should also note, different emulators do display different colors. From what I know, the colors listed in the OP are what FECEUX uses, the one I use mostly is the NEStopia palette.

October 21, 2014, 09:19:15 PM
Reply #11

Offline Magnet Dood

  • MM8BDM MM8 Contributor

  • Rockman 5- Blues' Trap!?
  • *****
  • Date Registered: April 19, 2011, 08:13:37 PM

    • View Profile
Re: Tiles... they really aren't that hard, guys.
« Reply #11 on: October 21, 2014, 09:19:15 PM »
Personally I'd like to see Snake's MM3WW textures represented in 8-bit. I feel like they were one of the largest deviations from the original NES stage.

October 21, 2014, 09:21:43 PM
Reply #12

Offline Korby

  • Global Moderator

  • Benvenuto nella room italiana!
  • **************
  • Date Registered: March 04, 2010, 03:36:02 AM

    • View Profile
    • Korby Games
Re: Tiles... they really aren't that hard, guys.
« Reply #12 on: October 21, 2014, 09:21:43 PM »
Personally, I'd prefer Toxic Seahorse so people looking to make/convert their own tiles have a better basis to go off on.
WW Tiles are pretty similar, if not exact, to the NES tiles in terms of size, so it's simpler to convert them, imo.

October 21, 2014, 09:29:49 PM
Reply #13

Offline NemZ

  • MM8BDM Extender
  • ****
  • Date Registered: October 13, 2010, 03:00:53 PM

    • View Profile
Re: Tiles... they really aren't that hard, guys.
« Reply #13 on: October 21, 2014, 09:29:49 PM »
Quote from: "Superjustinbros"
I should also note, different emulators do display different colors.

Yeah, they vary a bit depending on the output source.  Like I said right above the palette image:

Quote
The Nes has a very small palette of colors. This one, specifically, though due to the way the colors were coded they would look slightly different depending on your TV so there is no one-and-only true palette that you can absolutely depend on. I just stick with this version.

So really the key is to just pick SOME standard and stick to it, though which one is up to your personal taste.  Do that and nobody can fault you.  And actually I think I created the NES palette I use in photoshop by inputting the RGB values directly based on info over at NESDEV.

=====

Also, guys?  I appreciate the suggestions but you seem to be lacking map links.  Would be useful both for me and just to make certain everyone is on the same page with what is being discussed.  Snake and/or Seahorse would both be fine choices though, sure.  :D

October 24, 2014, 02:52:10 AM
Reply #14

Offline NemZ

  • MM8BDM Extender
  • ****
  • Date Registered: October 13, 2010, 03:00:53 PM

    • View Profile
Re: Tiles... they really aren't that hard, guys.
« Reply #14 on: October 24, 2014, 02:52:10 AM »
Last day for you guys to make suggestions and come to some sort of agreement.