Skip to content

Commit

Permalink
Added infinite maps docs (#1708)
Browse files Browse the repository at this point in the history
  • Loading branch information
ketanhwr authored and bjorn committed Aug 29, 2017
1 parent dcacd23 commit edebb3b
Show file tree
Hide file tree
Showing 11 changed files with 92 additions and 5 deletions.
1 change: 1 addition & 0 deletions docs/index.rst
Expand Up @@ -25,6 +25,7 @@ Manual
manual/using-templates
manual/using-the-terrain-tool
manual/using-wang-tiles
manual/using-infinite-maps
manual/using-commands
manual/automapping
manual/keyboard-shortcuts
Expand Down
Binary file added docs/manual/images/infinite/infinite-demo.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/manual/images/infinite/infinite-new.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/manual/images/infinite/overview.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions docs/manual/introduction.rst
Expand Up @@ -60,10 +60,10 @@ first thing we’ll do is to start a new map with *File -> New -> New Map…*
New Map

Here, we choose the initial map size, tile size, orientation, tile layer
format, tile render order (only supported for *Orthogonal* maps) and
whether the map is infinite or not. All of these things can be changed
later as needed, so it’s not important to get it all right the first
time.
format, tile render order (only supported for *Orthogonal* maps) and whether
the map is :doc:`infinite <using-infinite-maps>` or not. All of these things
can be changed later as needed, so it’s not important to get it all right the
first time.

After pressing *OK*, we’ll see the tile grid and an initial tile layer
will be added to the map. However, before we can start using any tiles
Expand Down
66 changes: 66 additions & 0 deletions docs/manual/using-infinite-maps.rst
@@ -0,0 +1,66 @@
.. raw:: html

<div class="new">

New in Tiled 1.1

.. raw:: html

</div>

Using Infinite Maps
===================

Infinite maps give you independence from bounds of the map. The canvas is
"auto-growing", which basically means, that you have an infinite grid which
can be painted upon without worrying about the width and height of the map.
The bounds of a particular layer get expanded whenever tiles are painted
outside the current bounds.

.. figure:: images/infinite/overview.png
:alt: Infinite Maps Overview

Creating an Infinite Map
------------------------

In the order to create an infinite map, make sure the 'Infinite' option is
checked in New Map dialog.

.. figure:: images/infinite/infinite-new.png
:alt: New Infinite Map

The newly created map will then have an infinite canvas.

Editing the Infinite Map
------------------------

Except the Bucket Fill Tool, every other tool works exactly in the same way as
in the fixed size maps. The bucket fill tool fills the current bounds of that
particular tile layer. These bounds get increased upon further painting of
that tile layer.

.. figure:: images/infinite/infinite-demo.gif
:alt: Infinite Maps Editing

Conversion from Infinite to Finite Map and vice versa
-----------------------------------------------------

In the map properties, you can check/uncheck whether the map should be
infinite or not. When converting from infinite to a finite map, the width and
height of the final map are chosen on the basis of bounds of all the tile
layers.

.. figure:: images/infinite/infinite-map-initial.png
:alt: Initial Map

The initial Infinite Map

.. figure:: images/infinite/infinite-map-conversion.png
:alt: Properties

Unchecking the Infinite property in Map Properties

.. figure:: images/infinite/infinite-map-converted.png
:alt: Final Map

The converted Map
4 changes: 4 additions & 0 deletions docs/reference/tmx-changelog.rst
Expand Up @@ -7,6 +7,10 @@ Below are described the changes/additions that were made to the
Tiled 1.1
---------

- A new :ref:`tmx-chunk` element was added for infinite maps which
contains the similar content as ``data``, except it stores
the data of the area specified by its attributes.

- :doc:`Templates </manual/using-templates>` were added, a
:ref:`template group <tmx-templategroup>` is an external file
referenced by maps:
Expand Down
18 changes: 17 additions & 1 deletion docs/reference/tmx-map-format.rst
Expand Up @@ -251,7 +251,7 @@ find out from which tileset the tile is you need to find the tileset
with the highest ``firstgid`` that is still lower or equal than the gid.
The tilesets are always stored with increasing ``firstgid``\ s.

Can contain: `tile <#tile_1>`__
Can contain: `tile <#tile_1>`__, `chunk <#chunk>`__

Tile flipping
^^^^^^^^^^^^^
Expand Down Expand Up @@ -322,6 +322,22 @@ The following C++ pseudo-code should make it all clear:
directly tested, please make sure to report any errors you encounter
when basing your parsing code on it, thanks.)

.. _tmx-chunk:

<chunk>
~~~~~~~

- *x:* The x coordinate of the chunk in tiles.
- *y:* The y coordinate of the chunk in tiles.
- **width:** The width of the chunk in tiles.
- **height:** The height of the chunk in tiles.

This is currently added only for infinite maps. The contents of a chunk
element is same as that of the ``data`` element, except it stores the
data of the area specified in the attributes.

Can contain: `tile <#tile_1>`__

<tile>
~~~~~~

Expand Down

0 comments on commit edebb3b

Please sign in to comment.