Game map editor User Guide

Source: Internet
Author: User
Copyright Disclaimer: You can reprint the document at will. During reprinting, you must mark the original source and author information of the article as hyperlinks and this statement.
Original article address:
Http://www.matrix.org.cn/resource/article/43/43790_j2me_mappy.html
Keywords: j2-mappy, tile, map editing

This article mainly introduces the two popular game development tools mappy (mapwin) and tiled, respectively, introduces the tool installation, use, Advantages and Disadvantages analysis, although not comprehensive, however, all usage points are described. As an essential Getting Started Guide for fans who develop games.

I. What is "map editor"
The map editor, as its name implies, is a tool used to edit maps. If you have played Warcraft, Empire 2, and hero invincible, you should know that these games are equipped with a map editing tool that allows players to edit map levels themselves. The map editor has similar functions.

Ii. y (mapwin) Getting Started Guide:

1. Prerequisites:
Tile: Chinese name-tile, haha, that is, the Unit tiled on the surface of an object. All players who have used j2-based tile or VC for game development know it.
Playback Library: a playback library that supports loading and displaying FMP Map Files of mapwin.

2. mapwin introduction:

Software name: mapwin
Version: 1.4.11
Running Environment: Windows
Dependent library files: libpng12.dll and zlib. dll
Purpose: flexibly create tile for 2D and 3D games.
Powerful playback libraries: DirectX, Allegro, OpenGL, Java, CDX, SDL, Delphi, blitz basic, dark basic, gbamappy, combined, and Gamemaker

3. quick installation Navigation:
The first step is to download mapwin. The author downloads mapwin1.4.11.
To support PNG images, download two DLL files:
Zlib. dll-used for File compression: zlib.net
Libpng12.dll-Windows version of LibPNG, PNG image compression library,: gnuwin32
Installing these two DLL files is simple. You can copy them directly to the mapwin directory.

4. Quick Navigation:
(1) The first step is to start the program. File-> new map, create a map, set the length of each tile and the number of rows and columns of the tile contained in the map.

(2) Enter File> Import... as prompted, and select the image as the tile. Then, the image tile configured in the previous section is displayed on the right side.

(3) You can select the tile with the mouse, and click the appropriate position in the map to draw the tile on the map. Right-click to delete the title on the map.

(4) mapwin has only one layer by default. To create a new layer, you can use layer-> add layer, the status bar above the map displays the current position of the mouse and the number of layers of the current layer.

(5) After map is complete, press Ctrl + S to save and select File-> export as text to export the map as text represented by the map array. The "map array (s) prefix with" option can be changed to the Java array format: New int [] []. This will generate available code snippets in the j2s, which can be directly used in the program.

5. Advantages and Disadvantages:
Advantages: Compared with tiled, it supports 2D and 3D games and has many game development interfaces and languages. You can set collision detection and other extended functions using the corresponding playback library.
Disadvantage: the quick toolbar is missing and the operation speed is slow.

Iii. tiled Getting Started Guide:

1. Prerequisites:
Tileset: the set of tile, which is a way for tiled to manage tile. Each tile has a name.
Tile method: tiled software manages tile differently. By default, tile is saved only in map. You can also export it as a. TSX file for multiple maps to share.

2. tiled introduction:

Software name: tiled
Version: 0.5.1
Running Environment: Java-supported OS
Dependent library file: None
Purpose: tiled map editor is a general purpose editor. The style is similar to the mini version of Photoshop. It can be used to create a variety of game engine needs, and supports the use of plug-ins to read and write map, added for the engine map format.

3. quick installation Navigation:
Download tiled and decompress it. You can find the tiled. jar file and run it using the Java-jar tiled. Jar command.

4. Quick Navigation:
(1) Use File-> New to enter the new map dialog box. You can select the map type and set map size and tile size, which is similar to mapwin.

(2) After creating a map, the system will assign a layer by default, but there is no tileset, so choose tilesets-> New tileset... to create a tileset. After entering the tileset name, select the "reference tileset image" option to browse the image used by tile image. "Tile spacing" is the border for setting the four sides of tile. Because it is not commonly used, it is often set to 0.

(3) After tileset is added, click the button in the lower left corner to view the tile palette. Then, you can select the appropriate tile in the palette and map it.

The toolbar on the left of tile provides shortcut tools: Move layer, paint, erase, fill, eye dropper (color filter), select, and zoom. On the right side is a layer manger similar to Photoshop, which is used to create a layer, copy a layer, lock a layer, and hide a layer.

There are two ways to use eye dropper: one is to select the eye dropper tool, and then select tile in map; another method is faster-right-click tile in map.

(4) After map is painted, press Ctrl + S to save the map as a tmx file.
(5) explanation of the content of the map file:


        <?xml version="1.0" ?>
        <map orientation="orthogonal" width="32" height="32" tilewidth="24" tileheight="24">
          <tileset firstgid="1" name="Sewers" tilewidth="24" tileheight="24">
            <image source="tiledweb/files/tiles_pipes.png"/>
          </tileset>
          <layer name="Layer 0">
            <data encoding="base64" compression="gzip">
              H4sIAAAAAAAAAO3NoREAMAgEsLedAfafE4+s6l0jolNJiif18tt/Fj8AAMC9ARtYg28AEAAA
            </data>
          </layer>
        </map>

This file indicates that this map only has one tileset and one layer. Note that not all input data is in this file when map and tileset are created, because the default attributes (such as tile spacing) are not saved in this file.
Since a tile can be referenced by multiple maps, the Data Attribute Value of the layer uses base64 encoding and gzip to compress a 32-bit integer array, which represents the global ID of the tile-firstgid. Each tile uses its own local ID, and firstgid serves as the identifier for distinguishing tile among multiple maps.

Note that this software does not provide the map array export function. You can only use View-> show coordinates to display coordinates.

5. Advantages and Disadvantages:
Advantages: easy to use. Using the XML specification as the writing specification for map files is conducive to user-defined modifications and function extensions.
Disadvantages: lack of interfaces with the game development language requires further development and expansion.

Iv. Reference resources:

Mappy Official Website: http://www.tilemap.co.uk/index.html
Tiled Official Website: http://tiled.rpgdx.net/index.html
Zlib Official Website: http://www.zlib.net/
Libpng Official Website: http://gnuwin32.sourceforge.net/packages/libpng.htm
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.