OK: Standards!
for coding, you should always put a header at the top with the following info:
`#######################################
`<MODULE NAME>
`<YOUR NAME/USERNAME>
`<DATE STARTED>
`<LAST REVISION DATE>
`#######################################
Also, some modules may be entirely functions, such as the collision module (ignore the messy code):
FUNCTION SetupCollision(Object,Group)
SC_SetupObject Object,Group,0
endfunction
FUNCTION CameraCollision(X1#,Y1#,Z1#,X2#,Y2#,Z2#,Radius#,CollisionObj)
C=sc_SphereSlide(CollisionObj,X1#,Y1#,Z1#,X2#,Y2#,Z2#,Radius#,0)
IF C>0:
cx#=sc_getCollisionSlideX()
cy#=sc_getCollisionSlideY()
cz#=sc_getCollisionSlideZ()
POSITION Camera cx#,cy#,cz#
ENDIF
ENDFUNCTION
FUNCTION ObjectCollision(X1#,Y1#,Z1#,X2#,Y2#,Z2#,Radius#,CollisionObj,MainObj)
C=sc_SphereSlide(CollisionObj,X1#,Y1#,Z1#,X2#,Y2#,Z2#,Radius#,0)
IF C>0:
cx#=sc_getCollisionSlideX()
cy#=sc_getCollisionSlideY()
cz#=sc_getCollisionSlideZ()
POSITION OBJECT MainObj,cx#,cy#,cz#
ENDIF
ENDFUNCTION
FUNCTION RayCast(X1#,Y1#,Z1#,X2#,Y2#,Z2#,Radius#,CollisionObj)
C=sc_SphereSlide(CollisionObj,X1#,Y1#,Z1#,X2#,Y2#,Z2#,Radius#,0)
ray=0
IF C>0:
ray=1
ENDIF
ENDFUNCTION ray
DELETE MEMBLOCK 1
if your module is like this, you may need to add a section at the end using REMSTART and REMEND to explain the functions, or put the explaination in this thread.
For modules, the first two modules we should get working are simple movement/collision, and level loading. I will make a simple test level to use until we make real levels.
Collision, I can handle.
Movement, anyone who has the time to make it, but for now it may be just a
move camera command. When it does get made into a final module, there should be one main function called
handle_movement().