Jump to content



1

WIP - Horizontal Scroller


44 replies to this topic

#26 MaPa OFFLINE  

MaPa

    Dragonstomper

  • 564 posts
  • Location:Czech Republic

Posted Tue Nov 9, 2010 9:57 AM

View PostJosé Pereira, on Tue Nov 9, 2010 8:50 AM, said:


Hi, indeed it isn't.
But Joystick or the KeyPad on an Emulator. It moves in the 8directions smoothly...


José Pereira.

I got myself again, of course I tried joystick, cursor keys, console keys, remaped joystick control to numpad but nothing worked. Just to realize that I had scroll lock switched on all the time and therefore the joystick didn't work :)

Edited by MaPa, Tue Nov 9, 2010 9:58 AM.


#27 José Pereira OFFLINE  

José Pereira

    River Patroller

  • 2,461 posts
  • Location:Lisbon - Portugal

Posted Wed Nov 10, 2010 6:40 AM

View PostR6502A, on Thu Nov 4, 2010 9:52 PM, said:

Hello,

I've decided to attempt write a game for my beloved Atari 800XL. The intention is to write a horizontal scrolling game in the vein of R-Type and Section-Z, that makes user of the Atari 8 bit strengths/weaknesses.

I intend to post xex files of my progress and welcome advice any of you may have. Once complete I might post the source code for all to see.

I'll start by setting up a display list using Antic mode 4 lines and run a continuous scroll between two screens (Updating graphics as I go) i.e. (screen A, Screen B, Screen A (A copy)). A DLI routine or 2 will change the character set on each line (24 in total) and each will use the 80 characters for the screen area.

A software sprite routine will write to the character set area and using a character screen opens up the possibility of coarse character based sprites, which will be probably be used for weapons fire.



R6502A

Hi, don't know if this helps, but I am with an A8 8way scrolling Game in Hands and was for all ways trying to get space for SoftSprites and stil uses real ANTIC4 CharMode with less Memory/Charsets I could get.
And I discouver (seeing the game Maps) that Scroll them horizontally The Font of Line0 are different from Lines 1and2.

And because the Sprites moves 1pixel horiz. and 4vertical a time (Isometric) I change the C64 sprites 21pixels high into 20pixels.
The Charsets are "interleaved", like:
CharLine0: CharSet0
CharLine1: CharSet1
CharLine2: CharSet2
CharLine3: Charset0
CharLine4: Charset1
CharLine5: Charset2
(and so on...)

now each SoftSprite when moves Horizontal have 3+1Char(Shifting)
and Vertical only 3Chars, because moving 4pixels done, when he enters in the next Charset0, he is already out the firs Line CharSet0.
This is the same as saying that the same SoftSprite cannot be in different Lines and 2Times/Lines in the same Charset.
And now I can, for ex. have more SoftSprites and less Chars space needed in each CharSet.





For an Horizontal Scrolling, and I have many Maps from many ones (Gradius, Salamander, R-Type, Armalyte (by hand...),...) or even your own new, you have possible to design Backgr. Gfxs. Horizontally and that:
-> SoftSprite:20->24pixels High need are 3+1 (shifting) Chars needed vertically
-> Like this using my Method you would need:
CharLine0: CharSet0
CharLine1: CharSet1
CharLine2: Charset2
CharLine3: CharSet3

When moving Horizontal you need 3+1(Shifting), Vertical same 3+1(Shifting).
When he goes to the next CharLine0, he already leaves the last Carset0 CharLine.
Now a SoftSprite only needs 4Chars each.
In my case 8SoftSprites needed are 32Chars. and have 96free for the Backgr. Gfxs. They are even more than I need!...
You probably can design Gfxs. with just 96Chars for each CharLine... and 4Charsets/4Kb needed.



See, instead you go into place Tiles in a pseudo-BitMap you probably will have less Memory needed and just Chars, moving and placing real Chars/Tiles.



Hope you understand and it helps you in some way...
Greets.
José Pereira.

#28 R6502A OFFLINE  

R6502A

    Star Raider

  • 62 posts
  • Location:London

Posted Thu Nov 11, 2010 3:40 AM

View PostWrathchild, on Sat Nov 6, 2010 5:07 AM, said:

View PostR6502A, on Fri Nov 5, 2010 7:25 PM, said:

... Where can I find them please?

Here

Thank you.

#29 R6502A OFFLINE  

R6502A

    Star Raider

  • 62 posts
  • Location:London

Posted Thu Nov 11, 2010 3:50 AM

View PostJosé Pereira, on Wed Nov 10, 2010 6:40 AM, said:

View PostR6502A, on Thu Nov 4, 2010 9:52 PM, said:

Hello,

I've decided to attempt write a game for my beloved Atari 800XL. The intention is to write a horizontal scrolling game in the vein of R-Type and Section-Z, that makes user of the Atari 8 bit strengths/weaknesses.

I intend to post xex files of my progress and welcome advice any of you may have. Once complete I might post the source code for all to see.

I'll start by setting up a display list using Antic mode 4 lines and run a continuous scroll between two screens (Updating graphics as I go) i.e. (screen A, Screen B, Screen A (A copy)). A DLI routine or 2 will change the character set on each line (24 in total) and each will use the 80 characters for the screen area.

A software sprite routine will write to the character set area and using a character screen opens up the possibility of coarse character based sprites, which will be probably be used for weapons fire.



R6502A

Hi, don't know if this helps, but I am with an A8 8way scrolling Game in Hands and was for all ways trying to get space for SoftSprites and stil uses real ANTIC4 CharMode with less Memory/Charsets I could get.
And I discouver (seeing the game Maps) that Scroll them horizontally The Font of Line0 are different from Lines 1and2.

And because the Sprites moves 1pixel horiz. and 4vertical a time (Isometric) I change the C64 sprites 21pixels high into 20pixels.
The Charsets are "interleaved", like:
CharLine0: CharSet0
CharLine1: CharSet1
CharLine2: CharSet2
CharLine3: Charset0
CharLine4: Charset1
CharLine5: Charset2
(and so on...)

 now each SoftSprite when moves Horizontal have 3+1Char(Shifting)
and Vertical only 3Chars, because moving 4pixels done, when he enters in the next Charset0, he is already out the firs Line CharSet0.
This is the same as saying that the same SoftSprite cannot be in different Lines and 2Times/Lines in the same Charset.
And now I can, for ex. have more SoftSprites and less Chars space needed in each CharSet.





For an Horizontal Scrolling, and I have many Maps from many ones (Gradius, Salamander, R-Type, Armalyte (by hand...),...) or even your own new, you have possible to design Backgr. Gfxs. Horizontally and that:
-> SoftSprite:20->24pixels High need are 3+1 (shifting) Chars needed vertically
-> Like this using my Method you would need:
CharLine0: CharSet0
CharLine1: CharSet1
CharLine2: Charset2
CharLine3: CharSet3

When moving Horizontal you need 3+1(Shifting), Vertical same 3+1(Shifting).
When he goes to the next CharLine0, he already leaves the last Carset0 CharLine.
Now a SoftSprite only needs 4Chars each.
In my case 8SoftSprites needed are 32Chars. and have 96free for the Backgr. Gfxs. They are even more than I need!...
You probably can design Gfxs. with just 96Chars for each CharLine... and 4Charsets/4Kb needed.



See, instead you go into place Tiles in a pseudo-BitMap you probably will have less Memory needed and just Chars, moving and placing real Chars/Tiles.



Hope you understand and it helps you in some way...
Greets.
José Pereira.

Hi there, thank you for your input. I think I understand. Do you mean repeating charsets so that the soft sprite bitmap area does not have occupy the entire screen? I suppose the programmer is in control of where the soft sprites go so he/she could have bitmap zones in the areas where the soft sprites will be.

#30 MaPa OFFLINE  

MaPa

    Dragonstomper

  • 564 posts
  • Location:Czech Republic

Posted Thu Nov 11, 2010 5:54 AM

My attempt to use MWP scroll technique is here http://www.atariage....-mwp-technique/.

#31 José Pereira OFFLINE  

José Pereira

    River Patroller

  • 2,461 posts
  • Location:Lisbon - Portugal

Posted Thu Nov 11, 2010 6:19 AM

Quote

Hi there, thank you for your input. I think I understand. Do you mean repeating charsets so that the soft sprite bitmap area does not have occupy the entire screen? I suppose the programmer is in control of where the soft sprites go so he/she could have bitmap zones in the areas where the soft sprites will be.

O.k., lets see if some Pictures...

This simple, less Enemys C64 Armalyte example:
armalyte_C64 example.gif

Forget colours, PMs, DLIs, verything by now.
Just focus on Charsets:
armalyte_1Charset for 3Lines.GIF

Now what I was trying to say:
armalyte_4Charsets interlaced.GIF




See, the cycles lost are the almost the same.
Great number of cycles lost and now space for SoftSprites are soo little, but there are ways of turning this, I hope (is this I am trying to get in my yesterday Scrolling Thread)!...


Greets.
José Pereira.

#32 José Pereira OFFLINE  

José Pereira

    River Patroller

  • 2,461 posts
  • Location:Lisbon - Portugal

Posted Thu Nov 11, 2010 6:36 AM

Quote

Hi there, thank you for your input. I think I understand. Do you mean repeating charsets so that the soft sprite bitmap area does not have occupy the entire screen? I suppose the programmer is in control of where the soft sprites go so he/she could have bitmap zones in the areas where the soft sprites will be.

O.k., lets see if some Pictures...

This simple, less Enemys C64 Armalyte example:
armalyte_C64 example.gif

Forget colours, PMs, DLIs, verything by now.
Just focus on Charsets:
armalyte_1Charset for 3Lines.GIF
CYCLES weren't on this Image, sorry.
------------------------------------


Now what I was trying to say:
armalyte_4Charsets interlaced.GIF




See, the cycles lost are the almost the same.
Great number of cycles lost and now space for SoftSprites are soo little, but there are ways of turning this, I hope (is this I am trying to get in my yesterday Scrolling Thread)!...


Greets.
José Pereira.

#33 popmilo OFFLINE  

popmilo

    Dragonstomper

  • 614 posts
  • Location:Senta, Srbija

Posted Sat May 28, 2011 12:57 PM

@R6502: Any news about your project ?

If you are interested (or missing graphics for your horizontal scrolling shooter) there is an ongoing multi-platform project called "Edge-grinder" on:

http://formatwar.net...ollabortition_1

Posted Image

And lots of development related (A8 also) discussion on:
http://formatwar.net...ic.php?f=5&t=28

#34 emkay OFFLINE  

emkay

    Quadrunner

  • 6,485 posts
  • What's up?
  • Location:Holy Grail ;)

Posted Sat May 28, 2011 2:09 PM

Why do threads like this start to hurt?

#35 José Pereira OFFLINE  

José Pereira

    River Patroller

  • 2,461 posts
  • Location:Lisbon - Portugal

Posted Sun May 29, 2011 10:26 AM

View Postemkay, on Sat May 28, 2011 2:09 PM, said:

Why do threads like this start to hurt?

Probably because there isn't untill the 21st century a good Horizontal scrolling shoot'em'up for A8...
It can't be possible that I and others accept this situation...

José Pereira.

Edited by José Pereira, Sun May 29, 2011 10:27 AM.


#36 R6502A OFFLINE  

R6502A

    Star Raider

  • 62 posts
  • Location:London

Posted Wed Feb 8, 2012 9:38 AM

View Postpopmilo, on Sat May 28, 2011 12:57 PM, said:

@R6502: Any news about your project ? If you are interested (or missing graphics for your horizontal scrolling shooter) there is an ongoing multi-platform project called "Edge-grinder" on: http://formatwar.net...ollabortition_1 Posted Image And lots of development related (A8 also) discussion on: http://formatwar.net...ic.php?f=5&t=28

Hi there popmilo,

Now this is a late reply!

Thanks for the link.

I'm still working on this but progress is very slow due to lack of time.
I've done some background work on the background draw routines, software sprites and PM graphics for the main ship (all in different test programs). Trying to bring it all together now.

Screens are built using a made up scripting language that calls subroutines such as:
PLOT_SHAPE ; Plot background graphics to character set memory (screen)
PLOT_SHAPE_ON_TOP ; plot shape to character set memory and copy chars to screen so that software sprites (when I finish the routine) appear to go behind.
SETBAK ; set the background (Using it to debug code. e.g. background is changed to a particular colour when a specific piece of code is executed)
REQUESTDEBRIEFING ; This is the end level sequence
STARTSCROLL ; The horizontal scroll from right to left is triggered when this is encountered
STOPSCROLL ; Scrolling is suspended when this is encountered
RESETSCRIPT ; Points to the beginning of the script (Will causes the game to run endlessly)
RESETSCRIPTCOUNTER ; This counter is rest to 0,0 here. It's a 16 bit number that is incremented during VBI.
START_SCRIPTCOUNTER ; The counter is incremented every VBI when this is encountered.
STOP_SCRIPTCOUNTER ; The counter incrementation is paused (allows for long running routines to finish executing before script execution continues. Mainly used for initialiising large areas.)
JUDDER_SCREEN ; Shakes the screen

The screen buffer is big enough for 2 screens and is looped to create a continuous scroll. Updates happen in the off screen areas and If left alone, the buffer will just loop and display whatever it contains. This is ideal for repetitive things like starfields.

I'm concentrating on the game engine rather than any graphics at the moment, but I know I'll need help with that (I'm no great artist) and sound is a dream at the moment (I'm no great musician.) I'm reserving $2200 and below for all sounds so DOS will be wiped out after this game loads. A lot of the graphics will be held under the OS and will be copied there from the screen buffer after loading. Similarly, the sound routines/data will be copied to memory below $2200 after loading.

Oh did I say that my target machine is the 800XL (The one I had as a kid) so It'll definitely work on a PAL machine. Not sure about NTSC. A few of the test routines I have developed simply did not run when I tried NTSC emulation, but the consolidated code I have so far works under NTSC. So an NTSC version might be possible.

Hopefully I'll finish this game this year.

#37 popmilo OFFLINE  

popmilo

    Dragonstomper

  • 614 posts
  • Location:Senta, Srbija

Posted Wed Feb 8, 2012 11:28 AM

It's never to late for 8bit code, look at us - It's 2012 and we are still messing with it ;)

View PostR6502A, on Wed Feb 8, 2012 9:38 AM, said:

I'm still working on this but progress is very slow due to lack of time....
I'll need help with that (I'm no great artist) and sound is a dream at the moment (I'm no great musician.)...
DOS will be wiped out after this game loads....
my target machine is the 800XL...
Hopefully I'll finish this game this year...

You mention so many things that are same at my end that it's scary ;)

View PostR6502A, on Wed Feb 8, 2012 9:38 AM, said:

Screens are built using a made up scripting language that calls subroutines such as:
...
The screen buffer is big enough for 2 screens and is looped to create a continuous scroll. Updates happen in the off screen areas and If left alone, the buffer will just loop and display whatever it contains. This is ideal for repetitive things like starfields.

Love your scripting idea (when ever game gets any bigger that should be used...).

That looping screens buffer sounds like a very good idea. That way you know scrolling just works and you can separate code for "incoming graphics" from actual scrolling.
Thinking about it - you can even distribute background drawing over multiple frames easily... I like it even more now!

Atari's problem is 128 characters per charset limit. Severely limits softsprite count and background quality.
One way to overcome this is virtual characters and "realtime" change of characters that are off screen at that moment.

There is a very good discussion that went on FormatWar recently (with very good code by Andy included)
http://formatwar.net...c.php?f=5&t=245

Ideas like this and softsprites in multiple charsets can work miracles on A8 (imho).

In order to see it, one can either wait for someone else to make it, or code it themselves ;)

#38 José Pereira OFFLINE  

José Pereira

    River Patroller

  • 2,461 posts
  • Location:Lisbon - Portugal

Posted Wed Feb 8, 2012 12:56 PM

View Postpopmilo, on Wed Feb 8, 2012 11:28 AM, said:


Atari's problem is 128 characters per charset limit. Severely limits softsprite count and background quality.
One way to overcome this is virtual characters and "realtime" change of characters that are off screen at that moment.

There is a very good discussion that went on FormatWar recently (with very good code by Andy included)
http://formatwar.net...c.php?f=5&t=245

Ideas like this and softsprites in multiple charsets can work miracles on A8 (imho).

In order to see it, one can either wait for someone else to make it, or code it themselves ;)

Was thinking in EG last Night.
Just posted something at FormatWar...
Is Andy's work about the chars 'pick-up on the fly' on Flimbo's working?
And is it with the 'Interleaved' Charsets?


#39 popmilo OFFLINE  

popmilo

    Dragonstomper

  • 614 posts
  • Location:Senta, Srbija

Posted Thu Feb 9, 2012 2:28 AM

View PostJosé Pereira, on Wed Feb 8, 2012 12:56 PM, said:

...Is Andy's work about the chars 'pick-up on the fly' on Flimbo's working?
And is it with the 'Interleaved' Charsets?
Yes it does work very well.
It can work with interleaved or normal order charsets.
It is not like "there is no limit" but it is pretty powerfull :)
And best thing about it is that it uses little cpu.

#40 R6502A OFFLINE  

R6502A

    Star Raider

  • 62 posts
  • Location:London

Posted Thu Feb 9, 2012 7:28 AM

View Postpopmilo, on Wed Feb 8, 2012 11:28 AM, said:


You mention so many things that are same at my end that it's scary ;)

That looping screens buffer sounds like a very good idea. That way you know scrolling just works and you can separate code for "incoming graphics" from actual scrolling.
Thinking about it - you can even distribute background drawing over multiple frames easily... I like it even more now!

Atari's problem is 128 characters per charset limit. Severely limits softsprite count and background quality.
One way to overcome this is virtual characters and "realtime" change of characters that are off screen at that moment.

View Postpopmilo, on Wed Feb 8, 2012 11:28 AM, said:

There is a very good discussion that went on FormatWar recently (with very good code by Andy included)
http://formatwar.net...c.php?f=5&t=245

Ideas like this and softsprites in multiple charsets can work miracles on A8 (imho).

With my method I don't find the 128 character limit a problem at all.
My screen format is just like this: I have 24 character sets in one contiguous block of memory, one for each character line. I plot background graphics and software sprites in the character set memory. Each character line consists of the first 80 characters of the character set (2 screens wide) and another 40, which are a repeat of the first 40 to create the loop. When the scroll routine fully displays the last screen it's jumps back to the first screen and continues scrolling. This arrangement makes draw routines easy to implement and allows them to be faster since there are less boundary calculations going on. e.g. to point to the next line of chars I add #$4 to the MSB, effectively incrementing by 1024 bytes. I'm effectively creating my own bit mapped display, but by using character screens I have the advantage of the extra colour by setting the high bit of the appropriate character.

View Postpopmilo, on Thu Feb 9, 2012 2:28 AM, said:

In order to see it, one can either wait for someone else to make it, or code it themselves ;)

I say code it. It's the only way to be sure that you know what's going on.

Edited by R6502A, Thu Feb 9, 2012 7:34 AM.


#41 popmilo OFFLINE  

popmilo

    Dragonstomper

  • 614 posts
  • Location:Senta, Srbija

Posted Thu Feb 9, 2012 8:30 AM

24K is little too much for me... But it is a proven method and if you use it properly it can look awesome.
Looking forward to seeing it in action!

View PostR6502A, on Thu Feb 9, 2012 7:28 AM, said:

I say code it. It's the only way to be sure that you know what's going on.
True! :)

#42 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • 8,105 posts
  • Location:Baden-Württemberg, Germany

Posted Thu Feb 9, 2012 8:54 AM

24k? respect... on a 56k machine... ;)

#43 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • 8,105 posts
  • Location:Baden-Württemberg, Germany

Posted Thu Feb 9, 2012 8:54 AM

aehm. 60k machine.

#44 MaPa OFFLINE  

MaPa

    Dragonstomper

  • 564 posts
  • Location:Czech Republic

Posted Thu Feb 9, 2012 11:08 AM

ehm... 62k machine? :)

#45 R6502A OFFLINE  

R6502A

    Star Raider

  • 62 posts
  • Location:London

Posted Fri Feb 10, 2012 4:48 AM

View Postpopmilo, on Thu Feb 9, 2012 8:30 AM, said:

24K is little too much for me... But it is a proven method and if you use it properly it can look awesome. Looking forward to seeing it in action!

View PostHeaven/TQA, on Thu Feb 9, 2012 8:54 AM, said:

24k? respect... on a 56k machine... ;)

Well not quite 24k.
The screen/buffer size is 80 x 8 = 640 leaving 384 bytes of the character set free to store other data.

Some of the characters in the 640+ region are to be used for areas that will be on top, in this case I'll be copying characters after updating the relevent character set memory, but mostly data will be stored there. Generally the actual background graphics are stored outside the character sets and copied to the off screen areas as the game scrolls. So the real memory hit for the screen and buffer is 640 x 24 = 15360 + (40+40+40 = 120 actual screen characters per line, giving a total of 120 * 24 = 2880 for the screen)

Total memory hit to support this screen/buffer is 15360 + 2880 = 18240. So for one screen/buffer we have 18240/2 = 9120.

For graphics mode 8 (320 x 192) we require 7680 bytes and to double buffer it you'd need 15360. Therefore there's a 18240 - 15360 (1856) byte overhead to building a screen this way.

The memory requirement of the screen is the main reason why the OS will be stripped to the bare minimum and DOS will be wiped out when the game runs.

Edited by R6502A, Fri Feb 10, 2012 4:55 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users