Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2   Go Down

Author Topic: Scrolling screen issue  (Read 9951 times)

0 Members and 3 Guests are viewing this topic.

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Scrolling screen issue
« on: May 05, 2015, 12:36:56 AM »

   Hey guys,

I have attached a source code here because I am having an issue with the scrolling. If you scroll all the way down for the data area you will find there are 14 rows and 19 columns. So if you multiply them in total it should equal 266. I do know that the screen height is only 200. I take it should have some sprites outside the boundary of the screen. So when I use the function screen offset to go down it repeats the original screen but with gibberish colours instead of displaying the remaining objects. I am taking it I am going outside the boundary and I am looping back again to the actual screen and causing graphics glitches. I don't know why it is doing that. I am following the manual and still have issues.

I have pretty much attached the source code here in hopes someone could shed some light into the matter. I did not paste the graphics, so someone have to use their own to test this one out for me.

Thanks in advance.
Logged

bruceuncle

  • AMOS Dev
  • A500
  • *****
  • Karma: 6
  • Offline Offline
  • Gender: Male
  • Posts: 425
  • WINUAE Amiga User
Re: Scrolling screen issue
« Reply #1 on: May 06, 2015, 01:49:22 AM »

Not easy to give any opinion without the missing file.  Could you post it as a *.zip please?

It looks like you're trying to scroll a screen using Screen Offset.  This only works where you have opened a screen larger than what's being displayed.  You can then use Screen Offset to scroll around that area, but NOT outside that area.  Eg.  If you define a screen 640 x 512 and then display it in a 320 x 256 view (view = what you see on the monitor) you can scroll around within that area.  But you will get graphics glitches if you move your 320 x 256 view anywhere outside of that 640 x 512 boundary.
Logged
Repeat after me ...  "The AMOS Pro architecture is complex but it is not complicated."

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Re: Scrolling screen issue
« Reply #2 on: May 06, 2015, 06:26:48 AM »

Actually what I want to do is make the scrolling more smoother than the way it is and I have issue where the character disappears after a certain amount of scrolling. By all means I will send it all tomorrow.

Is it possible I can have a big size map to scroll the screen without having to have A VERY huge screen open where it drains chip RAM to zero? If not, then the only request I have is it possible I can use the FAST RAM to open this huge big screen and not the chip RAM? I am always left with 200 KB CHIP RAM because the engine uses 100% Chip RAM and not a single Fast RAM.
Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: Scrolling screen issue
« Reply #3 on: May 06, 2015, 11:00:24 AM »

@xboxisfinished

How many tiles do you want a screen at once?  How big are the tiles?  I assume that since you say your display is 200 pixels tall, you're using 60 Hz NTSC scan rates instead of the 50 Hz PAL modes most Europeans and Australians are used to.  The most pixels you'll need to do an 8-way scroller is 2 times the width of a display plus 2 tile widths and 2 times the height of the display plus two tile heights.

The idea of making a fast tile scroller is to blit tiles behind you as well as ahead of you so that when you reach the end of the screen, there will be an exact duplicate at the opposite side.  The plan of how to do this is documented in http://aminet.net/package/dev/src/ScrollingTrick.  Don't worry about the licensing, Georg has assured me that he now considers this documentation public domain.
Logged

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Re: Scrolling screen issue
« Reply #4 on: May 06, 2015, 12:35:13 PM »

SamuraiCrow

I take it even though the source code is not AMOS I will be able to somehow convert it to AMOS?
Logged

Xertese

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 47
  • Generic Amiga User
Re: Scrolling screen issue
« Reply #5 on: May 06, 2015, 01:54:33 PM »

SamuraiCrow

I take it even though the source code is not AMOS I will be able to somehow convert it to AMOS?

It's an example of course you can convert it to AMOS taking the theory and applying it using AMOS and it's command set.
Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: Scrolling screen issue
« Reply #6 on: May 06, 2015, 02:20:33 PM »

The source is not going to be as helpful as the documentation.
Logged

Hungry Horace

  • Amorphous Blue-Blob Man
  • Site Admin
  • A4000T
  • ******
  • Karma: 307
  • Offline Offline
  • Gender: Male
  • Posts: 3,364
  • Don't forget... Ameboid's need love too!
    • AUW
Re: Scrolling screen issue
« Reply #7 on: May 06, 2015, 06:32:44 PM »

The Ultimate Amos book has some great guides on scrolling technique .... Is that one available here?
Logged
Quote from: KillerGorilla
because winuae is made of code and your amiga is made of stuff

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Re: Scrolling screen issue
« Reply #8 on: May 06, 2015, 09:33:33 PM »

I like Hungry Horace advice a lot more!! I have reached where I am now in my game development all by reading books and checking AMOS code sample and trying it out. If there is an actual book that teaches me how to make smoother better scrolling I will love that.

I just want to ask this question if the answer is yes I will do it right away. Would posting right now in the next reply an attachment of my source code with the graphics it is using and having you guys see what I have written so far, help me by you guys checking my code and advising me how to write it better, more efficient and giving me a solution for a smooth screen scrolling? If the answer is no and it the only reply I will get is a QL with more documentation to read, then can I skip attaching the source code and sending me this document link instead?

Thanks in advance.
Logged

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Re: Scrolling screen issue
« Reply #9 on: May 07, 2015, 04:48:31 AM »

I have decided to attach the source code here because I find the screen scrolling non smooth and annoying. I really want it to be smooth. I am hoping someone could point out where I went wrong in the source code and point me to the right direction.
Logged

bruceuncle

  • AMOS Dev
  • A500
  • *****
  • Karma: 6
  • Offline Offline
  • Gender: Male
  • Posts: 425
  • WINUAE Amiga User
Re: Scrolling screen issue
« Reply #10 on: May 07, 2015, 12:28:30 PM »

Actually what I want to do is make the scrolling more smoother than the way it is and I have issue where the character disappears after a certain amount of scrolling. By all means I will send it all tomorrow.

Is it possible I can have a big size map to scroll the screen without having to have A VERY huge screen open where it drains chip RAM to zero? If not, then the only request I have is it possible I can use the FAST RAM to open this huge big screen and not the chip RAM? I am always left with 200 KB CHIP RAM because the engine uses 100% Chip RAM and not a single Fast RAM.
I'm surprised you only get 200Kb chip RAM left.  With the 2Mb fast RAM you've installed, I would have thought that you'd get more than that.  With a 16-colour hires, non-interlaced Workbench and AMOS Pro running, I'm seeing only approximately 167Kb chip RAM in use.  Which, in your machine should give you over 300Kb chip RAM free.  Is there any way you can verify that fast RAM is being recognised okay?  If it is, check for other things that might be chewing up precious chip RAM.  Eg. interlaced and/or 32 colour workbench screens or some other applications running.  Anyone know of any way to check what's using the RAM?
Logged
Repeat after me ...  "The AMOS Pro architecture is complex but it is not complicated."

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Re: Scrolling screen issue
« Reply #11 on: May 07, 2015, 03:48:53 PM »

My biggest issue is that everything is used in chip RAM. It is as if the Fast RAM does not exist. That what frustrates me. I was hoping 90% of my program uses Fast RAM and only 10% use chip RAM.
Logged

Xertese

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 47
  • Generic Amiga User
Re: Scrolling screen issue
« Reply #12 on: May 07, 2015, 05:05:15 PM »

My biggest issue is that everything is used in chip RAM. It is as if the Fast RAM does not exist. That what frustrates me. I was hoping 90% of my program uses Fast RAM and only 10% use chip RAM.

You can specify which memory to use in AMOS using the "reserve as" command if i remember correctly.
« Last Edit: May 07, 2015, 05:06:58 PM by Xertese »
Logged

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Re: Scrolling screen issue
« Reply #13 on: May 07, 2015, 05:50:49 PM »

My biggest issue is that everything is used in chip RAM. It is as if the Fast RAM does not exist. That what frustrates me. I was hoping 90% of my program uses Fast RAM and only 10% use chip RAM.

You can specify which memory to use in AMOS using the "reserve as" command if i remember correctly.

understood. but is that it? just say reverse as fast blah blah blah and it automatically knows to use fast ram instead of chip ram? No other thing need to be done?
Logged

Xertese

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 47
  • Generic Amiga User
Re: Scrolling screen issue
« Reply #14 on: May 07, 2015, 08:22:21 PM »

No not quite that simple i think the reserve as command is used to set aside an area of memory for your arrays/variables which can consume a lot of memory depending on the type of program you're making and how many dimensions your arrays contain so it is a useful command if used correctly.

Basically you need to do a little math to work how much memory your arrays take up then reserve that area of memory in fast RAM to store those arrays but you will run into problems when you try to run your game on different AMIGA's like ones with 512k chip + 512k fast or 1MB chip there are a lot of configurations and if you want your game to run on all with 1MB and WB 1.3 or > then you'll need to work this into your code.

AMOS WILL ALWAYS USE CHIP RAM FIRST UNLESS TOLD OTHERWISE.
Wish i could help you more but it's been over 15 years since i used AMOS but it is all coming back to me slowly since finding this site.

If you're struggling may i suggest you begin with Easy AMOS that's where i began then when onto AMOS the creator and only now am i venturing into AMOS Pro because at the time i couldn't afford it got AMOS the creator of of an Amiga Format cover disk back in the day.

Ahh the memories. ;)
« Last Edit: May 07, 2015, 08:39:24 PM by Xertese »
Logged
Pages: [1] 2   Go Up
 

TinyPortal 2.2.2 © 2005-2022