gloomo

package module
v0.0.0-...-e6fda21 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2025 License: LGPL-3.0 Imports: 8 Imported by: 0

README

gloomo

Go Reference

Gloomo is a data oriented rendering engine for ebiten. Also gloomo provides some standard containers and repositories useful in a DAO game.

Phylosophy

Gloomo follows some ideas of domain driven design, clean architecture from Bob Martin and data-oriented architecture. It based on the next ideas:

  1. Orthogonality of data and behaviour. None of application logical units should abstract both of them.
  2. All objects that represents behaviour should be constructed on the start of application.
  3. Objects that represents data may have some additional methods if they are quasi-linear and don't have side effects.
  4. Behaviours part of application should be devided on different layers. Data objects should be used for passing between layers.
Layers

It uses next conceptions:

  • Component
  • Model
  • Repository provide
  • System
Rendering

Mostly rendering follows gloomo phylosophy

  • node.Node component
  • Nodes is a special type of models that contains special component

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager is a standard system runner for gloomo engine.

func (*Manager) Add

func (m *Manager) Add(system System)

func (*Manager) AddStartup

func (m *Manager) AddStartup(system System)

func (*Manager) Run

func (m *Manager) Run() error

Run all systems in a order of their addition.

type NodeRepository

type NodeRepository interface {
	List() iter.Seq2[gid.ID, node.Node]
}

type Render

type Render struct {
	// contains filtered or unexported fields
}

func NewRender

func NewRender(repo NodeRepository) *Render

func (*Render) Draw

func (r *Render) Draw(screen *ebiten.Image)

type System

type System interface {
	Run() error
}

Directories

Path Synopsis
Package container implements different containers that may be needed for implementation of data oriented game design.
Package container implements different containers that may be needed for implementation of data oriented game design.
Package loader contains systems that loads needed for you game resources.
Package loader contains systems that loads needed for you game resources.
Package node implements standard render-time aggregates.
Package node implements standard render-time aggregates.

Jump to

Keyboard shortcuts

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