Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Master System Parallax and Scrolling Help.

Reply to topic
Author Message
  • Joined: 23 Feb 2019
  • Posts: 1
Reply with quote
Master System Parallax and Scrolling Help.
Post Posted: Sat Feb 23, 2019 8:50 pm
Greetings Everyone it's really cool to be here. I have to say this site is amazing in it's wealth of knowledge. So, to that i would like to ask a few questions. I am new to programming on the sms. I have an idea for a few games but the one i am currently wanting to work on has a scene where in space there is scrolling.

I am unfamiliar with how to program scrolling in WLA DX or ConTEXT program works. I would very much like to learn about how to make scrolling and parallax work on sms. In particular in this scene is the forward-scrolling technology. Something like Zaxxon and Grand Prix.
Also, please forgive my ignorance and noobness. I am here to learn and to make something of high quality.

I am not above just making burnable little games to train and learn but i would really like to learn it and if possible follow a tutorial. In turn I would actually return the favor and write a Tutorial for people. I think that is how community works. Right now i have a super duper positive experience here and i want to keep having that and i hope to see your replys.

Thank you so much for reading this and I look forward to responding and learning and making this something that more than one person will hopefully find fun and informative.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12883
  • Location: London
Reply with quote
Post Posted: Sat Feb 23, 2019 11:12 pm
It's quite complicated and related to the way the whole game is built - not really a thing you can make a simple tutorial for.

Most "into the screen" racing games make use of raster scrolling. For this, you draw an image of the road (or whatever) going straight into the distance, and then you use the line interrupt to horizontally scroll the road area left or right to turn that straight road into a curve which you update based on the player's position on the track. You then draw track-side scenery using sprites and try to make the vehicles act like they are on the track and following its curves. This is how games like Hang On and Out Run work. You can enable the tilemap viewer in Meka to see how it works - it shows you the unscrolled background and overlays the "unscrolled" background over it. One tricky part is to try to hide the road tiles as they appear on the left or right sides.

They also make use of palette rotation. This is where you draw your images using stripes of colour using at least three palette entries; you can then rotate colours through these entries to give the impression of motion. This is used to animate the "road" and its stripes. Zaxxon 3D uses palette rotation for its "trench" sections.

Another trick is just tile animation. Zaxxon 3D uses this for its "trench" entry, and other games use it for tunnels or scenery. This is where you just draw stuff using 8x8 tiles and animate that - it's choppy (as you can only animate in 8px jumps) but it lets you do larger effects like tunnels and hills.

Another common feature of these games is a parallax scrolling horizon. This is just another bit of scrolling, but it helps give the illusion of depth. Some games take it quite far with multiple layers and some extreme opposite direction scrolling as you turn, but it's just more horizontal scrolling in line interrupts, and not even on every line like for the road layer.

Most complex effects in Master System games can be disentangled by looking at the tilemap, palette and layers (background/sprites/foreground tiles), and considering that most things can only be changed per line (horizontal scrolling) or per frame (palette, vertical scrolling, sprites, tilemap). I always think that you need to get that sorted before you try to write any code, as you need to build your game around what it needs to do - for example, to have a good way to hook up line interrupts if needed or to switch to a different frame interrupt handler for different scenes.
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!