Skip to content

Commit

Permalink
better description for bump.newWorld
Browse files Browse the repository at this point in the history
  • Loading branch information
kikito committed May 31, 2014
1 parent 6e92706 commit 38e641d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,19 @@ local bump = require 'bump'
### Creating a world

``` lua
local world = bump.newWorld()
local world = bump.newWorld(cellSize)
```

The first thing to do with bump is creating a world. That is done with `bump.newWorld`.

`bump.newWorld` has one optional parameter, called `cellSize`. It must be a number. It represents the size of the sides
of the (squared) cells that will be used internally to provide the data. In tile based games, it's usually a multiple of
the tile side size. So in a game where tiles are 32x32, `cellSize` will be 32, 64 or 128. In more sparse games, it can be
higher.
* `cellSize`. Is an optional number. It defaults to 64. It represents the size of the sides
of the (squared) cells that will be used internally to provide the data. In tile based games, it's usually a multiple of
the tile side size. So in a game where tiles are 32x32, `cellSize` will be 32, 64 or 128. In more sparse games, it can be
higher.

Don't worry too much about that number at the beginning, you can tweak it later on to see if bigger/smaller numbers
give you better results (you can't change the value of cellSize in runtime, but you can create as many worlds as you need,
each one with a different cellsize, if the need arises.)

`cellSize`'s default value is 64.
Don't worry too much about `cellSize` at the beginning, you can tweak it later on to see if bigger/smaller numbers
give you better results (you can't change the value of cellSize in runtime, but you can create as many worlds as you want,
each one with a different cellsize, if the need arises.)

The rest of the methods we have are for the worlds that we create.

Expand Down
Binary file added bump-simpledemo.love
Binary file not shown.

0 comments on commit 38e641d

Please sign in to comment.