We Have Met The Enemy and He Is Trees

   So the editor can import multiple layers, delete multiple layers, save and open multiple layers, and trees work well in all cases. But I fear that the functionality of my editor can only stretch so far. Sure, right now I could import all the textures separately and give each a button. But I need something where the user clearly sees the texture in its original size, and can select all or some portions of it. Basically, I need to completely overhaul the system to resemble that of RMXP, only with infinite layers.

   This is not going to be simple. With my current code, I can make infinite layers and add preset image tiles based on their index and save them in a map int[,] matrix. But to run the code off of a main tileset that lets the user select while tile(s) he wants to place, I would need to create a more complex system. The tileset could be divided by individual tile size (32×32) and each tile’s coordinate contained in a Vector2[,] matrix. But that requires too much uneeded info. I’ll probably split the tiles up by size, and then go through row by row counting the number of tiles. Each tile will have a number that corresponds to it, and when the user places it on the map, that number will be saved. A separate function within the TileLayer class will run if it recognizes the layer index is above 1 (my first 2 layers use dynamic tilesets), and change a Rectangle object’s coordinates based on the number of the tile. These Rectangle coordinates will then be transferred to the spriteBatch.Draw event, representing the section of the tileset to draw.

   I know this all sounds very complicated, but that’s because I’m using this blog as a place to remember key ideas that I’ll forget about later. It’s more of a development “journal,” or in other words, Fatso’s “Notes to Himself” blog.


~ by IG on June 14, 2008.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: