09 November 2022, 12:15 | #101 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,220
|
Smooth horizontal scrolling on the ST in games such as Chuck Rock (probably Wolfchild, Carvup etc.. too), used preshifted block pairs. This meant that you had to be careful about the layout of tiles on your map, but it used the minimum necessary preshifted data, so it didn't take a huge amount of memory to store.
You could also build the code for each line (that was called 16 times), to fetch the data, and move it into screen memory efficiently. This is effectively how games like Cobra on the Spectum achieved smooth scrolling too. |
09 November 2022, 12:16 | #102 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,220
|
|
09 November 2022, 13:32 | #103 |
Registered User
Join Date: Sep 2022
Location: Eastbourne
Posts: 1,216
|
Should it have said "if you want to scroll horizontally in less than 16 pixel jumps without making significant design compromises if designing for an ST, or without cutting back on detail if converting from elsewhere you need to allocate duplicate 32k screens with preshifted tiles for however many pixels you really want to scroll". (my italics)?
|
09 November 2022, 14:02 | #104 | |
Inviyya Dude!
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,807
|
Quote:
Could you explain that a bit more? For the case if I ever try to code an ST game, that is... Love to read about clever coding techniques. |
|
09 November 2022, 14:23 | #105 |
Registered User
Join Date: Feb 2008
Location: .
Posts: 110
|
+1
In a 16 pixel-wide block, if you start preshifting a tile, you have to start including in those 16 pixels the next possible tile(S) existing to the right, the ones that will be displayed right after the current tile on the same line, because their preshifting "bleeds" into the current tile. If you don't do that, you will have a horrible discontinuity. That means you have to consider all the possible associations of TileA-TileB on screen for 32 pixels, and because memory is not unlimited, you can only have a limited number of tile association for your game with that technique, which sets constraints for level artists. If you don't want to have that constraint for preshifted tiles on ST, you will have to draw 2 tiles per 16-pixel block, using an OR each time for the second tile within your 16-pixel block, which will more than double the cost of drawing those tiles but will let you arrange them in any way you want. Last edited by Keops/Equinox; 09 November 2022 at 14:48. |
10 November 2022, 00:12 | #106 |
Registered User
Join Date: Feb 2009
Location: london/england
Posts: 1,347
|
|
15 November 2022, 13:11 | #107 |
Registered User
Join Date: Feb 2009
Location: london/england
Posts: 1,347
|
I have just checked out the longplay of Turrican 2 on the ST and it has the parallax scrolling shmup level. OK it's not as fluid as the C64 version but it is impressive.
I'd give it a go but ST cracks rarely have decent trainer options, 99% of the time it's useless unlimited lives/credits. |
19 August 2024, 19:07 | #108 | |
Inviyya Dude!
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,807
|
Quote:
I am a bit dabbling in ST coding at the moment, and would love to find out how some of that tricky stuff worked.. What do you mean by "block pairs" ? Plus that "You could also build the code for each line (that was called 16 times), to fetch the data" sounds quite mysterious to me... |
|
19 August 2024, 20:30 | #109 | |
Registered User
Join Date: May 2023
Location: Norwich
Posts: 530
|
Quote:
One trick to make this more performant is to only allow certain transitions between tiles. That way you can use pre-shifted versions that already contain the merged together data and so it can be drawn quicker. You basically generate specific code for the exact data you're going to generate. So, for example, a sequence of instructions to draw tile A three times, then tile X, then tile Y etc..This means you have to make less decisions, because each row of tiles can use the same instructions rather than checking the tile map each time to figure out what to draw next. It's not for the feint hearted and requires solid optimization to be entirely worthwhile. |
|
20 August 2024, 00:02 | #110 |
Registered User
Join Date: Nov 2021
Location: Utrecht/Netherlands
Posts: 342
|
Which chips in Amiga do and help for smooth scrolling? As far as I know copper can change the number of colors in screen only
|
20 August 2024, 09:49 | #111 |
Inviyya Dude!
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,807
|
|
20 August 2024, 09:50 | #112 | |
Inviyya Dude!
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,807
|
Quote:
Thanks... |
|
20 August 2024, 10:54 | #113 | |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,220
|
Quote:
The colour registers are just 32 of those registers. There's also (among many others), bitplane pointers, bitplane control registers, sprite registers, audio registers etc... |
|
20 August 2024, 17:33 | #114 | |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,035
|
Quote:
It can access most of the hardware registers, triggering blits, interrupts, screen mode changes, sprite multiplexing, sample triggering, changing bitplane pointers, literally any hardware register that can be written to, can be done by the copper. It's what makes the Amiga.......Amiga! |
|
20 August 2024, 22:14 | #115 |
Registered User
Join Date: May 2023
Location: essex
Posts: 655
|
I presume on Amiga you can move the screen memory pointer to scroll the screen around a large bitmap 1 pixel at a time?
|
21 August 2024, 14:17 | #116 | |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,035
|
Quote:
Scrolling vertically can be done by changing the bitplane pointers, so yes you can easily scroll around a large Bitmap and the Amiga isn't remotely being stressed doing it. |
|
21 August 2024, 23:10 | #117 | |
Registered User
Join Date: Nov 2021
Location: Utrecht/Netherlands
Posts: 342
|
Quote:
|
|
Yesterday, 14:00 | #118 | |
Registered User
Join Date: May 2023
Location: essex
Posts: 655
|
Quote:
There was a great thread about this on Atari-forum quite a while ago. |
|
Yesterday, 14:36 | #119 | |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,220
|
Quote:
The Amiga hardware doesn't know what an IFF is... it would be a raw bitplane image (interleaved or not depending on what you wanted to do) |
|
Yesterday, 17:09 | #120 |
Registered User
Join Date: May 2023
Location: essex
Posts: 655
|
Yes indeed but Blitz BASIC or C++ compilers didn't have JPEG/PNG support so I was just being in context for Amiga tools BITD
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
9 Lives - smooth scrolling | punkrulesok | support.Games | 14 | 22 November 2018 22:24 |
smooth scrolling.is it possible? | kirk | support.WinUAE | 30 | 01 October 2007 13:57 |
smooth scrolling | sink | support.WinUAE | 3 | 20 July 2007 01:16 |
Smooth scrolling with WinUAE? | Tony Landais | support.WinUAE | 13 | 30 May 2007 03:55 |
Just can't get smooth scrolling | Bobbin | support.WinUAE | 0 | 23 November 2002 00:52 |
|
|