Jump to content
IGNORED

Sonic The Hedgehog on the 2600


tokumaru

Recommended Posts

I really want to keep it a single line kernel. There will have to be some "dead space" at the top of each tile where only the background color can be controlled.

 

I finished up the horizontal scrolling. It works in all 8 directions now. The biggest hurdle now is creating the tiles to place in the level.

 

The other issue I ran into is the HMOVE bar on the left side of the screen. This is my first Atari project and I didn't realize that issue existed. The cycle 74 trick is out because the loop and downhill sections require right movement. So it's either use a black PF0 with high priority or HMOVE every scan line. The PF0 option requires the ball to be black too so that probably won't work. So I think HMOVE on every scan line will have to be what is done.

Link to comment
Share on other sites

I went ahead and put the HMOVE in every scan line of tile anyway. I figure it's better to do it now before I create a bunch of tiles that would need to be changed later. Besides, almost all the tiles will need to position objects. Only the simplest tiles don't require player1 and ball objects, and those can certainly afford the extra 3 cycles.

 

Now I'm thinking about making P0 single width so moving sonic off the screen can be done without having to mask the graphics that wrapped around to the other side of the screen. Which means lost rings can bounce completely off the screen in either direction anywhere in the level.

 

I'll upload another video once I finish the platform tile. Right now you can't tell that it's scrolling horizontally cause all the tiles are horizontal lines. Basically the Engine handles coarse (32pixel) horizontal scrolling and each SubKernel handles smooth scrolling inside of a 32pixel range. With the exception of the sky,grass, and dirt tiles, each tile will be built up of 6 or more SubKernels. The level data stores the SubKernel ID and the Height for that instance of the SubKernel. Each 32pixel column of the level gets 8 slots to place SubKernels. So it works out to 2 horizontal pixels per byte of level data plus an extra 159 pixels when you scroll all the way to the right of the level.

 

Currently I have reserved 128 bytes for level data which produces a level that is 415x447 pixels total. Hopefully I'll have enough room for one more page of level data, bringing the level size up to 671x447.

Link to comment
Share on other sites

I went ahead and put the HMOVE in every scan line of tile anyway. I figure it's better to do it now before I create a bunch of tiles that would need to be changed later. Besides, almost all the tiles will need to position objects. Only the simplest tiles don't require player1 and ball objects, and those can certainly afford the extra 3 cycles.

 

Now I'm thinking about making P0 single width so moving sonic off the screen can be done without having to mask the graphics that wrapped around to the other side of the screen. Which means lost rings can bounce completely off the screen in either direction anywhere in the level.

 

I'll upload another video once I finish the platform tile. Right now you can't tell that it's scrolling horizontally cause all the tiles are horizontal lines. Basically the Engine handles coarse (32pixel) horizontal scrolling and each SubKernel handles smooth scrolling inside of a 32pixel range. With the exception of the sky,grass, and dirt tiles, each tile will be built up of 6 or more SubKernels. The level data stores the SubKernel ID and the Height for that instance of the SubKernel. Each 32pixel column of the level gets 8 slots to place SubKernels. So it works out to 2 horizontal pixels per byte of level data plus an extra 159 pixels when you scroll all the way to the right of the level.

 

Currently I have reserved 128 bytes for level data which produces a level that is 415x447 pixels total. Hopefully I'll have enough room for one more page of level data, bringing the level size up to 671x447.

If you can pull this off, it'd be a great feat. If you have Tails in there, it'd make a kick ass "sequel" to Zippy.

  • Like 1
Link to comment
Share on other sites

If you can pull this off, it'd be a great feat. If you have Tails in there, it'd make a kick ass "sequel" to Zippy.

You know I hadn't even considered that. Hopefully I'll have some time to continue work on it this weekend. The biggest issue I see right now is ROM space. I think a full game would need 1MB mapped into 16 different sets of 256 pages. Good thing eeprom is cheap.

Link to comment
Share on other sites

You know I hadn't even considered that. Hopefully I'll have some time to continue work on it this weekend. The biggest issue I see right now is ROM space. I think a full game would need 1MB mapped into 16 different sets of 256 pages. Good thing eeprom is cheap.

Wowie wow wow. 1MB?! I bet a lot of that is just map, level, sound, music, etc, data. Zippy is 64k in size. I think once you get past 64k, you need start using the melody board.

  • Like 1
Link to comment
Share on other sites

Wowie wow wow. 1MB?! I bet a lot of that is just map, level, sound, music, etc, data. Zippy is 64k in size. I think once you get past 64k, you need start using the melody board.

It actually wouldn't need anything as fancy as the melody board just a simple bank switching chip and a giant eeprom. It wouldn't really "need" all of the 1MB, but hey a 1MB eeproms is less than a buck on digikey. So why not pack it full of levels and sprite animations?

Link to comment
Share on other sites

I haven't had much time to work on this lately. There has been some progress made on getting the platform tile done. I think once I have the first tile working properly the rest will be a lot easier. It's building the first one that can be used as a template for the others that is really tripping me up. I also got my harmony encore last week and fixed all the bugs that cropped up on real hardware. So what I have so far has now been tested on real hardware finally.

 

I've also been thinking about how to get a decent looking loop in the game. Any feedback on this would be helpful. The idea is to use the M1 and the BALL to draw an 8 pixel thick oval in brown and then use P1 to draw the rings inside the loop. P1 would be set to 2 copies medium and wide to put a ring on each side of the loop. The COLUP1 would have to be set before and after the missile is drawn so the rings and oval can be the correct color. The P1 M1 and BALL objects can be positioned in a few scanlines right before the loop starts. P1 will need to be repositioned after the top 2 rings get drawn. There should be enough vertical space between the rings that HMP1 can be used fore the repositioning. At the bottom of the loop the background color can be changed to green for 4 scanlines and then brown to draw the ground and the objects turned off during the drawing of the grass. Finally the HMM1 and HMBL registers would need to be updated each scanline to move the missile and ball in an arc. Here's a mock I did in mspaint. I know the oval border isn't 8 pixels like it should be, but other than that I think it's doable.

 

post-40226-0-97875100-1422242432.png

Link to comment
Share on other sites

That's exactly what I envisioned loops would be like. You'll certainly not get a perfect circle like that, because that would require the missile and the ball to be rotated, and they obviously can't do that. This means that the top and bottom of the loop will not be as thick as the sides, but I still think it will look OK.

Link to comment
Share on other sites

The platform tile is almost complete. I'd like to get some suggestions on what colors and sprite graphics to use for the platform. It's a quad sized P1. It can be any size and the color and sprite graphic can be changed every scanline since this is a single line kernel. Here's what I have. It looks ok, but I think someone more artistic could do a lot better.

 

post-40226-0-00986400-1422582208_thumb.png

Link to comment
Share on other sites

  • 2 weeks later...

The platform tile is almost complete. I'd like to get some suggestions on what colors and sprite graphics to use for the platform. It's a quad sized P1. It can be any size and the color and sprite graphic can be changed every scanline since this is a single line kernel. Here's what I have. It looks ok, but I think someone more artistic could do a lot better.

 

attachicon.gifplatform.png

 

Holy ($@#(%@# ! How did you get the scrolling that smooth?

Link to comment
Share on other sites

It is two player1 objects at quad-size, and the red shoe guy is player0. And the sky, grass, dirt is probably background.

I could do that example with batari Basic DPC+.

 

For actual screen-wide sections, you could probably do a background the same as the player1, but with mid-screen color changes to the sky color and cover up any color change mess with player1. Or if not background, Playfield, but that's more intensive to move 8-way and cover up the end section with player1.

Or invert things and still make grass ground sections with background, but player1 quad size as the sky color.

Those ways would smooth scroll 8-way, but the 3nd option is more limited (it would only have a not ground section as wide as quad player1).

Link to comment
Share on other sites

Reading around this thread it seems you are using a ball sprite to smooth out the pf scrolling? Seems neat.

 

This was the first thing I had tried but I quickly found that it wouldn't work because it takes too long to update all 3 PF registers twice per scanline. Instead I will be changing the background color at precise times and smoothing out the color change with one of the graphic objects. The platform in the last video was just the P1 object, but once I get around to implementing hills and loops you'll start to see where changing the background color mid scanline is needed.

 

Here's what Sonic might look like in full resolution (as are the sprites in this engine):

 

attachicon.gifsonic-full-res.png

 

Nice! This will look awesome in the next demo video.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...