filu

package module
v0.0.0-...-73b4bbd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2021 License: MIT Imports: 1 Imported by: 0

README

GoDoc

A Simulation

A simulation, in filu, is the running kernel that is simulating a world. It is the go routine that is receiving ticks from the clock, taking input from the actors and applying it to the simulated world, then calculating the world state of the next frame and sending it back out to the actors. It is the game loop.

A simulation has a life cycle. It begins as an UnstartedSimulation. An unstarted simulation has only one behavior, it can Begin.

Once the simulation has begun, it is a RunningSimulation. A running simulation can connect and remove actors. It can also halt which stops the simulation.

A HaltedSimulation has no defined behavior yet. But it could perhaps contain stats and analytics. Maybe all the Actors that remained connected through the Halt.

rpg2d is an implementation of the Simulation interface and life cycle.

Process & Go routine's of a running Simulation

dia diagram of the process architecture

Work journal

A journal to store work log of entries and ideas. Reading the latest entry will give some context to what's currently being worked on, what's working, what's not working.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actor

type Actor struct {
	// The Name of the User that owns the Actor.
	Username string

	// The Name used to represent an Actor in a world.
	Name string
}

An Actor is the ID of a unique entity in a world. The uniqueness of a Username+ActorName combination allows an Actor to be the key in a key/value database containing game specific statistics and values associated with a specific Actor.

type Event

type Event interface {
	HappenedAt() time.Time
}

An Event is an immutable fact that happened at a single moment in time.

type Time

type Time struct {
	Moment time.Time
}

A Time is a single moment in time. It is used by Implementors of the Event interface to avoid reimplementation of the HappenedAt() method.

func Now

func Now() Time

func (Time) HappenedAt

func (e Time) HappenedAt() time.Time

Directories

Path Synopsis
Package actor provides a stream processing pattern to supply actor selection/creation to a filu application.
Package actor provides a stream processing pattern to supply actor selection/creation to a filu application.
Package auth provides a stream processing pattern to supply user authentication to a filu application
Package auth provides a stream processing pattern to supply user authentication to a filu application
net
coord
Package coord implements math primitives that are used in a 2d cell/tile based game.
Package coord implements math primitives that are used in a 2d cell/tile based game.
sim
The sim package defines the life cycle and interaction protocol used to interact with a game world simulation.
The sim package defines the life cycle and interaction protocol used to interact with a game world simulation.
Package ssim is an experimental implementation of an append only log of immutable Event's.
Package ssim is an experimental implementation of an append only log of immutable Event's.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL