![]() |
The JAM Object - Set up a game window | ![]() | ||||||||||||||||||||||||||||||||||||
As soon as you create a JAM object, it makes a window for itself, or attatches itself to an existing window.
will create a JAM object in the topmost window. This is recomended if you are using Jamagic's default window option (If you don't know what this is, assume that you are) Note that this line alone will do nothing. You must tell the JAM object to Run (see below) You must be careful with this though; if there are no windows open, creating a JAM object like this will cause a Jamagic runtime error. If you want the JAM object to make it's own window, use this:
The new JAM object will make it's own window to a set format: The window will be 640 x 480 in size, centered in the screen, and resizable. For more control over the window, you can set one up yourself, then tell the JAM object to use it:
The oWin window can be set up in any way, but AutoRefresh and AutoBack are automatically turned OFF, and Lock is automatically called. It is recomended to include the Window.HIDDEN flag, as this will avoid screen flickering later on. (JAM will make the window visible internally) To make the JAM object actually do something, you need to set up a frame and code, then tell it to run. The beginings of this are shown below:
This code will be used in all the future examples. JAM © 2005 no one in particular Project started by David Evans in 2005 | ||||||||||||||||||||||||||||||||||||||