Jump to content

Photo

Smooth Horizontal Scrolling Demo


9 replies to this topic

#1 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 9,314 posts

Posted Tue Mar 27, 2012 2:38 PM

My port of the Great Gianna Sisters.. Well, not really! I just wanted to prove SMOOTH side scrolling IS possible on the 2600.

The trick is to move the sprites and not the playfield.

This iteration I found a way to clip the sprites so there is no pop-in or pop-out at the edges. Basically, I made the playfield the FOREGROUND and made it black. Sprites are drawn underneath the black playfield pixels so when they pass through the edges they appear to smoothly scroll off the screen. The tradeoff is that the ground and sky both share the same color.

Attached Thumbnails

  • maryo.jpg

Attached Files


Edited by theloon, Fri Jul 13, 2012 2:19 PM.


#2 Nateo OFFLINE  

Nateo

    Stargunner

  • 1,272 posts
  • Location:Buffalo, NY

Posted Tue Mar 27, 2012 9:15 PM

That's a nice little demo! Have you had any specific ideas for games using this technique?

#3 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • Topic Starter
  • 9,314 posts

Posted Tue Mar 27, 2012 9:32 PM

Any side scrolling platformer, really. The sprites were inspired by the Great Giana Sisters. The way the levels need to be laid out seems to steer towards Pitfall though. Gainas Pitfall?

I've suggested smooth horizontal scrolling could be done several times without much of a response. I decided to put up or shut up and create a demo. it's my first forray into the multi-sprite kernel.

I've not found a good way to hide the sprite wrapping around for the player, vertical columns, enemies and items.

Edited by theloon, Tue Mar 27, 2012 9:34 PM.


#4 abaudrand OFFLINE  

abaudrand

    Chopper Commander

  • 241 posts

Posted Thu Mar 29, 2012 3:01 AM

this is impressive !!!

#5 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • Topic Starter
  • 9,314 posts

Posted Fri Mar 30, 2012 7:59 AM

This is basically abusing how the bB kernel deals with sprites overdrawn off the screen.

1. Create a row of blocks that spans the entire playfield (clipped at 3 playfield pixels right and left in the multi sprite kernel default res)
2. Create a quad sized sprite that is the same color as the background and place it in front of the row of blocks. This is your "hole" between platforms.
3. Do not scroll! Move the hole left or right as needed. Wrap around when x reaches 0 or 144.

The bB kernel will glitch sprite placement as you attempt to move off screen. The 3 playfield pixel margin on the sides is left blank so the player never sees any sprite aberrations.

I could fine tune this to use the entire screen but I'd have to research which x positions to use at the sides that don't cause sprite placement glitches.

Edited by theloon, Fri Mar 30, 2012 8:16 AM.


#6 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • Topic Starter
  • 9,314 posts

Posted Fri Mar 30, 2012 2:37 PM

Okay, here is a "Project MD" themed version with some platform physics. The diamond appears and disappears sorta intentionally as a side-effect of a glitch. The multisprite kernel IS SUPPOSED to reflect via bit 3 of NUSIZ (for virtual sprites) but instead seems to vanish the sprite..

Attached Files


Edited by theloon, Fri Mar 30, 2012 3:03 PM.


#7 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • Topic Starter
  • 9,314 posts

Posted Wed Apr 11, 2012 9:32 AM

So, I discovered changing NUSIZ4[3] = 1 makes player2 disappear! Is this an undocumented feature in the multi-sprite kernel?

The yellow bonus object is player2 in this instance. I make it blink with this technique.

Attached Files



#8 abaudrand OFFLINE  

abaudrand

    Chopper Commander

  • 241 posts

Posted Wed Apr 11, 2012 1:33 PM

what do you think if the glittering is a little faster?

#9 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • Topic Starter
  • 9,314 posts

Posted Wed Apr 11, 2012 4:31 PM

what do you think if the glittering is a little faster?


Then I forgot to turn off the disco ball while snorting cocaine again!

I suppose it'd be a half-tone color? Maybe I could have more "coins" on the screen if I flicker them? I don't know about making them go any faster. I don't like most flickering techniques because they look crappy on LCD panels.

This is the first time I tried doing strange things with the NUSIZ variables. If anyone else has found some nice tricks please share :)

Edited by theloon, Wed Apr 11, 2012 4:33 PM.


#10 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • Topic Starter
  • 9,314 posts

Posted Fri Jul 13, 2012 1:58 PM

Okay. The first post has been updated. Now everything is clipped properly so there should be no pop-in. Smooth horizontal scrolling people!




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users