Jump to content
IGNORED

Sprites animation


Recommended Posts

Hi,

I'm currently exploring the different ways to create animated sprites on  Lynx.

 

What I found is

 

Method 1:

1 sprite per frame (1 sprite = 1 frame data) and you adjust the chained list on the fly

-> every asset data is already on RAM so you're limited by memory

-> while a pointer is very fast to be updated, it could be a nightmare if you have many sprites 

-> efficient if you have multi sprites using the same frames, even if not at the same time (since data is on ram)

 

Method 2:

update SCB data for each sprite

-> require less sprites that method 1

-> every asset data is already on RAM so you're limited by memory

-> efficient if you have multi sprites using the same frames, even if not at the same time (since data is on ram)

 

Method 3:

load data at request at the reserved memory address (per sprite)

-> (could) require less memory than method 2

-> less efficient if you have multi sprites using the same frames, because you have to load the same frame for each sprite using it

-> I still don't know how to load bytes from cart which is not a "full" file, and how to define these bytes on the linking configuration file

-> slower than updating a pointer

 

Is there another way to update sprite to simulate animation?

 

How do you load few bytes (not  __BANK0BLOCKSIZE__ bytes) at a defined RAM address ? 

For exemple, in the green area on this memory view :

image.png.2c52753b512a51a66dd75916076923b7.png

(based on https://atarilynxdeveloper.wordpress.com/2014/09/10/programming-tutorial-part-18files/)

Link to comment
Share on other sites

I guess most games load new graphics or sound data during game play.

If you need to load often, you need to find a way to organize it on the card in a way, that loading is quick. It is certainly no good idea to load every frame of an animation on its own.

 

As for loading from card, the "filesystem" is nothing fixed. You can reserve a part of the card for your graphics and load them directly by selecting the block and skipping the bytes until your data.

 

https://atarilynxdeveloper.wordpress.com/2014/01/02/programming-tutorial-part-16cartridges/

 

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