Posts Tagged ‘editor’

Progress of Hypno-Joe and editor

Monday, September 14th, 2009

I’ve been working on the editor for some time now.  And in fact have got moving platforms, and tile collisions, and basic platform physics working in the actual game part of the program.  But right now I’m going to talk about the editor.  It’s got map saving and loading (currently only one map can be saved or loaded).  It’s got tile placement (if you look in the first screenshot below you will see a little green square and a purple one, these are tiles for the moment).  You can scroll around the grid too.  You can also erase tiles by right clicking anywhere.

UhfEditSS05

Notice the “scroll down” button… It doesn’t do much right now other than highlight if hovering over it or shaded if you press the left mouse button.  In any case I’m trying to figure out how to organize my tiles, and indeed about tile creation.  I figure that you will be able to create tile chunks, which are composed of those 16×16 tiles, this way you can get kind of detailed and as long as the tiles are multiples of 16 then you can stack them up on top of each other.  Let’s say a window is 64×32 pixels… that’s 4 tiles across 2 tiles down.  Let’s say you want a flower in a pot on top of the window ledge.  And the ledge itself is 64×16.  which is 4 tiles across 1 down.  and let’s say your flower pot with flower is 2 tiles high and 1 across (16×32).  You want the flower pot to sit right on top of the ledge so you place it in the position starting with the bottom of the window but on top of the window ledge.  Because these are all multiples of 16 the flower pot sits neatly on the ledge in front of the window.  That was the purpose to these tiny tiles instead of big ones.  You create a big one (ie the window) from individual tiles in an image (corners, frame, glass).  So now I’m trying to think of how to organize the tile panel there on the sidebar.  Do I just keep adding them making sure they’re spaced out the size of 1 tile.  Do I create a specific size for the tile panel so it scrolls off screen as well.  Do I create separate pages for each size of tile chunk.  I have a lot to decide.  To help me figure it out I created a little mock up.  It’s not much different than the screen above except it has what would look like other sized tiles.

mockUhfEditSS06

Well there you have it.  Any idea folks?

Keith

Next look at UhfEdit

Thursday, June 18th, 2009

Well here’s a new update.  Now I’ve got the ability to manipulate the map size, the cell size, and to turn the grid and info on and off.  I had a bear of a time attempting to get the keyboard input stuff working exactly how I wanted and now it works great!  The other issue is once I worked the resize issues out, there was a graphical glitch that caused the selector square to remain where it was even though it was off the map.  Since I’m not really planning on using the keyboard to select actual tiles (at least at the moment) I decided (on advice of others, thanks #xna!) to just simply hide the selector (dark red box on the grid) when it was off the grid.  You can see what I mean here:

UhfEditSS02 That’s sort of unwanted.  However you can see I fixed it here:

UhfEditSS03And here it is with it gone:

UhfEditSS04Okay now for the main event, a video of the map editor in action.  Notice it still doesn’t do anything yet because the next thing I will work on is a tile selector panel and then the ability to place tiles on the map.  Note a tile is just an abstract concept for still image or animation that is placed on a map.  A tile can be any size and shape and be put anywhere on the board, just as long as you got the grid off.  With the grid on it will line up with the upper right corner.

Please forgive the quality of the video.  I captured with CamStudio, and then converted it from 1280×720 down to 640×480 (with black bars to keep the aspect ratio at 640×360 ie 16:9)  Anyways it should give you an idea of where I’m going.

Keith

First peeks at Uhf-Edit

Tuesday, June 2nd, 2009

Okay so I decided to just start making the editor, instead of planning out every little detail.  Here are some screenshots and a few notes.

This first one is a translucent block over the background.  This was ultimately scrapped.

UhfEdit0001 The next two are how the editor looked when I had camera problems.  Turns out I wasn’t turning it back into local space.  I turned from local coordinates to world coordinates, and then i need to go back to local.  Essentially the tile (individual grid cell) wasn’t lining up to the map which was world space.

MapEdWrongMapEdWrong2 These last two are how they were supposed to look, which was good if you didn’t move the mouse outside the map.

MapEdRight MapEdRight2 Finally the corrected version.

UhfEditSS01

I just decided I wanted gray on black instead of white on gray.  And fooled around with the grid size.  See this is going to be a bit different than traditional map editors.  I wanted the kind of flexibility a tile map gives you but I wanted the ability to place images of any size anywhere.  So basically whatever the tile grid is set to, the “tile” which is any arbitrarily sized graphic object (will include animations and stuff later), the tile will be placed in the upper left corner depending on what grid cell you’re in.  You’ll also be able to change the tile and map sizes in realtime.  What this means is if you have a big 64×64 texture but you want to put a 32×32 texture directly on top of it in the center, you simply change the grid size from 64 to 32, and you can automatically place tiles in increments of 32.  If you set the grid cell size to anything lower than the minimum (probably 8×8) there won’t be any grid and you can place tiles anywhere on the map up unto the boundaries of the map.  Even if it hangs off.  However the map will be clipped at it’s edges, so if you hang something off the edge you might only see part of it.  This is just a start.  Right now I’m figuring out what keys and controls to use to manipulate the tile and map sizes.

Keith