game

package
v0.0.0-...-4788e9c Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderMap

func RenderMap(cx *Context)

func RenderPlayerInMap

func RenderPlayerInMap(cx *Context)

func RenderPseudo3D

func RenderPseudo3D(cx *Context)

func RenderRays

func RenderRays(cx *Context)

func Retangle

func Retangle(x int, y int, height int, width int, color color.RGBA)

Types

type Colision

type Colision struct {
	At             Position
	ScreenPosition int
	Delta          float64
}

type Context

type Context struct {
	Map             [][]Tile
	Walls           map[Colision]Tile
	Colisions       []Colision
	MapHeight       int
	MapWidth        int
	FunnyMode       bool
	MapDeScale      int
	Rays            []Position
	Player          Position
	PlayerLookingAt float64
}

func (*Context) FindWalls

func (cx *Context) FindWalls()

func (*Context) GetRectSize

func (cx *Context) GetRectSize() (int, int)

func (*Context) LoadMap

func (cx *Context) LoadMap(fileName string) (err error)

func (*Context) Prepare

func (cx *Context) Prepare()

func (*Context) Process

func (cx *Context) Process()

My tears goes here.

func (*Context) ProcessRays

func (cx *Context) ProcessRays()

ty Garicas :pepe_heart:

func (*Context) Render

func (cx *Context) Render()

type ContretePosition

type ContretePosition struct {
	X, Y int
}

type Position

type Position struct {
	X, Y float64
}

type Tile

type Tile int
const (
	Nothing Tile = iota
	FilledBlue
	FilledRed
	FilledGreen
)

func (Tile) AsColor

func (t Tile) AsColor() color.RGBA

Jump to

Keyboard shortcuts

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