1. blitz handles drawing of entities, anything out of view is not drawn, anything out of camera range is not drawn etc
2.You canhave types which hold your 3d data eg
type TCar
field name$, id$ etc
field mesh.TEntity
end type
type TEntity
field ent
field scaleX,scaleY,scaleZ etc
end type
then do a simple
for ThisCar.TCar = each TCar
if not ThisCar\mesh = null
if ThisCar\mesh\ent
freeentity ThisCar\mesh\ent
endif
delete ThisCar\mesh
endif
next
This allows simple management of large amounts of objects.
3. You could have base entities and then copy them to the meshpointer
eg
type TBaseEntity
field name$
field mesh%
end type
function Copy_BaseEntity(name$)
for ThisBase.TBaseEntity = each TBaseEntity
if ThisBase\name = name
return copyentity(ThisBase\mesh)
endif
next
end function
You would create the base entities on startup of a map\level and then copy as needed.
2.You canhave types which hold your 3d data eg
type TCar
field name$, id$ etc
field mesh.TEntity
end type
type TEntity
field ent
field scaleX,scaleY,scaleZ etc
end type
then do a simple
for ThisCar.TCar = each TCar
if not ThisCar\mesh = null
if ThisCar\mesh\ent
freeentity ThisCar\mesh\ent
endif
delete ThisCar\mesh
endif
next
This allows simple management of large amounts of objects.
3. You could have base entities and then copy them to the meshpointer
eg
type TBaseEntity
field name$
field mesh%
end type
function Copy_BaseEntity(name$)
for ThisBase.TBaseEntity = each TBaseEntity
if ThisBase\name = name
return copyentity(ThisBase\mesh)
endif
next
end function
You would create the base entities on startup of a map\level and then copy as needed.