Download the PHP package christianessl/landmap-generation without Composer

On this page you can find all versions of the php package christianessl/landmap-generation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package landmap-generation

landmap-generation

Generate pixelated, random world maps in PHP.

Code Climate Latest Stable Version Total Downloads Latest Unstable Version License

This is a simple landmap generator implemented in PHP. It supports generating a heightmap, setting up a water level, colorizing and shading. The outputted result will be in pixel style.

1. Installation

composer require christianessl/landmap-generation.

2. Usage

3. Example output

500x300 pixels

seed: 'otters_are_awesome!'

60% water, flat shader

30% water, flat shader

60% water, detailed shader

60% water, no shader

4. Configuration options

Class MapSettings

Public methods Description Default value
setWidth() map width in pixels 150
setHeight() map height in pixels 150
setColorScheme() the color scheme to use DefaultColorScheme
setWaterLevel() percentage of the map to be water 70
setInterpolationMode() when set, only every fourth pixel is actually calculated in heightmap generation. (as the calculation costs a lot of performance) Neighbouring pixels will be interpolated. Highly recommended. true

Class DefaultColorScheme

Constructor arguments Description Default value
ShaderInterface $shader The shader to use for this color scheme. If none is passed, "NullShader" will be used (which does no shading at all). NullShader

Class LandmapGenerator

Constructor arguments Description Default value
GeneratorSettingsInterface $settings The settings for the LandmapGenerator: MapSettings or DefaultSettings. -
string $seed Seed for the Random number generator. -
HeightmapGeneratorInterface $heightmapGenerator The algorithm for generating the heightmap. DiamondSquareHeightmapGenerator
WaterLevelGeneratorInterface $waterLevelGenerator The algorithm for placing the water level WaterLevelGenerator

Implemented Shaders

Class name Description
NullShader Does no shading at all.
FlatShader Simple shading with flat looking colors.
DetailShader Highly detailed altitudes in the map. No steps between the colors.

TODO


All versions of landmap-generation with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package christianessl/landmap-generation contains the following files

Loading the files please wait ....