vplevel

package
v0.0.0-...-bf055c7 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package vplevel contains the implementation of a level, the part of the game world that is not influenced by players and their actions.

Index

Constants

View Source
const LocalIDSeconds = 0

LocalIDSeconds is the number of seconds it should take to generate a system when playing local games.

View Source
const LocalIDZeroes = 0

LocalIDZeroes is the number of zeroes we should expect in ID signature when generating a system for network games.

View Source
const MaxPlanetSizeLarge = 1000

MaxPlanetSizeLarge is the maximum size, in number of squares per side, of a planet, when using the "large" settings.

View Source
const MaxPlanetSizeMedium = 300

MaxPlanetSizeMedium is the maximum size, in number of squares per side, of a planet, when using the "medium" settings.

View Source
const MaxPlanetSizeSmall = 80

MaxPlanetSizeSmall is the maximum size, in number of squares per side, of a planet, when using the "small" settings.

View Source
const MaxSquareSizeLarge = 25

MaxSquareSizeLarge is the maximum size, in meters, of a square when using the "large" settings.

View Source
const MaxSquareSizeMedium = 10

MaxSquareSizeMedium is the maximum size, in meters, of a square when using the "medium" settings.

View Source
const MaxSquareSizeSmall = 5

MaxSquareSizeSmall is the maximum size, in meters, of a square when using the "small" settings.

View Source
const MaxSystemSizeLarge = 42

MaxSystemSizeLarge is the maximum size, in number of planets, of a system, when using the "large" settings.

View Source
const MaxSystemSizeMedium = 7

MaxSystemSizeMedium is the maimum size, in number of planets, of a system, when using the "medium" settings.

View Source
const MaxSystemSizeSmall = 1

MaxSystemSizeSmall is the maximum size, in number of planets, of a system, when using the "small" settings.

View Source
const MinPlanetSizeLarge = 100

MinPlanetSizeLarge is the minimum size, in number of squares per side, of a planet, when using the "large" settings.

View Source
const MinPlanetSizeMedium = 60

MinPlanetSizeMedium is the minimum size, in number of squares per side, of a planet, when using the "medium" settings.

View Source
const MinPlanetSizeSmall = 50

MinPlanetSizeSmall is the minimum size, in number of squares per side, of a planet, when using the "small" settings.

View Source
const MinSquareSizeLarge = 5

MinSquareSizeLarge is the minimum size, in meters, of a square when using the "large" settings.

View Source
const MinSquareSizeMedium = 2

MinSquareSizeMedium is the minimum size, in meters, of a square when using the "medium" settings.

View Source
const MinSquareSizeSmall = 1

MinSquareSizeSmall is the minimum size, in meters, of a square when using the "small" settings.

View Source
const MinSystemSizeLarge = 3

MinSystemSizeLarge is the minimum size, in number of planets, of a system, when using the "large" settings.

View Source
const MinSystemSizeMedium = 2

MinSystemSizeMedium is the minimum size, in number of planets, of a system, when using the "medium" settings.

View Source
const MinSystemSizeSmall = 1

MinSystemSizeSmall is the minimum size, in number of planets, of a system, when using the "small" settings.

View Source
const NetworkIDSeconds = 5

NetworkIDSeconds is the number of seconds it should take to generate a system when playing network games.

View Source
const NetworkIDZeroes = 12

NetworkIDZeroes is the number of zeroes we should expect in ID signature when generating a system for network games.

View Source
const PackageCopyright = "Copyright (C)  2015, 2016  Christian Mauduit <ufoot@ufoot.org>" // PackageCopyright set by version.sh

PackageCopyright contains a short copyright notice.

View Source
const PackageEmail = "ufoot@ufoot.org" // PackageEmail set by version.sh

PackageEmail contains a contact email for the package.

View Source
const PackageLicense = "GNU GPL v3" // PackageLicense set by version.sh

PackageLicense contains a short license information.

View Source
const PackageName = "Vapor Toolkit" // PackageName set by version.sh

PackageName contains a readable name of the package, suitable for display.

View Source
const PackageTarname = "vapor" // PackageTarname set by version.sh

PackageTarname contains a short name of the package, suitable for a filename.

View Source
const PackageURL = "https://github.com/ufoot/vapor" // PackageURL set by version.sh

PackageURL contains the address of the project homepage.

View Source
const VersionMajor = 0 // VersionMajor set by version.sh

VersionMajor is the project major version.

View Source
const VersionMinor = 3 // VersionMinor set by version.sh

VersionMinor is the project minor version.

View Source
const VersionStamp = "c6a4298" // VersionStamp set by version.sh

VersionStamp is the project stamp, possibly changes for each build.

Variables

This section is empty.

Functions

func LocalID

func LocalID(sizes Sizes) (*big.Int, error)

LocalID generates a new level id, not suitable for inte two players will never generate the same level id.

func NetworkID

func NetworkID(sizes Sizes, key *vpcrypto.Key) (*big.Int, []byte, error)

NetworkID generates a new level id, using cryptography to garantee two players will never generate the same level id.

Types

type Sizes

type Sizes struct {
	SquareSize vptypes.Size
	PlanetSize vptypes.Size
	SystemSize vptypes.Size
}

Sizes is used to hold together the three major level size settings, concerning squares, planets and systems.

Jump to

Keyboard shortcuts

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