Jump to content
IGNORED

Backdrop advice needed


tdp

Recommended Posts

I have looked through the manual and this forum for the answer to these questions (so humble apologies if this has already been answered before - and I missed it).

 

1) I'm looking have a game that scrolls horizontally using pfscroll. I have got this working, but I can only scroll one playfield, where I need to be able to scroll through 4 playfields continuous before it loops. Is this something Batari is capable of. And if so, how?

 

2) I have seen advanced looking backgrounds/playfields in games like double dragon, kung fu master, pitfall 2, Cabbage Patch Kids (unreleased game - AWESOME!!). I can do multi-coloured playfields, but how do you do things like add trees with out using sprites?

 

Any advice would be great.

Link to comment
Share on other sites

I don't have an answer for the backdrop question, but I have one (untested) idea for the horizontal scrolling. I was thinking that you could do it one column at a time. Let's suppose you are scrolling right to left. You could change the left column of the screen to be whatever it should be via pfpixel or manipulating the appropriate region of memory directly (depending on what kernel you are using) and then do your horizontal scrolling to make the changed area show in front instead. Presumably you could store the playfield data in rom and retrieve it one column at a time like this. Hopefully I'm explaining myself well, and possibly someone more experienced will have a better answer for you. :)

Link to comment
Share on other sites

I've been trying to figure out the answer to your second question for a couple days now. I know you can use the playfield to draw landscape features like trees. That involves shrinking the size of the rows, I've been playing around with pfres, pfheight, and pfrowheight. I just can't get it to work. The playfield will only fill up the top part of the screen, but the idea is to make it look like Crazy Balloon. If you can do that, you can start shaping the playfield into trees and adjust the color by row.

post-30521-0-97310500-1494362836.png

Link to comment
Share on other sites

@ kdgarris and boski - thanks for the responses.

 

Kdgarris - I have been looking into your suggestion. I need to read some more before I can implement it in Batari, but to make sure I fully understand you, are you suggesting this:-

 

Scrolling_Left_Logic.png

Scrolling_Right_Logic.png

(above images from http://khryssun.free.fr/programming_code.html#Tools - discovered whilst trying to figure this out)

 

So (scrolling from right to left) when I "shift" the playfield one column of pixels to the left, I then need to display the first column of pixels from my second playfield - if I'm understanding you and the above diagrams correctly. If I want to keep on scrolling right to left, then I keep on shifting the playfield one column to the left at a time, and add the next column from next playfield, one column at a time.

 

At the moment, I'm just using pfscroll and then adding or subtracting depending if the character is being moved left or right. I have figured out how to control the scroll speed by adding a small counter/delay before the pfscroll is actioned. Not sure if it is efficient, but it works. I know using the standard kernel, I can practically any height I want on a playfield, so vertical scrolling "virtual" playfields is pretty much taken care of.

 

boski - I have seen that style of playfield before. I think that could work. In fact using that style would allow me to be more creative with my backgrounds, if I play it smart with the colours per row. For example:-

 

Scramble_Atari_2600_retro_retrogaming-1.

 

But I would really like some thing like this (the trees add so much to the the look of the game):-

 

atari-2600-vcs-programming-34-638.jpg?cb

Link to comment
Share on other sites

I have not tested the horizontal scrolling idea myself. Bit-shifting is probably the most efficient way to do it. My idea was to change the trailing edge of the playfield with pfpixel commands and then do a pfscroll, which would make the former trailing edge the new leading edge of the playfield. I have not tested this myself, however.

 

Also keep in mind the warning in the batari basic guide about how "expensive" horizontal scrolling is in terms of processor cycles: ~500 cycles every time you use it,

 

I am surprised that no one with more experience hasn't jumped in here with an answer to your question about static backgrounds. Maybe try posting it in the "2600 Programming For Newbies" forum? I am also interested in the answer to that question.

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