Recent Changes - Search:

ZGameEditor

Documentation

Community

Edit sidebar

ZApplication

ZApplication

The application component. This component is automatically created when you start a new project.

Properties

OnLoaded

This list is executed once at every program start. Put your application initialization components here.

OnClose

This is called when your application exits.

States

A list of AppState components that the application uses.

OnUpdate

Called once between every frame update.

OnRender

A list of render commands.

OnBeginRenderPass

This is called before each render pass.

Lights

A list of Light components that the application uses.

Content

The application content list. Put your game components here.

Caption

A text string that is displayed in the window caption of your application.

DeltaTime

Read only. The time in seconds that has passed since last frame was rendered. Use this value when updating model positions in expressions to make your game frame-rate independent. Example of expression using the deltatime-property: "CurrentModel.Position.X+=1*App.DeltaTime;".

Time

Read only. Time in seconds since application was started.

FpsCounter

Read only. The current number of frames per second. This value can be displayed on screen using the RenderText-component and is useful for detecting performance issues.

CurrentRenderPass

Read only. Can be used to define different behaviour on multiple render passes.

MousePosition

Read only. X and Y coordinates of the current mouse position, in -1 to 1 range.

MouseWheelDelta-readOnly

Returns integer value 1 or -1 depending on wheel direction.

ClearScreenMode

If set to 0 the the screen is cleared before every frame update. If a value other than zero, then the screen is not cleared. Use this for feedback effects. See the Particles-sample project for how to use this property.

RenderPasses

Defines the number of passes. The default is 1

WindowHandle-readOnly

This is the handle to the main window. Use this as a parameter when you need to call Win32-API using a external library.

ClearColor

The color that the screen will be cleared with. Default black.

AmbientLightColor

Global ambient light value - Default 0.4, 0.4, 0.4

FullScreen

Set this property to make your application run in fullscreen mode. You can override this property with the following command line switches:

  • -w Force windowed mode
  • -f Force fullscreen mode

FrameRateStyle

Set to one of preset values:

  • SyncedWithMonitor - (default) the frame rate will be limited to the monitors refresh rate. Defaults to 60 if the rate can't be determined.
  • Free - the frame rate will be as high as possible, this will use maximum cpu.
  • Fixed - the frame rate will attempt to match the value set in the FixedFrameRate-property.

FixedFrameRate

Controls the desired framerate when FrameRateStyle is set to Fixed.

ScreenMode

Select the screen resolution for your application.

ShowOptionsDialog

Set this property to display a dialogbox where the user can choose screen resolution and fullscreen-option on startup of your game. This features currently only works on Windows and Linux.

CustomScreenWidth/CustomScreenHeight

If these properties contains other values than zero, this screensize is used instead of the ScreenMode property. Use this for setting custom windowed modes such as a vertical shooting game.

CameraPosition

The current position of the camera. Animate this property to make scrolling games. Example ZExpression - "App.CameraPosition.X=App.Time * 0.5;" Move the screen slowly to the left.

CameraRotation

The current rotation of the camera in X,Y and Z axis.

LightPosition

The position or direction of the OpenGL light. The default OpenGL light is directional down the Z-axis.

ViewportRatio

Set to one of preset values:

  • Full Window - This is the default. The whole screen area is used for rendering. This means that depending on the ratio of the screen resolution the bounds of the visible area of your game world will be slightly different which may not always be desirable.
  • Custom - Use the value of the CustomViewportRatio
  • 4:3 - Use standard (non-widescreen) viewport ratio
  • 16:9 - Use widescreen ratio

CustomViewportRatio

Set a value here to use a custom viewport-ratio.

FOV

Camera Field Of View. Default value is 45 degrees.

ClipNear

The near clipping distance of OpenGL graphics. Objects that are closer to the camera than this value will not be drawn.

ClipFar

The far clipping distance of OpenGL graphics. Objects that are further away from the camera than this value will not be drawn.

MouseVisible

Set this to keep the mouse cursor visible.

EscapeToQuit

Uncheck this to disable user pressing Escape-key to quit your application.

Icon

Load a ICO-file to this property for customizing the application icon of the generated exe-file. Note: The icon is only inserted in compressed Windows exe-files, not for other platforms.

PreviewClearColor

Choose which color to use as a background in the preview-window of the designer. Available in designer only.

Edit - History - Print - Recent Changes - Search
Page last modified on July 20, 2012, at 10:20 am