Archive for the ‘Map Editor’ Tag
Wow, I didn’t expect my first semester back at college to be that difficult! It turns out that every project I was doing was put on hold until I could finish my semester. My next semester schedule isn’t any lighter though, although I have cut my hours down from work as to give myself more time to work on my projects.
So here is where we stand, The map editor is very close to release 1.0, and 1.0 is a basic update. It will do what you need it to do, but it isn’t “polished” .. more “functional.” While on winter vacation I am working with my friend to push out a release, and once that is done we will start opening up the source and add whatever features we may need.
I’ve found that my goal for this project was ambitious, but in line to what we could accomplish. I wanted this editor to work primarily for XNA projects, but not only RPGs. Any game that used a tile engine could take advantage of this project. But what about other platforms? iPhone development? Well it would just take some tweaking to the exporter and you’d have a fully functional XML file.. could that work with iPhone development? Not sure.. but I think it would be fun to tinker with :)
As always, check out my right bar links, there are a lot of awesome projects (Including EvilNando’s Animation editor) that i’ve been keeping tabs on. Lot of great things goin on in the world of XNA, here’s hoping that I can get a final push out and start my actual project here soon.
As stated in a previous post, our goals for this project were simple yet ambitious at the same time. We wanted to create a system that could be useable for not only our immediate needs and the RPGs we wish to create, but also any future needs and the games we have yet to think about, and taking it a step further we wanted this project to be usable for any game creator wishing to create levels for THEIR RPGs.
Step one for my portion of the project is complete. I’ve been working on the XML Exporter class and the front end to that exporter. The goal for me was to get the XML to export all of the needed information in as customizable fassion as posible.. but at the end of the day when you hit “Export to XML,” you can take that file and plug it into your projects content pipeline and expect it to work. You won’t need to mess around with formatting, adding the asset type, change your TileMap class around because of the XML document… it will truly be a document suited for your needs.
We are really only on step one, building the basic framework and systems for the editor. Hell, the editor itself is nothing more than a blank windows form at this point hah. I have started working on the front end of the Exporter system over the next few days and hope to have something to show off then.
Keep in mind, this project is in its first stages, and has some pretty ambitious goals. Our overall goal for this though, is to ensure that people who use our editor will be able to plug the XML into their project and just “have it work” :) Also when the editor gets into a more complete state, we will open up the repository so everyone can take what they like and add it to their own projects or continue to enhance ours for their own use.
With the Dream Build Play project “Complete,” I’ve turned my attention to a few items that will aid in the creation of not only Meir, but any future RPG I write. Content creation is a tricky subject, as the goal is to create something flexable enough to re-use in any RPG project, but dynamic enough and easy enough to use so if I had a few people working on any given project, they would know what to do.
Well me and a buddy from the shacknews chatty decided that he didn’t want to use TileStudio anymore, but wanted something more suited for his game.. so we started colaborating on an editor that would be built specifically for XNA games, but flexable enough to use in any project. Obviously this editor will have to support several major features of basic RPGs, but how in depth are we going to really go with this thing?
Create and edit tile maps? Basic feature, has to be included.
Exporting XML in the same style of the XNA Content Pipeline? Basic feature, has to be included.
but what about features like adding a “tile” to the texture, and having the map build the texture and exporting that to a PNG file? What about creating a system that can export to multi dimensional or single dimensional arrays based on the project needs? How about a dynamic XML system that lets the user edit how their XML should look, then hitting “Export XML” and having their XML formatted correctly? There are many many more ambitious goals we wish to include, and we’re thinking a bit larger scale then just these… but its pretty interesting to see what we could come up with. As always, I’ll keep everyone up to date on whats actually going on.
So if you had to pick and choose a few “Must Have” features of a game editor, what would you want included?
Over the past few days, I’ve been re-working my Tile Engine and Map Editor, and before I post on it I would like to say that it has been quite a bit bigger than I had anticipated. For that reason, this post will be broken up into several posts to show the basic features of the various components of the Tile Engine / Map Editor, but without having one big 30 page post on the whole sha-bang.
So on that note, we’ll start with the Map.cs file. This file will hold all of the map information, which is actually quite a bit of data. Some of the data fields include:
string Name – Map Name
int Height – Map Height
int Width – Map Width
int TileHeight – Height of each tile on map
int TileWidth – Width of each tile on map
string Tileset – Tileset used to draw the map
Point PlayerRespawnTile – Players respawn Location
List Tiles – List of textures used for map tiles
List NPCs – List of all NPCs on the current map
List Items – List of all world-items on current map (IE: Treasures)
List Portals – List of all portals leading to OTHER maps
string MusicCue – Music data to be used on map
int[,] BaseLayer – Base Layer Layout (Things you walk on top of, grass etc)
int[,] FringeLayer – Foreground Layers layout (Things you can walk behind)
int[,] ObjectLayer – Object Layers Layout (pots, barrels, plants, etc)
int[,] CollisionLayer – Collision Layer (Tiles you can not walk on)
This is most of the information needed to make a map work with this tile engine. The next step in getting the Map.cs file in order, was a way to Save, Load, and Initialize a map. Obviously for a complex role playing game, you’ll want to have several maps. Maybe a few towns, dungeons, an overworld map, city at sea, a sky level… The choices are limitless, but for every region you have in your game, you’ll have a map to hold the information. All of these maps will hold the same structure which makes it easy for the game to load and display
I really did not want to write my own content importer / content reader in the XNA engine, so I’ve stuck with the System.XML namespace. Because of this, each map will be stored in its own XML file and fed through the XNA content pipeline, but with the map.xml property set to “Do Not Compile.”
Below is a screenshot of a test map I did while testing the map engine showing off some of the map editor.
Red P = Player Respawn
Blue P = Portal to a different map
I = Item
M = NPC / Monster
The map name is called “Map001” and you can see the XML file HERE
Not too many problems came up while working with the Map.cs file, more-so when trying to get the editor up and running.. but I’ll save that writeup for another time. Could this map file be smaller? Probably. As it stands now, it is just under 1300 lines of code. There are also several other systems needed to display the map to screen, but for anyone interested in writing their own map engine in XNA, I figured the best place to start was the map itself.
Next time I’ll go more in depth on the Tile Engine, and some of the Map Editor.