Jump to content
IGNORED

Using ANTIC4 vs. ANTIC E for moving character graphics?


DEBRO

Recommended Posts

Hi there,

 

I was wondering. Let's say I were to use an ANTIC 4 display and animate and move four color character graphics. How would one go about moving these characters? Since the character resolution is 8x8, if you just moved them in any direction they would "jump" 8 pixels at a time. How would you get smooth movement in ANTIC 4? Would you ASL or LSR the character so it would shift a color cycle and then when you reach 8 pixels do the move? How would you do this vertically? Would a better approach be to use ANTIC E instead for 4 color character movement even though it takes more memory?

 

I hope my question is clear. Thanks.

Link to comment
Share on other sites

Hi there,

 

I was wondering. Let's say I were to use an ANTIC 4 display and animate and move four color character graphics. How would one go about moving these characters? Since the character resolution is 8x8, if you just moved them in any direction they would "jump" 8 pixels at a time. How would you get smooth movement in ANTIC 4? Would you ASL or LSR the character so it would shift a color cycle and then when you reach 8 pixels do the move? How would you do this vertically? Would a better approach be to use ANTIC E instead for 4 color character movement even though it takes more memory?

 

I hope my question is clear. Thanks.

 

Firstly, your character resolution in ANTIC 4 is 4x8 ... there is a way you can do it but it depends on how many characters you want to use for your sprite. But let's say you only want one char

 

You would need to set aside several spaces in your character set for your character ... who would likely be on a 4x4 grid like this:

 

####----

####----

####----

####----

- - - -----

- - - -----

- - - -----

- - - -----

 

ok not to scale, but you can use an ML routine to shift your characters data around in this 4x4 grid by directly changing the character in your character set RAM. so for instance, to move down and right ..

. . . . . . . .

. ## ## . . .

. ## ## . . .

. ## ## . . .

. ## ## . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

 

something like that

 

These other progammers can show you a routine for moving memory, I imagine.

 

 

 

Link to comment
Share on other sites

Hi there,

Firstly, your character resolution in ANTIC 4 is 4x8 ...

 

Oops, you are right. I was thinking about two character together. Sorry about that.

 

there is a way you can do it but it depends on how many characters you want to use for your sprite. But let's say you only want one char

 

You would need to set aside several spaces in your character set for your character ... who would likely be on a 4x4 grid like this:

 

####----

####----

####----

####----

- - - -----

- - - -----

- - - -----

- - - -----

 

ok not to scale, but you can use an ML routine to shift your characters data around in this 4x4 grid by directly changing the character in your character set RAM. so for instance, to move down and right ..

. . . . . . . .

. ## ## . . .

. ## ## . . .

. ## ## . . .

. ## ## . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

 

something like that

 

These other progammers can show you a routine for moving memory, I imagine.

 

That is what I was thinking. So you would have to reduce the number of actual characters to pad. So it would be a decision based on how many actual characters you were targeting vs. RAM...or something like that.

Link to comment
Share on other sites

ANTIC 4 has the advantage that you can move larger portions of the screen quickly, for example for a scrolling environment. Also you get 5 colors instead of 4 using inverse characters. The downside is that soft moving is more complicated and you are limited to 128 characters for background and players.

 

ANTIC E is the better option if you have static playfield (no scrolling) as you have any kind of graphics and positioning and the masking of the player is easier. The game Robotron 2084 is a very good example here. The code to mask in the player would be something like:

 

ldy #0; 1st line

lda (screenpointer),y

and (playermaskpointer),y

ora (playerpixelpoint),y

sta (scrollpointer),y

iny

.. as many bytes as you need in width

iny..

ldy #40; 2nd line

 

...

inc ..pointer+1; page boundary

... as many lines you need in height.

 

This kind of code is short and efficient enough for moving about 2-3 player sized 9x16 pixel in 1/50s.

Of course you may also need code to preserve/restore the backgound graphics to/from a buffer if you have any.

Link to comment
Share on other sites

The game Shamus actually does this with mode 4. Here is a dump of the video ram during the game play. The game dynamically alters the character set to achieve horizontal movement, and it appears to re-use the same set of characters for each sprite that is moving. It does not handle vertical movement dynamically, so it has a different set of characters for each step of vertical movement. Animation appears to be handled by redrawing the characters. This of course imposes a bunch of limitations that you can see if you watch Shaums closely. Sprites need to move a full 4 pixels horizontally or 8 pixels vertically before they can change direction, so you can't do smooth diagonal movement. Sprite also can't always be right next to each other. For example if I have two sprites one above the other both fully within their character cells and the bottom one moves down, you have to wait for it to move all 8 pixels before you can start moving the top sprite down.

 

 

0/0/0/0/$#######################$/      
     ‘.$                       $0      
     ¦¥$                       $/      
/0/0/0/0$DE         DE          $0/0/0/0
     ..$FG         FG          $/0/0/0/
     &%$                       $0/0/0/0
0/0/0/0/$     ËÌÍ               $/0/0/0/
########$       $#######$       $#######
$          ÄÅ   $       $              .
$          ÆÇ   $       $              .
$         @A    $       $              .
$         BC    $       $              .
$               $   ÄÅ  $              .
$               $   ÆÇ  $              .
################$       $       $#######
0/0/0/0/$         ËÌÍËÌÍ        $/0/0/0/
/0/0/0/0$                       $0/0/0/0
0/0/0/0/$             @A        $/0/0/0/
/0/0/0/0$             BC        $0/0/0/0
0/0/0/0/$                       $/0/0/0/
/0/0/0/0$                       $0/0/0/0
0/0/0/0/$#######################$/0/0/0/




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...