A type is a structure from which you derive instances.
This is the structure:
type Player_typ
field X%
field Y%
field JumpHeight#
field Visible
end type
and this is an "instance" of the type, that you use in your game:
Global Player.Player_typ = New Player_typ
Player\X = 20
Player\Y = 20
Player\JumpHeight = 5.5
Player\Visible = false
The beauty of it is, you can make one or 1000's of instances from the same structure.
so:
for count = 1 to 1000
Player.Player_typ = New Player_typ
Player\X = 20
Player\Y = 20
Player\JumpHeight# = 5.5
Player\Visible = false
next
and you have 1000 instances of "Player" of type "Player_typ"
This is the structure:
type Player_typ
field X%
field Y%
field JumpHeight#
field Visible
end type
and this is an "instance" of the type, that you use in your game:
Global Player.Player_typ = New Player_typ
Player\X = 20
Player\Y = 20
Player\JumpHeight = 5.5
Player\Visible = false
The beauty of it is, you can make one or 1000's of instances from the same structure.
so:
for count = 1 to 1000
Player.Player_typ = New Player_typ
Player\X = 20
Player\Y = 20
Player\JumpHeight# = 5.5
Player\Visible = false
next
and you have 1000 instances of "Player" of type "Player_typ"