Jump to content

Photo

Scrolling Data for Levels (Standard Kernel, MultiSprite, DPC)


16 replies to this topic

#1 Lewis2907 OFFLINE  

Lewis2907

    Moonsweeper

  • 286 posts
  • Location:Senatobia, MS

Posted Fri Sep 7, 2018 3:35 PM

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 Level1A
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,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,12
0,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,0
0,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,4
0,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,4
end


Edited by Lewis2907, Fri Sep 7, 2018 3:36 PM.


#2 Gemintronic ONLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 9,205 posts

Posted Fri Sep 14, 2018 12:06 AM

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/...scrolling-demo/

http://atariage.com/...ata-want-4-way/

 

I know nothing about the DPC+ kernel.  Maybe by now it supports scrolling.



#3 Lewis2907 OFFLINE  

Lewis2907

    Moonsweeper

  • Topic Starter
  • 286 posts
  • Location:Senatobia, MS

Posted Fri Sep 14, 2018 11:44 AM

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.

#4 Lewis2907 OFFLINE  

Lewis2907

    Moonsweeper

  • Topic Starter
  • 286 posts
  • Location:Senatobia, MS

Posted Tue Sep 25, 2018 2:04 PM

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. 

Attached Files



#5 Gemintronic ONLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 9,205 posts

Posted Wed Sep 26, 2018 7:32 AM

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!



#6 Lewis2907 OFFLINE  

Lewis2907

    Moonsweeper

  • Topic Starter
  • 286 posts
  • Location:Senatobia, MS

Posted Wed Sep 26, 2018 8:51 AM

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.



#7 Lewis2907 OFFLINE  

Lewis2907

    Moonsweeper

  • Topic Starter
  • 286 posts
  • Location:Senatobia, MS

Posted Sun Sep 30, 2018 4:57 PM

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.

Attached Files


Edited by Lewis2907, Sun Sep 30, 2018 7:33 PM.


#8 Lewis2907 OFFLINE  

Lewis2907

    Moonsweeper

  • Topic Starter
  • 286 posts
  • Location:Senatobia, MS

Posted Sun Oct 14, 2018 1:31 PM

Gemintronic,

 

I am using your S3: The Sensational Santuci Sisters [CANCELLED] at:

 

http://atariage.com/...26693&hl=+sss36

 

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.

Attached Files



#9 Lewis2907 OFFLINE  

Lewis2907

    Moonsweeper

  • Topic Starter
  • 286 posts
  • Location:Senatobia, MS

Posted Tue Oct 16, 2018 5:59 PM

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. 

Attached Files



#10 Lewis2907 OFFLINE  

Lewis2907

    Moonsweeper

  • Topic Starter
  • 286 posts
  • Location:Senatobia, MS

Posted Wed Oct 17, 2018 7:08 PM

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

Attached Files



#11 Lewis2907 OFFLINE  

Lewis2907

    Moonsweeper

  • Topic Starter
  • 286 posts
  • Location:Senatobia, MS

Posted Sun Oct 21, 2018 10:29 AM

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.

#12 Lewis2907 OFFLINE  

Lewis2907

    Moonsweeper

  • Topic Starter
  • 286 posts
  • Location:Senatobia, MS

Posted Tue Oct 30, 2018 4:42 PM

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. 

Attached Files


Edited by Lewis2907, Tue Oct 30, 2018 4:42 PM.


#13 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 28,789 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Wed Oct 31, 2018 8:45 AM

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.



#14 Lewis2907 OFFLINE  

Lewis2907

    Moonsweeper

  • Topic Starter
  • 286 posts
  • Location:Senatobia, MS

Posted Wed Oct 31, 2018 10:36 AM

Ok thanks. I will continue to play around with these version's. Maybe I can make something one day half orginal.

#15 Gemintronic ONLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 9,205 posts

Posted Tue Nov 13, 2018 8:01 AM

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 :)

 

Attached File  mazecraze2b.bas   14.18KB   2 downloads



#16 Lewis2907 OFFLINE  

Lewis2907

    Moonsweeper

  • Topic Starter
  • 286 posts
  • Location:Senatobia, MS

Posted Tue Nov 13, 2018 2:31 PM

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.



#17 Gemintronic ONLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 9,205 posts

Posted Tue Nov 13, 2018 3:20 PM

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.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users