Coder Social home page Coder Social logo

bugeye's Introduction

microjam23

GBA Microjam '23

How to add a new microgame

You can add a new microgame by duplicating the test microgame code files (tmg_test_game.h and tmg_test_game.cpp) and changing the namespace to a new one.

For example, if your new microgame is going to use the xyz namespace, you can duplicate the mentioned code files with xyz_game.h and xyz_game.cpp as filenames.

Remember to change the namespace in the MJ_GAME_LIST_ADD macro too.

Microgame rules

Microgames must follow these rules in order to play along with other microgames, with the animations shown between them and with the pause menu:

  • All code used by a microgame should be placed in its own namespace. For example, the test microgame uses the tmg namespace.
  • All code and asset files (graphics, music, etc.) used by a microgame should have the code namespace as filename prefix. For example, the test microgame uses tmg_ as filename prefix.
  • All microgames must include a text file per asset type indicating the license of all used assets. For example, the test microgame uses tmg_credits.txt as credits filename.
  • The start key is used to show and hide the pause menu, so microgames should not use it.
  • All sprites and backgrounds must have a priority greater than 0 (by default, sprites and backgrounds priority is 3).
  • The system sprite color palette (used for rendering text, among other things) must not be changed.
  • The pumpkin is rendered using a regular background, so microgames can't show two affine backgrounds or four regular backgrounds when the pumpkin is visible (it is visible when a microgame is created and when the mj::game::fade_in and mj::game::fade_out methods are called). However, you can use all available backgrounds when mj::game::play is called.
  • Global palette functions like bn::bg_palettes::set_grayscale_intensity and bn::sprite_palettes::set_grayscale_intensity must be avoided, since they're used for the transition between microgames and the pause menu. You can apply palette effects to individual color palettes though.

Frequently asked questions (FAQ)

How can I disable the test microgame or other microgames?

You can disable a microgame by commenting out the MJ_GAME_LIST_ADD macro call.

Where's the microgame interface documentation?

For now it's in the header file (mj_game.h).

bugeye's People

Contributors

gvaliente avatar tjk113 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.