Documentation ¶
Index ¶
Constants ¶
View Source
const CHUNK_HEIGHT = 128
View Source
const CHUNK_LENGTH = 16
Variables ¶
View Source
var BlockTypes = []BlockType{ Stone, Grass, Dirt, }
View Source
var BoundingBoxMap = map[EntityType]mgl32.Vec3{ Player: {0.6, 1.8, 0.6}, }
View Source
var TickLength = (1000 / util.TicksPerSecond) * time.Millisecond
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct {
// contains filtered or unexported fields
}
func CreateBlock ¶
func (Block) OwningChunk ¶
type Chunk ¶
type Chunk struct { Blocks *[CHUNK_LENGTH][CHUNK_HEIGHT][CHUNK_LENGTH]*Block Dirty bool // contains filtered or unexported fields }
func (Chunk) GetPosition ¶
type World ¶
type World struct { ChunkMap map[mgl32.Vec2]*Chunk Entities []*Entity // contains filtered or unexported fields }
func CreateWorld ¶
func (*World) GenerateChunk ¶
type WorldServer ¶
type WorldServer struct { Player *Entity // contains filtered or unexported fields }
var ServerInst WorldServer = WorldServer{}
func (*WorldServer) AddWorld ¶
func (self *WorldServer) AddWorld(world *World)
func (WorldServer) GetWorld ¶
func (self WorldServer) GetWorld(name string) *World
func (*WorldServer) GetWorlds ¶
func (self *WorldServer) GetWorlds() *map[string]*World
func (*WorldServer) Init ¶
func (self *WorldServer) Init()
func (*WorldServer) RemoveWorld ¶
func (self *WorldServer) RemoveWorld(world *World)
func (*WorldServer) Tick ¶
func (self *WorldServer) Tick()
Click to show internal directories.
Click to hide internal directories.