Documentation ¶
Index ¶
- Constants
- func CheckCollisions(world *ecs.World)
- func CreateTilemap(seed int64, mapSize, tileSize int) *tile.Tilemap
- func FilterChat(msg string) string
- func GetScheduler() *ecs.Scheduler
- func LoadGame(world *ecs.World) *tile.Tilemap
- func MoveCharacter(input *Input, transform *phy2.Pos, collider *phy2.CircleCollider, ...)
- func SpawnPoint() phy2.Pos
- type Body
- type Input
- type Speech
- type TileObject
Constants ¶
View Source
const ( NoLayer phy2.CollisionLayer = 0 BodyLayer phy2.CollisionLayer = 1 << iota WallLayer )
View Source
const ( GrassTile tile.TileType = iota DirtTile WaterTile ConcreteTile )
View Source
const ClientDefaultUpdateQueueSize = 2 // TODO - make this dynamic
View Source
const ClientInputResendRate = 2 // The number of times the client resends his input to counter packet loss
View Source
const FixedTimeStep time.Duration = 16 * time.Millisecond
View Source
const NetworkTickDivider = 4 // The number of physics ticks before we send a network update
This defines the ratio of physics ticks to network ticks. TODO - right now I do a % NetworkTickDivider. It'd be nice to make that more systematic
View Source
const NumBodyTypes = 4
Variables ¶
This section is empty.
Functions ¶
func CheckCollisions ¶
func GetScheduler ¶
func MoveCharacter ¶
func SpawnPoint ¶
Types ¶
type Speech ¶
type Speech struct { Text string // contains filtered or unexported fields }
func (*Speech) HandleRender ¶
func (*Speech) HandleSent ¶
handles the speech, returns true if the speech wasn't already handled
type TileObject ¶
type TileObject struct { }
Click to show internal directories.
Click to hide internal directories.