+Lewis2907 Posted September 7, 2018 Share Posted September 7, 2018 (edited) I have looked around the forum to try and understand the below from Princess Rescue and other games I have seen. How does one calculate the data below to create levels and make it scroll left, right, up, down etc.? I know about pfscroll but that is very repetitive (but useful at times). Basically if there is a demo with some notes stripped to the "bare bones" for moving left to right and backwards then I (we) could learn from it. Then another for up and down. Then another for open world in the kernels that would be great. I think the Multisprite is not feasible because of the mirrored playfield unless you use "brute force" a Bogax saying in one of his post to make it look like a single pixel was on and off. The others I think can be done. Thoughts? Thanks. data Level1A0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,64,4,36,4,36,4,36,4,36,4,36,4,66,4,129,4,129,4,129,4,129,4,129,4,64,4,0,4,0,12,0,120,12,0,12,0,12,0,4,0,7,0,7,0,7,0,4,0,4,0,12,16,4,16,4,16,4,16,4,16,4,16,4,0,12,0,4,0,7,0,7,0,7,0,4,0,4,0,12,0,12,0,12,0,12,0,4,0,4,0,0,0,0,0,00,0,0,0,0,0,0,0,0,0,0,4,0,4,0,4,0,4,32,12,32,12,32,12,32,12,36,4,36,4,68,4,4,4,4,4,0,28,0,28,4,4,36,4,36,4,36,4,36,4,32,4,32,4,32,4,0,188,0,188,0,188,0,40,4,128,4,128,4,128,4,128,4,32,4,32,4,32,4,32,4,32,4,32,4,8,24,8,24,8,24,8,24,8,24,8,24,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,4,0,7,0,7,0,7,0,4,0,4,0,4,0,4end Edited September 7, 2018 by Lewis2907 Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted September 14, 2018 Share Posted September 14, 2018 Not a full answer due to time of night here I think there are several topics to explore. You best bet is in topics which bogax helps with regarding 4 way scrolling. Also, you can fake smooth horizontal scrolling with the multi sprite kernel. http://atariage.com/forums/topic/195843-smooth-horizontal-scrolling-demo/ http://atariage.com/forums/topic/218190-smooth-vertical-scrolling-from-data-want-4-way/ I know nothing about the DPC+ kernel. Maybe by now it supports scrolling. 1 Quote Link to comment Share on other sites More sharing options...
+Lewis2907 Posted September 14, 2018 Author Share Posted September 14, 2018 Gemintronic, Thanks. I have used both. I used your when I started making (The Quest) a sub game with the Sprite seaQuest. The data is what I'm interested in. I plan to play with this weekend if I have time to see if I can make sense of it. I did use Bogax as well. 1 Quote Link to comment Share on other sites More sharing options...
+Lewis2907 Posted September 25, 2018 Author Share Posted September 25, 2018 I am trying to strip down "Princess Rescue by Chris Spry, 2012." to one level that moves left and right using "data" I attached where I got stuck at. Can anyone make this work? Seems like you could make smaller levels like he said based off the 256 bytes of info. This would allow for the creation of more levels. If anyone can help that would be great. Then I would try to make a demo for DPC. Multisprite could be done I think but the mirror playfield may create a challenge. 20180925_Left_Right_Dara_SD.txt 20180925_Left_Right_Dara_SD.bas.bin 20180925_Left_Right_Dara_SD.bas Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted September 26, 2018 Share Posted September 26, 2018 I got an early version of the RatRace (want 4 way scrolling topic) engine a little bit cleaner but it still goes over cycle. I'm going to try reducing the playfield resolution and see if that cuts down some cycles. Maybe we'll end up with a presentable example some time down the road UPDATE: Eternal thanks to bogax for the heavy lifting in scrolling routines! Quote Link to comment Share on other sites More sharing options...
+Lewis2907 Posted September 26, 2018 Author Share Posted September 26, 2018 Gemintronic, Thanks. I'm thinking in theory that if your 4 way will work then a programmer could make several levels. It seems like the data may save space, but I normally like to use 32k or 32kSC to have maximum space for my bloated coding style. Looking at the example I tried to make you could possible have 8 - 10 different levels with the ability to move left and right freely. Would be similar to Defender, ChopLifter, River Raid etc. Hope what I typed makes sense. Thanks for working on this. I will continue to try as well. 1 Quote Link to comment Share on other sites More sharing options...
+Lewis2907 Posted September 30, 2018 Author Share Posted September 30, 2018 (edited) I think this maybe an easier way for us novice programmers to have scrolling levels. I think using pfpixel will work, but I need to figure out a timer, how to move the pfpixel data left and right based upon movements. Currently moving everytime I push left or right move the pfpixel way to fast. Maybe every 3 to 4 player0 movements would look better. Then figuring out hot to incorporate the data (pfpxiel) to make a scrolling level would be the next step. With this process if complete would be easy enough for novice programmers to use and create levels based off of pfpixel, pfhline and or pfvline. Thanks to anyone who can fix this to work. 20180930_SD_L_R(pfpixel).txt 20180930_SD_L_R(pfpixel).bas 20180930_SD_L_R(pfpixel).bas.bin Edited October 1, 2018 by Lewis2907 Quote Link to comment Share on other sites More sharing options...
+Lewis2907 Posted October 14, 2018 Author Share Posted October 14, 2018 Gemintronic, I am using your S3: The Sensational Santuci Sisters [CANCELLED] at: http://atariage.com/forums/topic/201771-s3-the-sensational-santuci-sisters-cancelled/?view=findpost&p=2826693&hl=%2Bsss36 I stripped it down and added comments from what I can tell and make sense of. Are you able to make this 32k. I can't get it there for some reason. Also is it possible to go left. I plan to duplicate the right scroll and see if that works with some tweaks based upon direction. Lastly the data table. How does one know what they are building for a screen. It would seem playing with table would be very painful, but I think you have a method that would work. Thanks again if you can get this to work. 20181014_Left_Right_Data_SD.txt 20181014_Left_Right_Data_SD.bas.bin 20181014_Left_Right_Data_SD.bas 1 Quote Link to comment Share on other sites More sharing options...
+Lewis2907 Posted October 16, 2018 Author Share Posted October 16, 2018 Attached is a version that will now go left and right based off the data. The issues I have so far are: 1. Can't Bank switch. I need this since I use bloated code then streamline later. 2. Slow down player one movement. Should be an easy fix 3. Better pixel from moving left and right. I think it's off by the math or the data has to be a certain length. 4. Return to the house if you want and have an ending for the level. Maybe a counter of some sorts. 5. Figure out a simple way to adjust the data to make a custom playfield. 6. After the above is complete build another level. Reach the end and move on to the next level. 7. This one is a stretch at best from what I can gather from the code. Move up and down similar to the current code. I'm not even sure where to begin on this. 8. Credit goes to Gemintronic and Sprybug as from what I saw they were able to do helped me modify Gemintronic code to make something very user friendly for us novice programmers. 9. After the Standard is complete. I will try and tackle the Multisprite / DPC. Probably DPC first as it seems easier because the playfield is similar to the Standard Kernal. 20181016_Left_Right_Data_SD.txt 20181016_Left_Right_Data_SD.bas 20181016_Left_Right_Data_SD.bas.bin 1 Quote Link to comment Share on other sites More sharing options...
+Lewis2907 Posted October 18, 2018 Author Share Posted October 18, 2018 Here is another update. 1. I'm using the score to mark the start and end of the level. Maybe a way to count the screens "worldx" etc. would work then I can get the score back. I'm not sure how to really build a second score. I will look at Karl G stuff to see if I can implement that as a way to track the level. 2. I disabled the gravity for testing purposes. Basically press fire / jump to go up to a certain point off screen then scroll right and left to see the level below. 3 There is also some notes on how to build the playfield. They are generic for now. I'm going to try and make a manual / better instructions for this. The playfield and end of the levels still don't quite align perfectly, but it works for now. 4. Based upon RT's site you are limited to data, but sdata is an option. I personally could never get sdata to work right for me. http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#dataarrays For convenience, you may specify a list of values that will essentially create a read-only array in ROM. You create these lists of values as data tables using the data statement. Although the data statement is similar in its method of operation as in other Basic languages, there are some important differences. Most notably, access to the data does not need to be linear as with the read function in other Basics, and the size is limited to 256 bytes. The sdata statement will define a set of data that is accessed more like the data in other Basics. The 256-byte limitation is also removed—the effective length is only limited by the size of each bank (4K). Sequential data is useful for things like music or a large set of scrolled playfield data. There is also no need to specify a pointer into the data. 20181017_Left_Right_Data_SD.txt 20181007_Left_Right_Data_SD.bas.bin 20181017_Left_Right_Data_SD.bas 2 Quote Link to comment Share on other sites More sharing options...
+Lewis2907 Posted October 21, 2018 Author Share Posted October 21, 2018 Update. I got it to bank switch and use Gemintronic and SpryBugs data as the playfield. Now it becomes a preference. Just have to figure out how to make the initial level vice the playfield. If using the playfield for the initial then I need to algin the world data to the playfield. Once that I should have both versions for everyone to use shortly I hope. 2 Quote Link to comment Share on other sites More sharing options...
+Lewis2907 Posted October 30, 2018 Author Share Posted October 30, 2018 (edited) Attached are both versions using Gemintronic and SpryBugs data as the playfield. I still can't quite get the playfields to align to starting screen. The other issue is that I can't quite fully understand how to create a playfield. Otherwise you can scroll left and right and have the bankswitching option with both versions. v1 is SpryBugs data the other is Gemintronic's Hopefully someone with a little more experience / savvy can get this to work, thanks. 20181030_v1_Left_Right_Data_SD.bas.bin 20181030_Left_Right_Data_SD.bas.bin 20181030_v1_Left_Right_Data_SD.bas 20181030_Left_Right_Data_SD.bas 20181030_Left_Right_Data_SD.txt 20181030_v1_Left_Right_Data_SD.txt Edited October 30, 2018 by Lewis2907 1 Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted October 31, 2018 Share Posted October 31, 2018 Someone who is very good at making scrolling playfields is going to make a simple example program as soon as he can find the time. I'll put an adapted version of it on the bB page soon after that. I'm still carrying boxes up and down stairs, putting things away, and cleaning things after the move to the new old house, so I've barely had time to use my computer for a few minutes each day. The way things are looking with my sister working all of the time, it could take most of November before I'll be able to get back to something that resembles life before the move. Quote Link to comment Share on other sites More sharing options...
+Lewis2907 Posted October 31, 2018 Author Share Posted October 31, 2018 Ok thanks. I will continue to play around with these version's. Maybe I can make something one day half orginal. Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted November 13, 2018 Share Posted November 13, 2018 Just to add one more example of 4 way scrolling: here is a "fixed" version of Freds maze craze example. Meaning, I adjusted a few things to work with newer versions of bB. Kinda hard to understand for me. But, may be useful as a point of reference mazecraze2b.bas Quote Link to comment Share on other sites More sharing options...
+Lewis2907 Posted November 13, 2018 Author Share Posted November 13, 2018 Gemintronic, The program is pretty good, but heavy on ASM ... Hopefully the person that RT is talking about will make the simple program. At this time I am able to use your program and data which is a good start. I'm still brainstorming on a game. I want to do something not using Mario, PacMan etc as the characters, but something similar in nature on how Super Mario scrolls left and right. The Sea program I made with the sub is something I would like to do, but I think I may have to settle with SD Kernel as that seems to have to most memory. I haven't even attempted DPC yet, but now that I am deploying again I will have time to work here and there on stuff. Thanks for the help and support with your programs and examples. 1 Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted November 13, 2018 Share Posted November 13, 2018 I think the key at this point is to split the game engine into a two frame system. On even frames do game logic and odd frames *just* scroll the screen. Hopefully I get a spare slack break to try out that theory There's also the matter of shearing when the screen is slightly down or up and it needs to scroll horizontally. The only two methods I can think of are: A: Redraw EVERYTHING and fractionally position the screen vertically. This is what's going over cycle for me at this point. B: Smooth scroll a whole playfield pixels worth vertically THEN scroll horizontally. Option B sounds the most promising right now. Quote Link to comment Share on other sites More sharing options...
+Lewis2907 Posted November 29, 2018 Author Share Posted November 29, 2018 Here is another update. This looks more promising. It scrolls left and right, but is scrolling playfield is limited to 256-bytes of data. "sdata" would be great. I plan to see if I can make it work with "sdata" / "sread". Credit goes to the people below as I basically merged these 2 programs together and styles to make this work. I also included "notes" to help explain what I did. ;*************************************************************** ; ; Code and Data adapted from SMB by Chris Spry, 2012. ; Code and Data adapted from Gemintronic, S3: The Sensational Santuci Sisters ; ;*************************************************************** Future update is to figure out how to adjust the playfield and make a quick manual on it. Add to the playfield to make it longer or move on another level. Any feedback or sugestions are welcome. Of note I have stated to experiment with DPC and it's going very slow with that program. 20181128_Left_Right_Data_SD.txt 20181128v1_Left_Right_Data_SD.bas.bin 20181128v1_Left_Right_Data_SD.bas 1 Quote Link to comment Share on other sites More sharing options...
+Lewis2907 Posted January 27, 2019 Author Share Posted January 27, 2019 Here is my attempt at a scrolling playfield with DPC. I am using pfpixel and pfhline (pfvline should be easy after pfhline works). I think I may be on to something here I hope. The standard kernel works, but the limitations will detour me and others away. I have always liked DPC, but the memory of course / variables are always a concern. Hopefully someone can help to get this to work better and or improve the code. As always feedback, comments and help is always welcomed as I continue to learn more in the forum, thanks. What works: 1. Program compiles (meant as a joke) 2. Just for RT. Collision is not bouncy and the sprite glides along the walls. 3. pixel / line will scroll back and forth Below is where I am trying to figure out how to scroll pfpixel and pfhline in a better and easier way ;*************************************************************** ; ; Painfull but building your playfied by each pixel ; easier than data like %10000000, %10000111, %10000100 ; easier than data like 2,3,124,55,99 ; ; ""Pfpixel"" xpos ypos (on / off / flip) ; ""pfhline"" xpos ypos endxpos (on / off / flip) ;__Level_1_Data_On pfclear pfpixel _Move 10 on pfhline _Move 18 18 on pfhline 10 15 15 on : pfhline 20 15 25 on return thisbank __Level_1_Data_Off pfclear pfpixel _Move 10 flip pfhline _Move 18 18 flip pfhline 10 15 15 off : pfhline 20 15 25 off return thisbank **************************************************************************** *****Below is the timer i'm using to slow down the playfield********** *****Not sure how to make it smoother here, but it works************ ;*************************************************************** ; ; Timer below to control the speed of the playfield to match ; player0 movements ; Time_Counter = Time_Counter + 1 if Time_Counter < 5 then __Skip_Timer Time_Counter = 0 ;*************************************************************** ; ; change the number to coorespond to each second; example 60 equals a minute ; Clock = Clock + 1 if Clock = 1 then gosub __Movement if Clock = 1 then Clock = 0 __Skip_Timer 20190127_Horizontal_Scroll_DPC.bas 20190127_Horizontal_Scroll_DPC.bas.bin 20190127_Horizontal_Scroll_DPC.txt 1 Quote Link to comment Share on other sites More sharing options...
Lillapojkenpåön Posted January 27, 2019 Share Posted January 27, 2019 (edited) Wouldn't that require ALOT of creativity and looping to get anything other than straight lines? The best would be if someone wrote and added a c function, like the existing vertical pfscroll, or pfpixel etc, seems like if one understands c, and how scrolling playfields work generally it would'nt be to hard to add. Btw pfhline takes alot of time from what I remember, don't know about pfclear but if you move some code you don't need them. __Level_1_Data_On pfpixel _Move 1 on pfpixel _Move 10 on _Move = _Move - 1 return thisbank __Level_1_Data_Off pfpixel _Move 1 off pfpixel _Move 10 off _Move = _Move + 1 return thisbank Edited January 27, 2019 by Lillapojkenpåön Quote Link to comment Share on other sites More sharing options...
+Lewis2907 Posted January 28, 2019 Author Share Posted January 28, 2019 Lillapojkenpåön, I agree that it would take some thinking. I have an idea but it will be painful if I can get it to work. My issue maybe the all famous " going over 262 scanlines" and possible slowing down or other issues I have not run into yet. I'm trying this method firs, before I try to use the other 2 methods from the Standard Kernel. The straight lines or dots could be used in a flight game or something I was working on before. I may revisit that now since I'm able to do this somewhat. Thanks for the example code as well. 1 Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted January 29, 2019 Share Posted January 29, 2019 Lillapojkenpåön, I agree that it would take some thinking. I have an idea but it will be painful if I can get it to work. My issue maybe the all famous " going over 262 scanlines" and possible slowing down or other issues I have not run into yet. I'm trying this method firs, before I try to use the other 2 methods from the Standard Kernel. The straight lines or dots could be used in a flight game or something I was working on before. I may revisit that now since I'm able to do this somewhat. Thanks for the example code as well. Unfortunately, I didn't respect the "going over 262 scanlines" problem. This led me to think several of my 4 way scrolling demos were solid. It turns out it depends on the receiver built into each TV, VCR or monitor. So, you never *really* know if your Mom, Dog, Postman or Roommates Girlfriend is going to see your game wobble and roll. Going over cycle happens Quote Link to comment Share on other sites More sharing options...
+Lewis2907 Posted January 29, 2019 Author Share Posted January 29, 2019 Yeah, that's what I figured. I'm probably gonna play with pfpixel and pfhline and then implement your code as it's easier to make long scrolling levels. Just gotta figure out the data and how to adjust it then I can make begin making that I'm thinking of a game 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.