KanedaFr Posted February 21 Share Posted February 21 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 : (based on https://atarilynxdeveloper.wordpress.com/2014/09/10/programming-tutorial-part-18files/) Quote Link to comment Share on other sites More sharing options...
42bs Posted February 21 Share Posted February 21 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/ Quote Link to comment Share on other sites More sharing options...
Nop90 Posted February 21 Share Posted February 21 Every game is different and I used all the three different approaches. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.