Documentation

Creating Genres

Design notes on how to handle game design.

Platformer


A Map and it's underlying mask

To create a Platformer, the mask system is important as it can be used a invisible guide for Objects. In the above image, Red would be class as a solid, Blue would use both mask and collision system.

Scripting

MaskGetValue(x, y), along with floatsin & floatcos will be the functions using in a platformer. MaskGetValue will return a value between 0-255.

Beat'em Ups


When Attacking, check for collision in the hit zone then check if it falls into the 'h' value.

Known Issues: Map Editor isn't design to handle delayed enemy loading.

Top-down Adventure/RPG

to be added...

RPG (Turn Based)

Overview/Movement
Change x/y with cos/sin. Check mask to see if the player can go there. Collisions can handle events Combat
- Simple Menu Selection or Button Selection
/* Simple Turn Timer battle code */
const MAX_CHARACTERS = 6;

enum character
{
    entity[40 char],
    Float:countdown
    // You might want to added other things 
}

new chars[MAX_CHARACTERS][character];
new turn = -1;
main()
{
    if ( turn == -1)
	{
	// Countdown Check
	    new n = 0;
	    while ( n < MAX_CHARACTERS )
	    {
	        if ( chars[n][entity][0] )
	        {
				chars[n][countdown] -= Time()
				if ( chars[n][countdown] <= 0 )
				{
					turn = n;
					  
				}
	        }
	        n++;
	    }
	}
	else
	{
		// Show Menu or Enemies attack
		if ( AttackFinished() ) //Call A public Function
		{
			chars[turn][countdown] = GetOriginalTime(); //Call A public Function
			turn = -1;
//You should also check for characters status.

		}
	}
}

Moves/attacks
-Uses a standardize function call. Return 1 if function has finished

Real Time Strategy

At this present time, Mokoi doesn't offer fine enough AI control. Try Stratagus http://www.stratagus.org/ instead.

Grided Turn based Strategy


Comments

Comming Soon