tdp Posted May 7, 2017 Share Posted May 7, 2017 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. Quote Link to comment Share on other sites More sharing options...
+Karl G Posted May 8, 2017 Share Posted May 8, 2017 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. Quote Link to comment Share on other sites More sharing options...
boski Posted May 9, 2017 Share Posted May 9, 2017 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. Quote Link to comment Share on other sites More sharing options...
tdp Posted May 10, 2017 Author Share Posted May 10, 2017 @ 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:- (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:- But I would really like some thing like this (the trees add so much to the the look of the game):- Quote Link to comment Share on other sites More sharing options...
+Karl G Posted May 10, 2017 Share Posted May 10, 2017 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. Quote Link to comment Share on other sites More sharing options...
boski Posted May 10, 2017 Share Posted May 10, 2017 There's some good info in this thread that could help: http://atariage.com/forums/topic/196181-question-about-playfield-widthheight/ It talks about how kernels affect playfield, and goes into much greater detail than randomterrain's reference page Quote Link to comment Share on other sites More sharing options...
tdp Posted May 12, 2017 Author Share Posted May 12, 2017 (edited) Thanks again, guys. I have attached what I have done so far. not quite rtype.bas.bin Edited May 12, 2017 by tdp Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted May 13, 2017 Share Posted May 13, 2017 You might want to slow down the flashing of the score a little: randomterrain.com/atari-2600-memories-batari-basic-commands.html#ex_pulsation_examples Quote Link to comment Share on other sites More sharing options...
tdp Posted May 13, 2017 Author Share Posted May 13, 2017 (edited) Thanks Random Terrrain. Nice website, btw. I've slowed down the score flash, and animated the helicopter. Still trying to figure out how to either increase the width of the playfield or scroll multiple playfields. not quite rtype.bas.bin Edited May 13, 2017 by tdp 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.