Jump to content
IGNORED

Finer control over vertical scrolling using standard kernel?


Random Terrain

Recommended Posts

I'm scrolling the screen down and can use pfscroll down or pfscroll downdown. The first one is a little too slow and the second one is too fast. I tried adding another pfscroll down every other drawscreen, but the scrolling looks too jerky. Is there some asm code that can be added that would let me have finer control over the scrolling speed without making it look jerky?

 

Thanks.

Link to comment
Share on other sites

I know I'm not answering your question directly. I would use a counter in the main loop and only pfscroll every other time:

 

main

counter = counter + 1

 

if counter{0} then pfscroll down

 

drawscreen

 

I already tried that (added to a pfscroll down that happens every time) and it's too jerky.

  • Like 1
Link to comment
Share on other sites

I wonder if a combination of my solution (counter{0} to pfscroll every other frame) and setting the pfres lower (i.e. const pfres=8 ) would help. I notice lower pfres really helps if CPU time is running low.

I don't seem to be low on CPU time, so playing with pfres wouldn't help. It would also screw up the thin line trick that I'm using and force me to change a bunch of code.

 

Like I said in my first post, I want to go faster than pfscroll down, but slower than pfscroll downdown, but adding another pfscroll down every other drawscreen makes the scrolling too jerky. It would be nice to have something similar to the fixed point subpixel movement that we have for sprites. Instead of scrolling the screen 1 or 2 lines at a time, it would be nice to scroll at a smooth speed of 1.5.

Link to comment
Share on other sites

I would do is to use a variable to increase by a number(scrollspeed) per frame. When that variable is over a number you chose, then call scrolldown routine and then subtract the number by the number you chose.

 

Something like,

 

Scroll+scrollspeed=Scroll;

while Scroll>=10 then pfscroll down:Scroll-10=Scroll

 

Scrollspeed set at 15 will scroll the screen down 1 frame, and then the next frame 2 frames. Scrollspeed set at 22 will move the screen down 2, and then occasionally move the screen down 3.

Link to comment
Share on other sites

Subpixel movement still positions the sprites at whole pixel positions. It's just a convenient way to skip movement for a number of frames.

 

Same would be true if it were applied to scrolling. If scrolling once on odd frames and scrolling twice on even frames is jerky, the same scroll rate would be jerky with subpixel movement too.

 

Maybe the your game play could incorporate chunks of time with double speed scrolling instead, like a burst of speed when you pass an obstacle.

Link to comment
Share on other sites

Subpixel movement still positions the sprites at whole pixel positions. It's just a convenient way to skip movement for a number of frames.

The weird thing is that I noticed on a real Atari 2600 that using 1.5 movement seems to be smoother than if you moved the sprite by one every drawscreen, then moved it by another one every other drawscreen. It's like bB is doing some kind of magic to smooth it out.

 

 

 

Maybe your game play could incorporate chunks of time with double speed scrolling instead, like a burst of speed when you pass an obstacle.

Thanks. I'll try it and see what happens.

 

The game I'm working on has a title screen, auto-play, a pause feature, and so on, but the gameplay stinks. It's either too slow and boring at the start or too fast and too hard. Once I find the right Goldilocks settings where everything is just right, I can start to make it harder over time and get the game finished.

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...