Here are my ideas for how to code the features in SML. This page is subject to change.


Graphics are normally handled by the SpriteBatch class and the Texture2D class in XNA. It does handle frame-by-frame graphics, but it only animates the graphic straight down the line, instead of calling needed frames. Thus we'll need to write a FrameManager class that stores a Texture2D. It will keep an array of frame coordinates that can be called to produce the required frame.




Input will be inferred from the key settings in the Settings dialog.


All blocks can be separated into a few types:
  1. Solid
  2. Top-solid (or platform)
  3. Inert (or passive)
  4. Slope
  5. Brick block
  6. Note block
  7. Turn block
And probably a few others. Coding these basic classes will save us from coding hundreds of individual blocks with the same code. (Note: Question Blocks are handled as solid blocks, all Solid blocks can contain items.) The slopes' collision detection will work with a Triangle type.


Sprites will be registered with the SpriteRegister class, an alternative to an array. Each sprite will have its own coding. All sprites should share the BlockCollisionDetection, SpriteCollisionDetected, PlayerCollisionDetected, and PhysicsUpdate routines, as well as a sprite state enumeration for PhysicsUpdate.

Last edited Jun 16, 2011 at 2:25 PM by smcgamer, version 1


No comments yet.