Monkey Coder – Draw

Monkey Coder – Draw

Notice:

Between the – Method OnUpdate – and the – Method OnRender – we have to create the – Method DrawPlayField –

The code is:

‘ DrawPlayField START *********
Method DrawPlayField:Int()

‘Draw the top wall with a rectangle
DrawRect(10,10,200,100)

Return True
End
‘ DrawPlayField END ***********

You can draw Rectangles, Circles and others things…

After inside – Method OnRender – you can write:

Cls ‘Clear the canvas each frame, the canvas will be black!
DrawPlayField() ‘this call draws the background

DrawPlayField() is the same you have created above.

' STEP 1 All games open with this first command
Strict

#rem
Script: 
Description: 
Author: Andrea Tonin
#End

' STEP 2 Import framework mojo - it is a 2D framamework to support graphics, sound, input, device events
Import mojo

' STEP 3 Creation of Class - yourgame - (we can use the name of the game)

' Class yourgame START *****************************************
Class yourgame Extends App

' STEP 4 Creation of Method OnCreate - OnUpdate - OnRender

	' OnCreate START *******
	Method OnCreate:Int()
	SetUpdateRate(60)
	Return True
	End
	' OnCreate END *********

	' OnUpdate START *******
	Method OnUpdate:Int()
	Return True
	End
	' OnUpdate END *********
	
	' DrawPlayField START *********
	Method DrawPlayField:Int()
	'Draw the top wall with a rectangle
	DrawRect(10,10,200,100)
	Return True
	End
    ' DrawPlayField END ***********

	' OnRender START *******
	Method OnRender:Int()
	
	Cls 'Clear the canvas each frame, the canvas will be black!
    DrawPlayField() 'this call draws the background
	
	Return True
	End
	' OnRender END *********

End
' Class yourgame END ********************************************

' Step 5 Creation of Main function

Function Main:Int()
	' Create a running istance from our class - the class - yourgame - has been created at STEP 3 
	New yourgame
	Return True
End
By |Monkey Coder|Commenti disabilitati su Monkey Coder – Draw

Monkey Coder – Base White Canvas

Monkey Coder – Base White Canvas

' STEP 1 All games open with this first command
Strict

#rem
Script: 
Description: 
Author: Andrea Tonin
#End

' STEP 2 Import framework mojo - it is a 2D framamework to support graphics, sound, input, device events
Import mojo

' STEP 3 Creation of Class - yourgame - (we can use the name of the game)

' Class yourgame START *****************************************
Class yourgame Extends App

' STEP 4 Creation of Method OnCreate - OnUpdate - OnRender

	' OnCreate START *******
	Method OnCreate:Int()
	SetUpdateRate(60)
	Return True
	End
	' OnCreate END *********

	' OnUpdate START *******
	Method OnUpdate:Int()
	Return True
	End
	' OnUpdate END *********

	' OnRender START *******
	Method OnRender:Int()
	Return True
	End
	' OnRender END *********

End
' Class yourgame END ********************************************

' Step 5 Creation of Main function

Function Main:Int()
	' Create a running istance from our class - the class - yourgame - has been created at STEP 3 
	New yourgame
	Return True
End
By |Monkey Coder|Commenti disabilitati su Monkey Coder – Base White Canvas

Monkey Coder – Hello World

Monkey Coder – Hello World

Monkey is a next-generation games programming language that allows you to create apps on multiple platforms with the greatest of ease.

Let’go on!

' This is only a single line comment

#rem
Multiple line comment
Multiple line comment
#end

'The main function is required in every project!!!!
' ********** Function Main() START **********
Function Main()
	' Render the text
	Print ("Hello World")
' Every function needs to be closed!!!
End
' ********* Function Main() END    **********

By |Monkey Coder|Commenti disabilitati su Monkey Coder – Hello World

Animation – Hierarchies

Animation – Hierarchies

One of the most useful tools in producing computer animation is the ability to link objects together to form a chain. By linking one object to another, you create a parent-child relationship. Transforms applied to the parent are also transmitted to child objects. A chain is also referred to as a hierarchy.

GENERAL

1. Create Object1
2. Create Object2
3. MAIN TOOLBAR> Select and Link> in the viewport click the Object1 (it will be the parent object), after click the Object2 (it will be the child object)

MODIFY

Select Object1> RIGHT COLUMN> Hierarchy> setup: ‘Pivot’ – ‘IK’ – ‘Link Info’
MAIN TOOLBAR> Schematic View

By |3D Graphic|Commenti disabilitati su Animation – Hierarchies

3DS Max – Animation – Controller – Reaction

3DS Max – Animation – Controller – Reaction

The Reaction controller is a procedural controller that lets a parameter react to changes in any other parameter in 3ds Max. You need of a master object (driver) and a slave object (driven).

GENERAL

Example: the rotation of a box resizes a sphere

1. Create a Box (it will be the master)

2. Create a Sphere (it will be the slave)

3. MAIN TOP MENU> Animation> Reaction Manager

4. Reaction Manager> click over the small icon ‘+’ (Add Master), pick the Box in the viewport> Select ‘X Rotation’

5. Reaction Manager> select the Master> click over the small icon ‘+’ (Add Slave), pick the Sphere in the viewport> Select ‘Scale’

6. This Create State001

7. Activate ‘Create Mode Button’

8. Rotate the Box and Scale the Sphere> click over small icon ‘Create State’

9. This Create State002

10. Deactivate ‘Create Mode Button’ and close ‘Reaction Manager’

ERASE REACTIONS

MAIN TOP MENU> Animation> Reaction Manager> select a Reaction> click over the small icon ‘Delete Selected’

By |3D Graphic|Commenti disabilitati su 3DS Max – Animation – Controller – Reaction