Jump to content
IGNORED

My first steps into making Intv GFXs


Recommended Posts

I tried animation for the main character , I was curious at how it would look like

 

Looking good. However, how many MOBs are you using there?

 

I would imagine that the trick to animate a composite avatar that way would require not only cycling GRAM, but updating the relative positions of the individual MOBs on each frame. I can see the animation data split into two tables, one for graphics data per frame, and one for the positions.

 

That's using the naïve animation method I used in Christmas Carol, which includes a graphic tile for every single frame in the animation sequence, even for frames where the graphics do not change. This could be compressed by including only unique tiles in one table, and the sequence of tiles in another (offsets to the first table).

 

So, if I were to animate this, I would use three tables:

  • GRAM Data - contains unique graphic tiles for the animation sequence, for each MOB (sub-object) in the avatar.
  • Relative Positions - grouped by sub-object, includes the X, Y offsets from the avatar screen position for each unique graphic tile frame.
  • Frame Sequence - grouped by sub-object, includes an index to the GRAM Data and Relative Positions for each graphic change, and the number of frames it should remain until the next change, or frame delay.

The animation engine then uses the differential analyzer algorithm (similar to Bresenham's line drawing algorithm) to manage the animation speed and

  • on every animation tick it decrements the frame delay, and when it reaches zero, it reads the next frame in the sequence and updates the frame delay counter;
  • it then gets a pointer to the graphics data for the next frame and prepares it for loading it into GRAM on the next ISR;
  • it adjusts the MOB positions for the new frame using the avatar's absolute position and the relative sub-object positions, and prepares them for updating the STIC on the next ISR.
  • It repeats this for all MOBs.

 

Definitely possible. :)

 

-dZ.

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

Don't really need those patterns if you're working in FG/BG mode so don't worry. ;) It only accessible in color stack mode. The screen shots are looking good. :)

I would reserve about 16 cards for the MOB. The animation cells can be written to from ROM.

Edited by Kiwi
  • Like 2
Link to comment
Share on other sites

Don't really need those patterns if you're working in FG/BG mode so don't worry. ;) It only accessible in color stack mode. The screen shots are looking good. :)

 

I would reserve about 16 cards for the MOB. The animation cells can be written to from ROM.

 

That background can definitely be made in Color Stack mode and then use GROM for most of the patterns. It then comes down to 5 or 6 custom cards. But even not using GROM at all, it only uses about 10 or 11 cards right now. Add 16 for MOBs, and you still have over half the GRAM space left for more detail.

 

-dZ.

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

 

Looking good. However, how many MOBs are you using there?

 

I would imagine that the trick to animate a composite avatar that way would require not only cycling GRAM, but updating the relative positions of the individual MOBs on each frame. I can see the animation data split into two tables, one for graphics data per frame, and one for the positions.

 

That's using the naïve animation method I used in Christmas Carol, which includes a graphic tile for every single frame in the animation sequence, even for frames where the graphics do not change. This could be compressed by including only unique tiles in one table, and the sequence of tiles in another (offsets to the first table).

 

So, if I were to animate this, I would use three tables:

  • GRAM Data - contains unique graphic tiles for the animation sequence, for each MOB (sub-object) in the avatar.
  • Relative Positions - grouped by sub-object, includes the X, Y offsets from the avatar screen position for each unique graphic tile frame.
  • Frame Sequence - grouped by sub-object, includes an index to the GRAM Data and Relative Positions for each graphic change, and the number of frames it should remain until the next change, or frame delay.

The animation engine then uses the differential analyzer algorithm (similar to Bresenham's line drawing algorithm) to manage the animation speed and

  • on every animation tick it decrements the frame delay, and when it reaches zero, it reads the next frame in the sequence and updates the frame delay counter;
  • it then gets a pointer to the graphics data for the next frame and prepares it for loading it into GRAM on the next ISR;
  • it adjusts the MOB positions for the new frame using the avatar's absolute position and the relative sub-object positions, and prepares them for updating the STIC on the next ISR.
  • It repeats this for all MOBs.

 

Definitely possible. :)

 

-dZ.

 

By the way, that's how the Christmas Carol sprite driver works, except that instead of compressing the sequence by keeping only unique GRAM cards, it explodes it by repeating the cards as a lame form of frame delay.

 

At assembly time, each sprite object is "registered" with the driver, creating a data record for the animation, which includes a pointer to the sequence, the speed, and the current step. The driver has a byte-size bitmap that serves as a "dirty flag" for each of the registered objects.

 

During game-play, the program can call any of the animation-related routines, e.g., to switch animation sequences, etc., depending on game state. Also, on each game cycle, the animation records of all registered objects are cycled through their sequences as necessary. This happens outside the ISR context.

 

Calling any animation-related routine results in setting the "dirty flag" for the object. Then, on each ISR, after updating the STIC, the sprite driver iterates through the "dirty flag" bitmap, and updates all "dirty" objects by de-referencing their current animation frame data and blasting it into GRAM.

 

Et voilá! Fast and somewhat efficient animation graphics. :) It helps that all animation and graphics routines use common interfaces, and that all object records have a standard format.

 

-dZ.

  • Like 2
Link to comment
Share on other sites

Does the INtv is capable of paralaxal scrolling?

Yes! But it requires pre-shifted graphics data. So you use precious GRAM cards to permanently allocate them or reprogram them as required on the fly. Your approach depends on what else needs to happen in your game.

  • Like 1
Link to comment
Share on other sites

Yes! But it requires pre-shifted graphics data. So you use precious GRAM cards to permanently allocate them or reprogram them as required on the fly. Your approach depends on what else needs to happen in your game.

Oh yes! Awesome!!

Thanks for the quick answer

 

It's only about the mountain in the background

 

 

:)

Link to comment
Share on other sites

Does the INtv is capable of paralaxal scrolling?

If by "parallax scrolling" you mean using MOBs or pre-shifted cards to simulate the effect, then yes. ;)

 

There are no multiple planes of scrolling, if that's what you were looking for. However, take a look at Space Patrol for a very effective parallax effect.

 

dZ.

  • Like 1
Link to comment
Share on other sites

 

It's one of the most impressive homebrew games so far. Including the possibility to use the ECS for more sound channels.

 

Fun fact: Christmas Carol uses the same sound effects engine; it's just that there aren't as many things happening at the same time that require the extra channels. ;)

 

Space Patrol is very impressive indeed, and it pushes the hardware to some of its limits. I believe Joe has mentioned that he had only a few cycles left over on each game loop.

 

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