Tutorial 01 - Hello Isaac!
Welcome to the first ppIsaac tutrial. ppIsaac is a 2D physics and collision module for BlitzMax basten on Newton game dynamics SDK. Thanks to klepto for his fine cross compiling wrapper.
To install the mod just download the latest version of ppIsaac. Extract the contents of the rar archive into BlitzMax/mod/ folder. That is all.
This tutorial shows how to set up ppIsaac in BlitzMax and how to close it properly.
SuperStrict
Import pyroplay.ppisaac
Graphics 800,600
ppIsaac.Start()
While Not KeyHit(KEY_ESCAPE) And Not AppTerminate()
Cls
ppIsaac.Update()
DrawText "Hello Isaac!" , 10 , 10
Flip
Wend
ppIsaac.Stop()
End
As you can see, setting up the basics is very simple. At first you need to import the ppIsaac module with
Import pyroplay.ppisaac
If you want to use the ppIsaacLite module just use the following code
Import pyroplay.ppisaaclite
The very first ppIsaac command has to be:
ppIsaac.Start()
This will initialise the physic engine. Now we would be ready to create some geometries, but unfortunately this will be covered in the following tuts.
Let's have a look at the next ppIsaac command in Listing 1.1:
ppIsaac.Update()
This function does the whole physics calculations and transformation of the objects in the ppIsaac world. You should call this function somwhere in the beginning of your main loop.
The last command is this
ppIsaac.Stop()
This function deletes all objects in the ppIsaac world and closes everything related to ppIsaac.
We have used functions of the ppIsaac type only, yet. The ppIsaac type is the core of this engine. It provides a set of functions to control the settings of the ppIsaac world like gravity or collision detection as we will see in later tutorials.
Now this first tutorial was pretty easy but rather boring. So let's start with the second tutorial where the the real action begins.
Links:
ppIsaac Product Page
Tutorial 02 - Static and Dynamic Objects
Tutorial 03 - Texture and Materials
Tutorial 04 - Joints
Tutorial 05 - Collision Detection and Material Collision