param

package
v0.0.0-...-d12af05 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScreenWidth      = 960
	ScreenHeight     = 720
	HalfScreenWidth  = ScreenWidth / 2.0
	HalfScreenHeight = ScreenHeight / 2.0
	DeltaTime        = 1.0 / 60.0
)
View Source
const (
	FoodScore    = 100
	FoodLength   = 16
	RadiusFood   = FoodLength / 2.0
	RadiusEating = RadiusMouth + RadiusFood
)

Food parameters

View Source
const (
	SnakeSpeedInitial      = 275
	SnakeSpeedFinal        = 250
	SnakeLength            = 240
	SnakeWidth             = 30
	MouthAnimStartDistance = 120
	RadiusSnake            = SnakeWidth / 2.0
	RadiusMouth            = RadiusSnake * 0.625
)

Snake parameters

View Source
const (
	ToleranceDefault    = 2 //param.SnakeWidth / 16.0
	ToleranceScreenEdge = RadiusSnake
)

Snake collision tolerances must be an integer or false collisions will occur.

Variables

View Source
var (
	ColorBackground = color.RGBA{0, 48, 73, 255}     // ~ Prussian Blue
	ColorSnake1     = color.RGBA{252, 191, 73, 255}  // ~ Maximum Yellow Red
	ColorSnake2     = color.RGBA{247, 127, 0, 255}   // ~ Orange
	ColorFood       = color.RGBA{214, 40, 40, 255}   // ~ Maximum Red
	ColorDebug      = color.RGBA{234, 226, 183, 255} // ~ Lemon Meringue
	ColorScore      = color.RGBA{247, 127, 0, 255}   // ~ Orange
)

Colors to be used in the drawing. Palette: https://coolors.co/palette/003049-d62828-f77f00-fcbf49-eae2b7

View Source
var (
	TeleportEnabled = true
	PrintFPS        = true
	DebugUnits      = false // Draw consecutive units with different colors
	ShaderRound     *ebiten.Shader
	FontFaceScore   font.Face
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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