Game Units

Early on, you should decide on a game unit that is simple and intuitive.

When making a game, one thing you have to decide early on is what you will use as units. Having a game unit allows you to consistently express things like distances and speeds. Below, you can see the units I use for Super Retro Crossover. Since the world is split up into tiles, 1 unit is equal to 1 tile (16 pixels).

grid-with-text

Having a unit that makes sense and is easy to wrap your head around is important. For example, if I tell you that Mario’s max walk speed is 5.625 game units per second, can you imagine how fast that will be in your head? With the units I’ve chosen, it’s pretty easy. He’ll move past about 5 and a half tiles every second.

mario-max-walk-locked

Units shouldn’t always have a direct relation to pixels though. For example, one unit is equal to 16 pixels now, but if I wanted more detailed graphics, one unit might equal 32 pixels or 64 pixels. It’s generally a good idea to think of rendering as separate from the rest of the game engine.

I’m telling you all of these things because I did them wrong in Super Mario Bros. Crossover. In that game, one unit was equal to half a pixel. Look how much more confusing this is!

smbc-grid

In this case, Mario’s walk speed would be 180 game units per second. That’s a lot harder to visualize in your head. The point is, keep your game units simple and intuitive!

Sprite Flipping and SMB 1-1

Sprites can now be flipped!

sprite-flip

I implemented sprite flipping in the level editor and game engine. The image above shows flipping on hill. Those are both the same sprite.

I also built the first level of Super Mario Bros. There is a toad there because the story takes place after Mario beats Bowser, so he has freed the toads.

Speaking of that… does anyone have any ideas for how the first level would be different after Mario has beaten Bowser? So far I just have toads hanging around that you can talk to, there are no enemies, and some of the bricks and item blocks have already been hit. I was wondering if there could be anything else different to make it more interesting to go through the level. It’s important for the story that the player goes through the whole level.

Collider Modifications

new-colliders

Switched to using one collider per tile to make it quicker to build levels. The sides that are in red are ignored so they still behave properly.

 

old-colliders

For comparison, this is how colliders looked before. They are bigger, so they’re more efficient, but it takes longer to make them.  I’ll probably eventually have something like this auto-generated when a level starts.

Super Mario Bros. Crossover HTML5 Preview

Jay talks about what’s been happening and demonstrates a work-in-progress port of SMBC to HTML5 that was later canceled.

Update: This port was canceled.

Jay talks about what’s been happening and demonstrates a work-in-progress port of SMBC to HTML5.

  • 0:00: Introduction, changes, showing stuff before it’s ready
  • 3:20: Demonstration of SMBC HTML5, Flash vs HTML5, WebGL
  • 7:30: Explanation of how it happened, some talk of OpenFL and HTML5 platform
  • 10:08: Rendering in WebGL vs rendering in Unity, advantage of custom tools in game development
  • 12:45: Palette system used in SMBC Flash, shaders, comparison to WebGL
  • 17:18: Knowledge grew since starting SMBC, so old stuff is worse than more recent stuff
  • 18:30: Demonstration of old animation system
  • 21:30: JSON used for data, old animation data ported to JSON
  • 25:53: Programming discussion, ActionScript 3 (flash version) vs Haxe (HTML5 version), some early programming mistakes
  • 29:50: Show how color data is stored separately from textures, explain in basic terms how it looks up colors
  • 31:30: Old theme sprite sheet vs new one
  • 33:55: Learned stuff from past experiences like Unity, know lots of programming languages now
  • 36:02: Real talk, accepting negative criticism, letting people down, apology, lessons learned

Playing My Own Game – SMBC: The Lost Levels – Part 5

Jay Pavlina plays through The Lost Levels in Super Mario Bros. Crossover 3.1.

I decided to record a play through while I was testing The Lost Levels in Super Mario Bros. Crossover 3.1.