Texture-based Mapping
From NetGore Wiki
| Difficulty | |
|---|---|
| Topics | Top-down |
| Prerequisites | Setup_guide |
| (view all tutorials) | |
|
This article needs to be cleaned up! |
This is intended as a guide for beginners using the NetGore Editor to create a map for the first time and assumes that the reader has already installed and setup NetGore according to the Setup_guide.
Contents |
Texture Preparation
The textures should be 8 bit PNG images sized 32x32, 64x64, 128x128, 256x256, or 512x512 with alpha transparency preserved. You can load other sizes, but may encounter errors or other problems. It's easier to use the sizes mentioned above. Put the files into the NetGore/DevContent/Grh/Map/MyMap directory, where MyMap is a name you've chosen for the new directory.
Using the Editor
Launch the NetGore Editor by running DemoGame.Editor.exe found in the Netgore/DemoGame.Client/Bin directory.
Grh Automatic Update
Select File->Map->New to create a new map. Select Screens->GrhDatas to bring up the GrhDatas tree. Right click and select "Automatic update". You should see something like this:
Grh Cursor Selection
To begin plotting textures on the map, select the Map Grh Cursor and hold down the control key as you click the location of your intended plot. If you want your texture to "snap" to the grid, make sure to select "TileMode" from the dropdown menu under the Map Grh Cursor icon found on the NetGore Editor toolbar. You should also be able to see your image move with the mouse cursor as you hold down control. It's important to make sure the Grh Cursor icon is properly selected, otherwise you will not be able to plot your textures. If everything is selected properly your editor screen should look something like this:
Saving the Map
To save your map, select the Save currently selected map icon on the far left hand side of the toolbar. The editor will ask you if you are sure, select yes and you will be prompted for the map id. The screen should look like this:
Change the map id according to which map id you wish to use and click OK. You should receive a message indicating that the map has been saved properly.
Notes
This article applies to version 0.3.5 and may change according to updates. If you find any errors, please fix them.