3D Graphic Editor

Free 3D Level Editor with integrated BSP compiler Getic 3D: BSP, Portals, PVS, Light-Maps, Moving Platforms
About Tutorials Getic Resources MOGE

-MOGE
    Moge Flow
    GeticNet
    Index
    Download
    MogeDocs
    NPXmoge
    Samples
    Levem Man
Moge stands for message oriented game engine
MOGE  
    Moge stands for message oriented game engine. Moge is at its first stages
of development.
Moge has 86.000 lines of code and I cannot even call it
pre-pre-alpha version.
Moge is developed in C++ and is intended to run across
multiple platforms.
Moge uses Squirrel engine for scripting. During play, events
will be fired from engine into the
script.  Script is being notified by same function
with different parameters (similar to WinProc()
).
Script main procedure function will receive an event id/message and additional
information each time something happen in the engine. Because squirrel supports
polymorphisms at function level 'GameProc' function will receive different objects
depending by the event.


Moge startup sequence.

-starts console window
-looks in registry for home directory
-re base the running dir to <home>/_bin
-Loads moge.ini if it founds it in <home>/_bin directory
-creates render system, if cannot Error and exists.
-loads sound and input system (if cannot uses default)
-loads input system (if cannot uses default)
-loads script file and calls main() function passing system object

Moge loads a Squirrel file and execute it. Moge is configured to run as possible 
in its _bin directory. All scripts are looked up in _bin/scripts/ directory. A *.gh file is 
a header file for the script. A *.gs file is the script file. Any Moge main script file 
(the file that is loaded first) should implement Main function.

The main function receives a pointer to main engine system. From this object you can
access render system, texture system, input and sound system. Textures and sounds
can be loaded at this time. Local script data can be initialized. Main function
should always return the name of the 'Game Procedure' function. This is the 'callback'
function. The events fired by the engine are defined and added in common.gh. 
Each event (message) has 2 parameters associated to it. See common.gs file for
reference

Moge objects:

System    System object controls all other subsystems and managers as;
Render    subsystem, 
Input     subsystem, 
Sound    subsystem
Net    subsystem 
Texture     manager
Model    manager
Script    manager

Each object export several functions into the script making MOGE 100% script controllable.


Exported data and functions.

RndStruct - used to exchange data to render driver dll
retainedDraw    in param, forces retained drawing
wndStyle    in, window style   
fNear   in, near plane distance
fFar in, far clipping plane distance
hFov     in, field of view
xPolyMode     in, drawing polygon mode
wndParent     in , parent of render window
pfDepthBits     in , depth bits
pfStencilBits     in
bFullScreen  
  in,   1 creates a full screen window

bgColor    in, background color
clipCursor   in, 1 clips the cursor into the window area
bKillFocus   in, 1 hides cursor when gain focus
dmPelsWidth   in, width of window
dmPelsHeight   in, height of window
dmBitsPerPel   in, bits per pixel
bActivated   in, 1 to minimize the window when deactivated
fWidth   out, width of projection plane at fnear
fHeight    out, height of projection plane at fnear
nWidth    out, width of window in pixels
nHeight    out, height in pixels



SystemData holds precious info each frame. Is passed in the script along with several messages
fps    frames per second
curTime    current time
pauseTime     pause time
ticktime    last frame time
framecount    current frame counter
pKeys    keyboard state
pMouse   mouse state

V3 point spatial position
x
y
z

CLR
r
g
b

UV
u
v

Pos
right
up
fwd
pos
euler
scale
rot


M4


Vtx
xyz
nrm
rgb
uv[4]
user


Itape
SetVolume
SetPos



Htex
hTex
glTarget
envMode
genST


                          
IRender
Color3
Push
DbgLine
Pop
Rotate
RotateTo
Scale
Translate
Begin
BeginPrim
End            
RenderVertex
Vertex2
Vertex3
Texture2

                     
        
Camera
ViewMatrix
SetPos
SetFarAndFov



UIMan
Clear
Create
Paint
ResetCursor
TextOut
GetVievPort
GetCharSize
GetScreenGridY
GetScreenGridX
GetControl

  
UiControl
Create
SetColor
SetImage
SetHImage
SetFont
Show
Enable
UiButton
UiListBox
UiComboBox
UiMenu
UiSplider
UiEdit
UiWindow

  
GServer
GetIp
GetPort

 

LevelMan
Setup
CheckLocally
Download
GetResourceCount
GetResourceAt
QueryMaster
GetServerAt


System
Stop
GenTex
GenTexFile
GenTexFont
DeleteTexFont
DeleteTex
AddSoundFile
RemoveSoundFile
RemoveSound
GetTape
PlayPrimary
StopPlay
PlayPrimaryFile
StopPlayFile
IsKeyDown
Moves
Keys
GetPressedKey
SetMode
GetMode
GetCamera
SetHudMode
SetHudMode
IgnoreInput
GetUIMan
GetSysData
ToggleFullScreen
Print

      
FileBrowser
BroseDir
GetAt

Messages and associated data
Message
Value
first parameter
second parameter
SYS_0 2024

SYS_START 2025 System SystemData 
SYS_TOGLESCRREN 2026 1 or 0
SystemData
SYS_ESCAPE 2027

SYS_PAINT 2028 Camera
SystemData
SYS_EXIT 2029
SystemData
SYS_RENDER 2030 Camera SystemData
SYS_SPIN 2031 System SystemData
SYS_INPUT 2032 1/0 up down input.gh key codes
SYS_SETERROR 2033 error no error text
SYS_CLOSEAPP 2034
SystemData
SYS_UICOMMAND 2035 cmd ID system
SYS_BSP_READ 2124 BTF_Section File
SYS_STATUSTEXT


SYS_NETREC


...more to come





            

web Mail

Graphics: Reea

Sponsor: EnjoyDecor

By: Marius C.O.