Giter Club home page Giter Club logo

testinganimation's Introduction

= tA's terribleAssembly =

just me messing about trying to learn gameboy assembly

currently have an animation engine supporting:

  • arbitary sized frames
  • multiple actors
  • multiple animation states per actor (up to 128)
  • arbitary number of frames
  • arbitary time per frame of animation
  • distinct animation timers per actor
  • distinct colour palletes per tile in frame (limit 2 as per hardware)
  • arbitary position of tiles in the tile bank per actor type
  • arbitary positioning of tiles in each frame, including overlapping

== requisites ==

built using rgbds, will need to be installed for makefile to compile

== running ==

simply run make in the root directory to build the ROM

will appear as a .gb file in ./build

== actor format ==

each actor has the following header:

ActorROM::
.structs:
   dw ActorIdle
   dw VillagerWaving

where each pointer under .structs is another structure in memory. these pointers may be shared between different actor definitions, however the tilesets for each actor will need to be compatible with the same animation for this to work.

each animation state has the following definition:

VillagerWaving::
   db 90
   db 15
   dw .vwFrame01
   db 15
   dw .vwFrame02
   db 15
   dw .vwFrame03
   db 15
   dw .vwFrame04
   db 15
   dw .vwFrame05
   db 15
   dw .vwFrame06

the first byte contains the total number of frames this animation will run for, and then each following set of 3 bytes contains:

  • the number of ticks this animation frame persists for
  • a pointer to the frame data

each frame has the following data:

.vwFrame01
   db (.vwFrame01End - @) / 4
   db  8, -16,  17, 0
   db  8,  -8,  18, 0
   db  0, -16,  19, OAMF_PAL1
   db  0,  -8,  20, OAMF_PAL1
   db -8, -16,  21, 0
   db -8,  -8,  22, 0
.vwFrame01End

the first byte is the number of tiles present in this frame of animation (analogous to the number of lines in the frame struct).

each following line is 4 bytes, pertaining to (respectively):

  • the x offset of this tile
  • the y offset of this tile
  • the tile offset
  • the attributes byte

the position offsets do not need to take into account the gameboys blanket sprite offsets, and the tile offset is zero indexed, and will be added to another offset based on where this actors tiles lie in memory.

the attribute byte is xored with the defaults in order to facilitate other pallettes or tile flips.

testinganimation's People

Contributors

techieagnostic avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.