Jump to content
IGNORED

X-Rally WIP


Recommended Posts

Hi friends.

 

For the scroll in X-Rally I used the same technique described in Óscar Toledo's book (FOR-NEXT - page 270) and, in fact, the movement is not smooth.
I cannot use the SCROLL command because the side panel must remain fixed.
I tried using the Assembler routine described in the book, but as I understand it, it moves all the backtabs in the row.
As I don't have much skill with the Assembler, I ask if it is possible to adapt this routine so that the screen copy be done only on the part highlighted in red.

This way, I would be able to create smoother scrolls in all 4 directions.
If anyone can help, I'd appreciate it.

 

ASM TITLESCROLL: PROC
    'Assembly function to quickly pan only part of the screen.
    'No arguments, no return value.
    ASM BEGIN
        ASM MVII #$214, R4
        ASM MVII #$200, R5
    ASM TitleScrollLoop:
        ASM MVI@ R4, R0
        ASM MVO@ R0, R5
        ASM CMPI #$2f0, R4
        ASM BLT TitleScrollLoop
        ASM RETURN
ASM ENDP

 

 

image.thumb.png.26b079a0157cd9a156b0cd90fdcb853d.png

  • Like 2
Link to comment
Share on other sites

While I don't really speak CP-1610, it looks to me that is a coarse scroll with minimum overhead compared to the SCROLL command.

 

Does the radar display take up 6x7 = 42 GRAM cards or do you have a smarter way to plot it? I'm thinking if you could use hardware scroll after all and "counter plot" the radar to remain in place. You would have to sacrifice the score display, number of lives and level counter though.

 

Would the car move more or less constantly? There is another approach used in e.g. Super Cobra IIRC, that the score display scrolls along with the screen and is replotted in its position when the scrolling stops. That would require you to place the score at the top or bottom row though.

 

You might want to rethink the layout, if it is better to have the playfield 20 columns wide but fewer rows to give room for score and radar display.

 

(Unfortunately the hardware scroll, like every other STIC action kicks in at vertical blank and can not be delayed to a given raster row like on some newer computers. Then again you could have worse luck and develop for a system without any hardware scroll features at all.)

Link to comment
Share on other sites

1 hour ago, Intellivision Brasil said:

Hi friends.

 

For the scroll in X-Rally I used the same technique described in Óscar Toledo's book (FOR-NEXT - page 270) and, in fact, the movement is not smooth.
I cannot use the SCROLL command because the side panel must remain fixed.
I tried using the Assembler routine described in the book, but as I understand it, it moves all the backtabs in the row.
As I don't have much skill with the Assembler, I ask if it is possible to adapt this routine so that the screen copy be done only on the part highlighted in red.

This way, I would be able to create smoother scrolls in all 4 directions.
If anyone can help, I'd appreciate it.

 

 


ASM TITLESCROLL: PROC
    'Assembly function to quickly pan only part of the screen.
    'No arguments, no return value.
    ASM BEGIN
        ASM MVII #$214, R4
        ASM MVII #$200, R5
    ASM TitleScrollLoop:
        ASM MVI@ R4, R0
        ASM MVO@ R0, R5
        ASM CMPI #$2f0, R4
        ASM BLT TitleScrollLoop
        ASM RETURN
ASM ENDP

 

 

image.thumb.png.26b079a0157cd9a156b0cd90fdcb853d.png

The routine works by copying rows upwards, but does it continuously because the BACKTAB is an array of a single dimension.

 

Essentially, it works like this:

  • Starting with the first card on the second row ($214)
  • Copy the data to the first card on the first row ($200)
  • Increment the pointers to the next card on each row
  • Repeat until we get to the last row.

It is very efficient because the rows are contiguous in the array.  That is, when the pointers reach the end of a row, incrementing them naturally makes them point to the start of the next.

 

To copy a smaller region, a couple of things need to change:

  • First, we need to change the starting addresses for the pointers so that they point to the correct starting and ending rows.
  • Second, we need to detect when the pointers reach the edge of the region in order to adjust them, so that they skip the status/map panel and point to the start of the next row.

 

The first is easy and comes almost for free: just change the addresses in the two MVII instructions at the top (the first one is the source, the second is the destination).

 

The second one is also easy, but it incurs some cost:  you will need to test that the edge of the region is reached (which requires a comparison and a branch), and if so, you will need to add the adjustment to both pointers.

 

The point is that it does not come for free.

 

Also, you may consider what @carlsson said, and what others (including me) have pointed out to you before:  that the scrolling is too coarse and it may improved the look to scroll one pixel at a time instead.

 

If you are still interested in modifying the routine as you requested, I can help you with the code.

 

   dZ.

Edited by DZ-Jay
Link to comment
Share on other sites

  • 2 years later...

Hi.


I decided to share some tips and ideas used in the development of "X-Rally". As I mentioned at the beginning of the document, these are certainly not the best ideas (it was my first game and I learned a lot from it), but this can serve as a basis for those who are starting out and encourage the creation of new games.
I am immensely grateful to everyone at AtariAge, which is a huge source of information and knowledge.

 

Sergio

 

X-Rally - Dicas e Truques - Português.pdf X-Rally - Tips and Secrets - English.pdf

  • Like 2
  • Thanks 3
Link to comment
Share on other sites

17 hours ago, Intellivision Brasil said:

Hi.


I decided to share some tips and ideas used in the development of "X-Rally". As I mentioned at the beginning of the document, these are certainly not the best ideas (it was my first game and I learned a lot from it), but this can serve as a basis for those who are starting out and encourage the creation of new games.
I am immensely grateful to everyone at AtariAge, which is a huge source of information and knowledge.

 

Sergio

 

X-Rally - Dicas e Truques - Português.pdf 635.25 kB · 7 downloads X-Rally - Tips and Secrets - English.pdf 657.34 kB · 22 downloads


Nice write-up, and very interesting.  Thank you for sharing your experience.

 

Fun Fact:  The score-coloring technique you used is similar to the one in Christmas Carol. ;)  (Also, the bits #14 and #15 trick on BACKTAB words is how I track snowflakes and candy on the board, but I also use two extra bits as well:  when using a GRAM card, the upper two bits of the card number are ignored.)

 

image.thumb.png.442aeef4f487952bc7c22fe3adbb9f36.png


The highest I have seen it go is to "orange" -- and only by one person!


  dZ.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...