LBALab / lba2remake

A Little Big Adventure 2 / Twinsen's Odyssey reimplementation in JavaScript / Three.js / React
MIT License
251 stars 38 forks source link

Implement loading (but not animation) of Anim3DS #652

Closed fraserjgordon closed 2 years ago

fraserjgordon commented 2 years ago

The ANIM3DS.HQR file stores these sprites as a series of frames and an info block giving the frame range of each animation. The sprites themselves are normal sprites.

This change ensures that actors with the Anim3DS flag load the right sprites but they are not actually animated at this point. For now, we just render the first sprite in the sequence. To see an example, visit the Sendell's Ball room in the sewers.

Preview here: https://pr-652.lba2remake.net

xesf commented 2 years ago

It looks good indeed.

While testing I notice another bug. (not related) So now that you have implemented the set sprite and correctly display the sprite, we can now see the Sendell sign in the sewers just before entering the Sendell's Ball room. The animation is done via script, but for some reason if we go into In-Game menu (ESC key) and go back to it, the move script no longer runs. This may be a major bug causing loads of other sort of scripting issues if we pause the game.

fraserjgordon commented 2 years ago

@slwilliams I think the problem might be that the various script opcodes for the animated sprites aren't implemented yet (they're on my todo list). I'll take a look though in case it is something else.

@xesf thanks for that info! I've been concentrating my testing on LBA2 for now as I've never really played LBA1 (though this might finally motivate me to do it!)

agrande commented 2 years ago

@xesf if it's ok for you we can merge this.