Mapdev:Tutorial Simple: Difference between revisions
m added start locations section. |
|||
| Line 143: | Line 143: | ||
= Finalizing = | = Finalizing = | ||
continue to [[Mapdev: | continue to [[Mapdev:Tutorial_Finalizing|this]] page to compile and archive your map for play | ||
= I want more = | = I want more = | ||
[[Mapdev:Tutorial_intermediate|continue]] to stage two | [[Mapdev:Tutorial_intermediate|continue]] to stage two | ||
Revision as of 03:18, 17 December 2012
Beginners Tutorial Stage 1
This beginners tutorial is aimed at getting you from nothing, to something simple, from which you can then extend by looking through the more detailed technical documentation.
What you will need
- An image editor, such as GIMP or Adobe Photoshop, etc
- 7zip
- MapConvNG
- a copy of the map blueprint
There are a multitude of other tools you can use to make maps, however for the purposes of this beginners tutorial, these are the only ones you will need. Check the tools section for more information.
Download example
Here is a link to the map we have shown in these instructions.
Preparation
- Extract the mapcontainer.sdd folder from the blueprint archive into your working directory. Your directory structure should look like this:
- Rename the mapcontainer.sdd folder to the name of your map, eg. mymap.sdd
- Edit the following variables in the mapinfo.lua file, ignore the rest for now.
- name
- shortname
- description
- author
- version (just put like v1 or something in here)
working directory
|-mapcontainer.sdd/
|-LuaGaia/
|-mapconfig/
|-maphelper/
|-maps/
|-mapinfo.lua
|-mapoptions.lua
Create Height map
For this tutorial we will be creating a 4x4 size map, which is relatively small.
- Check the height page to get our image dimensions. In our case a 4x4 map yields a image resolution of 257x257 pixels
- Create a 257x257 greyscale image in your image editor
- Draw the terrain
- Save the image to your working directory, call it heightmap.png
| Tip | |
|---|---|
| Black represents the lowest elevation on the map, white represents the highest, in between lies all the shades of grey. Hard edges in the image will be cliffs, and smooth gradients will be ramps |
| (picture of greyscale height map) | (picture of resulting game terrain ) |
| Example Height Map | Ingame Result |
|---|
Edit mapinfo.lua
- Open the mapinfo.lua file in a text editor
- Change the
minHeightandmaxHeightvariables to10and512respectively.- The resulting portion of code should appear like this:
local mapinfo = { ... smf = { minHeight = 10, maxHeight = 512, ... }, ... }
Create Metal Map
- Check the metal page to get our image dimensions. In our case a 4x4 map yields an image resolution of 257x257 pixels
- Create a 257x257 greyscale image
- Paint full white spots a couple of pixels wide on the places where metal will appear in game.
- Save the image to your working directory, call it metalmap.png
| (picture of metal map) | (picture of resulting game terrain ) |
| Example Metal Map | Ingame Result |
|---|
Create Texture Map
- Check the diffuse page to get our image dimensions. In our case a 4x4 map yields an image resolution of 2048x2048 pixels
- Create a 2048x2048 RGB image
- Paint your ground colour in such a way that it compliments the height of the terrain, and metal spots.
- Save the image to your working directory, call it diffuse.png
| Tip | |
|---|---|
| It may be useful to use the heightmap.png and metalmap.png images as a starting points, scaling them up to size, and then painting over the top. |
| (picture of diffuse map) | (picture of resulting game terrain ) |
| Example Diffuse Map | Ingame Result |
|---|
Create Mini Map
- Load up your diffuse.png image.
- Scale the image to exactly 1024x1024 pixels
- Save the image to your working directory, call it minimap.png
| (picture of minimap map) | (lobby screenshot/ingame screenshot ) |
| Example Mini Map | Ingame Result |
|---|
Define Start Positions
considering the small size of the map we will only define two teams
- Open the mapinfo.lua file in a text editor
- Locate the teams subtable and delete the lines for teams 2 and 3
- Edit the
xandzcoordinate for each team to define their start location
- #FIXME must have a discussion on how to find the coordinates, based on the pixel coordinates of the diffuse map. show a picture describing the x and z coordinate.
Review
From the tutorial we have learned how to make the:
- height
- colour
- metal/resource
- minimap
- start locations
Your directory structure should look similar to this:
working directory |-mymapname.sdd/ | |-LuaGaia/ | |-mapconfig/ | |-maphelper/ | |-maps/ | |-mapinfo.lua | |-mapoptions.lua |-heightmap.png |-metalmap.png |-diffuse.png |-minimap.png
now we need to get the map loaded into the game
Finalizing
continue to this page to compile and archive your map for play
I want more
continue to stage two