Game Development with MonoGame by Louis Salin & Rami Morrar

Game Development with MonoGame by Louis Salin & Rami Morrar

Author:Louis Salin & Rami Morrar
Language: eng
Format: epub
ISBN: 9781484277713
Publisher: Apress


Drag the control onto the form, as shown in Figure 4-4, and run your project. You should see a blue screen within your Windows application, as shown in Figure 4-5.

Figure 4-4Your Windows application with the MonoGame control, as seen from Visual Studio

Figure 4-5Your blank MonoGame control in a running application

You are now ready to start building your level editor!

Asset Management

In order to build your levels, you need to access your assets, which are built by the Content Pipeline Tool in the Game project. You could add a brand-new Content Pipeline Tool for the Game Editor, but that would entail duplicating your content pipeline and the required extensions needed to compile assets, and to make modifications twice in both the Game and the GameEditor whenever an asset is modified.

Instead, you will import the compiled .xnb asset files into the GameEditor in a directory structure that mimics the one found in the Game project. Thus, you will have fonts, levels, and sprites organized similarly to your current game assets.

Every time an asset is modified, it needs to be imported into the GameEditor project. This is not too hard to achieve by using Visual Studio’s pre-build events.

The levels you create will be saved as .xml files . As shown in Figure 4-6, once saved, those level .xml files will need to be copied into your game assets and compiled there. But because you will use a content manager to load those levels, the GameEditor will need to have access to the compiled .xnb files to read the level data, which means you will need to copy the compiled level files back to the GameEditor content files and rebuild the project before being able to load each level.

Figure 4-6Lifecycle of editing a level asset



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.