Jump to content

Photo

Yet Another Scrolling Demo

scrolling collision detection 7800basic

10 replies to this topic

#1 Mord OFFLINE  

Mord

    River Patroller

  • 2,696 posts
  • Location:Canada

Posted Tue May 14, 2019 3:35 AM

Ok since I've been letting yet another side project rot away for too long and I really don't know if/when I'll get back to it, here's another little demo as I fiddle with scrolling.

 

In a nutshell the program uses plotmapfile to display full screens in 160A and the player can move about in 4 directions, going 1 full tile at a time. When you reach the edge of the screen that is connected to a different map, it will scroll that map in black and white to the new screen then flash the color back.

 

There are only two screens in this program. The screen you start in, and the screen to the left of it. Any other screen edges you can reach are "dead" and won't trigger a change.  There's a "template" tmx file included that's got the embedded tiles, etc all set up for adding new screens for playing around with.

 

Additionally this demo includes collision detection between the player and the map tiles. Changing around the order of tiles in the tmx files would obviously mess around with the collision code so keep that in mind.

 

Compiling instructions in a command/dos window are listed in the bank0c.bas file.

 

As mentioned in that file feel free to use anything in the code in your own projects. 

 

And yes, I suck at drawing hero sprites. :)

 

 

 

Attached Files


Edited by Mord, Yesterday, 2:32 AM.


#2 R_Leo_1 OFFLINE  

R_Leo_1

    Star Raider

  • 99 posts
  • Location:Davenport, FL

Posted Tue May 14, 2019 12:19 PM

This is great, love the NES style graphics on this one. Would love to see an RPG on 7800 :)



#3 SmittyB OFFLINE  

SmittyB

    Moonsweeper

  • 370 posts

Posted Tue May 14, 2019 1:35 PM

Looks good, I'd certainly play a full game looking like that. I do like how the colour flashes back in after scrolling, not sure if it would get annoying after a while but it certainly looks good.  :thumbsup:



#4 DracIsBack OFFLINE  

DracIsBack

    Quadrunner

  • 5,823 posts
  • Location:Toronto, Canada

Posted Tue May 14, 2019 7:58 PM

Hmm ... didn't work for me on Cuttle Cart 2 using real hardware



#5 Mord OFFLINE  

Mord

    River Patroller

  • Topic Starter
  • 2,696 posts
  • Location:Canada

Posted Wed May 15, 2019 2:19 AM

Hm. Admittedly I haven't tried this on mame either. I find mame/a7800 a bit finicky to use so I don't know if it erroring right now is because of the rom or because I don't know what I'm doing with it. Could someone comfortable with mame try checking it out to make sure it fails and give me the error if it does? This rom does use an extra 16k at $4000, which isn't something I normally use.



#6 Trebor OFFLINE  

Trebor

    River Patroller

  • 4,743 posts

Posted Wed May 15, 2019 4:55 AM

Runs perfectly fine under A7800:

 

 

:)



#7 DracIsBack OFFLINE  

DracIsBack

    Quadrunner

  • 5,823 posts
  • Location:Toronto, Canada

Posted Wed May 15, 2019 11:17 AM

Damn - that looks so very, very slick! :-D



#8 Mord OFFLINE  

Mord

    River Patroller

  • Topic Starter
  • 2,696 posts
  • Location:Canada

Posted Thu May 16, 2019 1:44 AM

Hm. looking at the video the tiles are still corrupting during the actual scroll - they should be showing the new screen moving onto the screen. I'll try looking into it this weekend as well as getting use to using A7800 again.



#9 Mord OFFLINE  

Mord

    River Patroller

  • Topic Starter
  • 2,696 posts
  • Location:Canada

Posted Fri May 17, 2019 3:55 AM

Ok I can pretty much confirm it's a bankswitching issue that's causing the graphics corruption. It's something I spoke with Rev about in the earlier incarnation of this test a while back. Looks like the fix I was able to do for prosystem doesn't work on hardware/mame/a7800. I did a quick change over to a more standard rom type - those without 16k rom sitting at $4000 - and it worked as intended. I'll do a bit of cleanup and add an extra room of sample graphics to show the up/down scrolling then post updated roms/zips. I won't have time to post it today but should have it posted early Saturday morning before most people wake up. :)



#10 Mord OFFLINE  

Mord

    River Patroller

  • Topic Starter
  • 2,696 posts
  • Location:Canada

Posted Yesterday, 2:39 AM

Ok I've fixed up the code and updated the attachments in the first post.  I've left the original zip there for people to see what it was originally like - no harm in it.  The new version using a 128k rom structure is in rpg7800-fixed.zip.

 

The bin and a78 files are the updated fixed versions. If someone really wants to see the old versions they're in the zip file.  I tested using a7800 this time so shouldn't be any issues!

 

The basis of the corrupted graphics appears to stem from trying to use a bank changing gosub out of a permanent bank.  I originally tried to move the stuff that was in the permanent bank at $4000 to the top bank in the fixed version and the corrupted graphics remained.

 

I added a third room going down from the first room to test the vertical scrolling - there were two careless bugs in the vertical scrolling in the original version, so a good thing I did this test!  The first was not specifying the width of the extended map in the vertical direction. I didn't bother since I was going to plot the entire width of 20 anyway. That caused it to only display the first line of graphics for the entire scroll.  After that was fixed I noticed my setup in the scroll data was reversed. Placed the rooms in the wrong halves of the map for the intended scrolling direction.



#11 SlidellMan OFFLINE  

SlidellMan

    Moonsweeper

  • 335 posts
  • Location:Slidell, Louisiana

Posted Yesterday, 12:14 PM

So far, what you have is solid. If you need more pixel artists, I know a few on Newgrounds.







Also tagged with one or more of these keywords: scrolling, collision detection, 7800basic

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users