English Amiga Board


Go Back   English Amiga Board > Main > Retrogaming General Discussion

 
 
Thread Tools
Old 03 July 2020, 16:42   #1
Brick Nash
Prototron
 
Brick Nash's Avatar
 
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 410
Streets of Rage Amos demo

Hi everyone!

Thought I'd try a small demo of Streets of Rage 1 using Amos Pro 2.0 and see how far I could get. It just has one enemy who never dies and I think a third of the level, but it's only a demo.

[ Show youtube player ]

It works fine until it starts scrolling and then it slows down to a cow's pace, which I'm guessing is just down to Amos hitting its limits or simply bad programming by me (I'm guessing the latter). I'm using some weird techniques to animate meta bobs by using horizontally sliced images, so maybe that's too slow. Either way, it doesn't matter. (BTW, the health bar flicker is cause by Frapps recording and doesn't usually appear).

I was going to do some of Koshiro's music in Protracker and maybe try and animate the backgrounds, but I don't think I'll bother continuing with it now.

I'm Happy enough though. It's nice seeing the game run on an Amiga (I always thought it'd be a well suited game to the system), and it was a lot of fun to do.

Cheers!

Info:
16 Colours
Some Amcaf commands were used for controls and sounds
Backgrounds were built and displayed using in Tome4

Amos for Windows stock settings:
68040
AGA
Brick Nash is offline  
Old 03 July 2020, 17:24   #2
d4rk3lf
Registered User
 
d4rk3lf's Avatar
 
Join Date: Jul 2015
Location: Novi Sad, Serbia
Posts: 1,625
Sorry to hear you won't continue working on this.
Because it already looks nicer then all beat em up's on Amiga (except Golden Axe maybe).
d4rk3lf is offline  
Old 03 July 2020, 17:34   #3
gimbal
cheeky scoundrel
 
gimbal's Avatar
 
Join Date: Nov 2004
Location: Spijkenisse/Netherlands
Age: 42
Posts: 6,870
What I find interesting is that the slowdown remains even when you stop scrolling, it happens when the screen is not to the far left anymore. That would hint to me that code is constantly active every frame that really shouldn't be the moment you first trigger scrolling to happen.

But nice tech demo in any case. I'd take it at least one step further and put multiple enemies on screen without letting the game scroll, just to see what will happen then.
gimbal is offline  
Old 03 July 2020, 17:49   #4
Superman
Super Member
 
Superman's Avatar
 
Join Date: Sep 2014
Location: Wakefield
Age: 48
Posts: 1,328
Looks pretty nice actually
Superman is offline  
Old 03 July 2020, 18:04   #5
Brick Nash
Prototron
 
Brick Nash's Avatar
 
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 410
Thanks folks.

gimbal - I'm a terrible programmer so it could very well be the case of something running when it's not supposed to. I did find it a bit odd that it was so slow given the 68040 setting so maybe it could be improved. I'll probably tweak it a bit further as I had a whole moveset planned out, but ATM it's too slow to invest time to do anything significant. I was in the middle of working out how to get objects which could switch between bad guys, so 2 enemies on screen will probably be the next step.
Brick Nash is offline  
Old 03 July 2020, 19:41   #6
Havie
Registered User
 
Havie's Avatar
 
Join Date: Mar 2012
Location: UK
Posts: 1,886
How are you doing the scrolling - is it hardware based as in theory this wouldn't cause slow down. This looks really good and the fact you have collision detection working then you're a long way down the line.

If you sort scrolling you might get your motivation going...
Havie is offline  
Old 03 July 2020, 20:27   #7
Brick Nash
Prototron
 
Brick Nash's Avatar
 
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 410
Quote:
Originally Posted by Havie View Post
How are you doing the scrolling - is it hardware based as in theory this wouldn't cause slow down. This looks really good and the fact you have collision detection working then you're a long way down the line.

If you sort scrolling you might get your motivation going...
It's just done with a "Screen Copy" command in Amos, which I think uses the Blitter, and it activates when the player's X coordinate is over a certain point of the screen viewport.

I'd definitely keep going if I could get it faster, but I was always aware of the limitations of both Amos and my ropy coding. I'm brand new to scrolling techniques too, but I've only been at the project for two weeks so who knows.
Brick Nash is offline  
Old 03 July 2020, 21:04   #8
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
Quote:
Originally Posted by Brick Nash View Post
It's just done with a "Screen Copy" command in Amos, which I think uses the Blitter, and it activates when the player's X coordinate is over a certain point of the screen viewport.

I'd definitely keep going if I could get it faster, but I was always aware of the limitations of both Amos and my ropy coding. I'm brand new to scrolling techniques too, but I've only been at the project for two weeks so who knows.

I don't know enough about AMOS as I'm more of an assembler person.

The technique for horizontal scrolling is very simple and requires for little DMA time.

Consider you have a 320x256 screen, each tile is 16x16 pixels. When you place the tile you start at 0,0 (top left) and then work along the x axis plotting the tiles till you have 20 tiles, then you go to the next row and place the next 20 tiles...all the way till you get 16 tiles depth giving you 256 pixels.

Now when you scroll, you modify the BPLCON1 register for both odd and even bitplanes, this adjusts the fine scroll of the display. if you were scrolling right, you would add $11 to BPLCON1 and place a 16x16 tile at position 19,1, as you scroll further... you plot the tile at 19,2... 19,3 on each video frame.

When you reach the 16th tile ($FF in BPLCON1) you will add two to the Bitplane screen address and reset BPLCON1 to 0.

It is really that simple.

For scrolling left you just do things in reverse but instead of plotting at column 19 you plot at column 0.

I've seen AMOS games do this sort of thing so it is surely possible.

Geezer
mcgeezer is offline  
Old 03 July 2020, 22:02   #9
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,384
AMOS can natively do smooth panning with the Screen Offset command (at least, that is the AMOS PRO command to do this. Pretty sure it's the same command in AMOS, might be called a little differently).

However, this moves an entire screen not a part of it. To use this with a score panel, the top panel and the game are need to be separate screens. It also doesn't wrap around automatically (so once you hit the size of the screen it'll give an error if you try to increase it further) and does not support the "corkscrew scrolling" manyassembly programs use. So you need to do things a bit differently.

The way I did it back in the day was to define a screen twice as wide as I wanted to display. Then, while I was scrolling along to the right, I'd add the new tiles to the right of the screen and to the left side of the screen (as space became available). This way, when I reached the maximum width of the screen, all I'd need to do was reset the screen offset to zero.

The key to do this efficiently is to not draw all the tiles at the same time, but to spread them out over different frames. So if your tiles are 16x16 pixels and you want to scroll at a speed of one pixel per frame, you draw no more than 1 tile to both sides per frame. This method will work at full 50Hz speed even on an A500 and without compiling.

Note that I do not know how to do this with TOME.
roondar is offline  
Old 03 July 2020, 22:52   #10
Brick Nash
Prototron
 
Brick Nash's Avatar
 
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 410
Quote:
Originally Posted by mcgeezer View Post
I don't know enough about AMOS as I'm more of an assembler person.

The technique for horizontal scrolling is very simple and requires for little DMA time.

Consider you have a 320x256 screen, each tile is 16x16 pixels. When you place the tile you start at 0,0 (top left) and then work along the x axis plotting the tiles till you have 20 tiles, then you go to the next row and place the next 20 tiles...all the way till you get 16 tiles depth giving you 256 pixels.

Now when you scroll, you modify the BPLCON1 register for both odd and even bitplanes, this adjusts the fine scroll of the display. if you were scrolling right, you would add $11 to BPLCON1 and place a 16x16 tile at position 19,1, as you scroll further... you plot the tile at 19,2... 19,3 on each video frame.

When you reach the 16th tile ($FF in BPLCON1) you will add two to the Bitplane screen address and reset BPLCON1 to 0.

It is really that simple.

For scrolling left you just do things in reverse but instead of plotting at column 19 you plot at column 0.

I've seen AMOS games do this sort of thing so it is surely possible.

Geezer
I know a little assembler but not much. Amos pretty much does the gruntwork automatically after a bit of setting up, but yes I've seen it done quite fast as well so it's probably just my code being ham fisted. Cheers for the info though! I should really dive into assembler at some point.


Quote:
Originally Posted by roondar View Post
AMOS can natively do smooth panning with the Screen Offset command (at least, that is the AMOS PRO command to do this. Pretty sure it's the same command in AMOS, might be called a little differently).

However, this moves an entire screen not a part of it. To use this with a score panel, the top panel and the game are need to be separate screens. It also doesn't wrap around automatically (so once you hit the size of the screen it'll give an error if you try to increase it further) and does not support the "corkscrew scrolling" manyassembly programs use. So you need to do things a bit differently.

The way I did it back in the day was to define a screen twice as wide as I wanted to display. Then, while I was scrolling along to the right, I'd add the new tiles to the right of the screen and to the left side of the screen (as space became available). This way, when I reached the maximum width of the screen, all I'd need to do was reset the screen offset to zero.

The key to do this efficiently is to not draw all the tiles at the same time, but to spread them out over different frames. So if your tiles are 16x16 pixels and you want to scroll at a speed of one pixel per frame, you draw no more than 1 tile to both sides per frame. This method will work at full 50Hz speed even on an A500 and without compiling.

Note that I do not know how to do this with TOME.
The technique I'm using is basically drawing the whole map on a hidden screen and then copying parts of it to the viewport as needed. I think there's another way in the manual that just draws a 16 tile column to the right of the screens edge and that gets scrolled along and then another added when needed (I think that's the same as what you're saying) but I'd need to look into it further. The section with the healthbars is a separate screen anyway so that's not a problem.

Yeah, maybe I should keep on with this as it seems like there are a few more options out there which could speed things up.
Brick Nash is offline  
Old 03 July 2020, 22:56   #11
d4rk3lf
Registered User
 
d4rk3lf's Avatar
 
Join Date: Jul 2015
Location: Novi Sad, Serbia
Posts: 1,625
Not sure how other feels, but beat em up like this, with static screen would be perfectly acceptable to me.

But then again, I understand, it's your motive to learn optimizing further, not only do the stuff you already know.
d4rk3lf is offline  
Old 04 July 2020, 01:23   #12
Hungry Horace
Wipe-Out Enthusiast
 
Hungry Horace's Avatar
 
Join Date: Nov 2005
Location: .
Age: 43
Posts: 2,538
Looks cool - i'm a big fan of both AMOS and Streets of Rage.

I'm sure those on the AMOS Factory/AMOS Pro FB group would be willing to look at the source and see if the scrolling routine could be fixed to give a good pace.


That technique described by roondar, used with the hardware scrolling should produce some pretty great results. I'd never thought of working it that way.
Hungry Horace is offline  
Old 04 July 2020, 07:04   #13
lesta_smsc
Registered User
 
lesta_smsc's Avatar
 
Join Date: Feb 2012
Location: United Kingdom
Posts: 3,166
Firstly, excellent demo!

Secondly, this might actually be a nice project for Streets of Rage clone - maybe call it something else for licencing issues such as Streets of AMOS! Would you be willing to open source it, I think it would be a shame for it to end, and if others are saying there is scope for improving scrolling, then might be possible to achieve a full level (with more enemies)...
lesta_smsc is offline  
Old 04 July 2020, 11:12   #14
Brick Nash
Prototron
 
Brick Nash's Avatar
 
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 410
Hungry Horace - That's a good idea. I keep forgetting about the Amos Factory group, so I might post the source on the forums there and see if any kind soul can maybe point out what's wrong.

lesta_smsc - If I ever finished it, I was going to call it something like "The Road of Anger" and have a slightly different moveset than the Megadrive game. Ultimately, it was really just to see if I could build an engine for these types of games in Amos, as the Amiga was a bit lacking in the beat 'em up department. I actually have two enemies on screen now (collisions are ropy though as they are sharing global variables) and it doesn't seem to move any slower. So yeah, there's possibilities.

I'm kind of motivated to try again after all the cool information from everyone, so thanks all!
Brick Nash is offline  
Old 04 July 2020, 14:19   #15
spajdr
Old fart
 
spajdr's Avatar
 
Join Date: Feb 2003
Location: Ostrava/Czech Republic
Age: 46
Posts: 315
Send a message via ICQ to spajdr
Looks good so far Brick_Nash!
spajdr is offline  
Old 04 July 2020, 14:40   #16
rothers
Registered User
 
Join Date: Apr 2018
Location: UK
Posts: 487
You can absolutely get this to scroll in AMOS without any slow down by using a wide hardware screen. You could get round the limits of that by having the playing walk off the 'section' at the end of the hardware screen and in to a new zone. This is actually quite common in beat em ups from Final Fight to Double Dragon (I suspect some did that because they were using the same method).
rothers is offline  
Old 04 July 2020, 17:26   #17
Brick Nash
Prototron
 
Brick Nash's Avatar
 
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 410
Quote:
Originally Posted by rothers View Post
You can absolutely get this to scroll in AMOS without any slow down by using a wide hardware screen. You could get round the limits of that by having the playing walk off the 'section' at the end of the hardware screen and in to a new zone. This is actually quite common in beat em ups from Final Fight to Double Dragon (I suspect some did that because they were using the same method).
I'm using a hidden screen which is 800 pixels wide and scrolling through that using screen copy to the viewport. Not sure if that's the same thing, but I think I get what you are on about with the sections.

Anyway, I've uploaded the source to the Amos Factory forums and hopefully someone will take a peek and tell me what I'm doing wrong.
Brick Nash is offline  
Old 04 July 2020, 20:18   #18
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,384
Using Screen Copy to scroll is very slow. The Amiga has special hardware to scroll (which does not copy the screen). This scrolling hardware is used by the Screen Offset command.

The good news is that if your bitmap/level is 1008 pixels or less wide, you can use Screen Offset without worrying about tiles or anything: just show the 800 pixel wide hidden screen and move it about using the Screen Offset command.

Edit: I'm sure that AMOS comes with a few examples that do just this.
roondar is offline  
Old 04 July 2020, 20:20   #19
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,175
Quote:
Originally Posted by Brick Nash View Post
I'm using a hidden screen which is 800 pixels wide and scrolling through that using screen copy to the viewport. Not sure if that's the same thing, but I think I get what you are on about with the sections.



Anyway, I've uploaded the source to the Amos Factory forums and hopefully someone will take a peek and tell me what I'm doing wrong.
Screen Copy is slow. The X-unlimited scrolling trick is to have a double-width screen plus 3 tile widths. The idea is to blit a tile to the side scrolling on behind the border and the same tile to the side you're scrolling away from also. The reason you blit behind is so you'll have an exact copy of the background image on both sides of the screen by the time you reach the edge of the screen.
Samurai_Crow is offline  
Old 04 July 2020, 20:45   #20
Brick Nash
Prototron
 
Brick Nash's Avatar
 
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 410
roondar & Samurai_Crow - thank you for the info.

EDIT: The Screen Offset instruction really worked! The scrolling is whizzing along now, although the bobs are a bit more flickery than before (not much though). There's definitely issues with my code though as I'm trying it on a 68000 OCS setting and the speed is up and down at times during the attack combos.

I was basically following the "fine scrolling" guide in the Amos Game Maker's manual as it was the only one I had on hand, and it used Screen Copy to scroll.

The full level is something like 3000 pixels wide, but it said in the manual you could easily swap between screens holding different parts of a map when a certain point is reached (which I think was what roondar was saying earlier).

Last edited by Brick Nash; 04 July 2020 at 21:47.
Brick Nash is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Streets of Rage 2 with Blitz Master484 Coders. Blitz Basic 48 19 April 2020 13:33
Streets of Rage I vs II vs III - Which is Best? ZEUSDAZ Retrogaming General Discussion 16 16 August 2019 00:53
Final Fight vs Streets Of Rage 2 (Which Is Best?) ZEUSDAZ Retrogaming General Discussion 32 15 February 2017 21:30
Streets of Rage Remake Retro-Nerd Retrogaming General Discussion 10 22 April 2011 00:30
Streets of Rage for Amiga The Master Retrogaming General Discussion 6 17 August 2006 13:26

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:39.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.16866 seconds with 13 queries