sitebender
Member
Hello everyone,
With a lull in my schedule for the moment, I've started to make a grander editor. I have made quite a lot of in game level editors in the past, but this isn't about them. Instead this is a new level editor that will most likely be used by a lot of people in the future.
THE PREVIOUS EDITOR:
There were a lot of features here, but it was just a small scale. A single room, three layers for background, foreground, and solid objects. No tile painter since the game could auto tile generated tiles on the fly like most of my games.
THE ROOM EDITOR:
The first step, was doing something I've never done before, and that's a room editor for a grander scope. Maps with several rooms. My previous editors had shortcomings where they could only update the room you were in. Now you can edit an entire map's worth of rooms. Each color represents a different room and it's a bit messy since the more rooms you have, the more the colors blend together.
Everything is bound to screens like older games. The use is simple, click a room and drag to add to the room. Click a not room to make a new room. Right click a screen tile to remove the room.
THE SOLIDS EDITOR:
After the room editor comes the solids editor which I have done for a lot of other level editors. In this case, there is a key to let you toggle between the two editing functions. Everything I've ever done with map editors has been relegated to color. Whites are standard ground, oranges are enemies, yellow is the player spawn, greens are ladders, aquas are drop through platforms and so on. It's just the simplest way to offer a visual representation.
In this phase, I also made a selection tool. Click + drag to select areas, which can then be removed with the delete key. Holding the selection and hitting control would fill the entire selection with the color selected. Dragging via the right mouse button through selected area will deselect the area to cut a hole. Right mouse button alone will select the color you're hovered over like an eye dropper. This was just a quick way to get things up and running.
THE TILE PAINTER:
Unfortunately I can't show off the tilesets I'll be using due to an agreement, so instead I'll show you an old tile painter I had come up with. In this instance you can see the ability to select multiple tiles and stamp them into the world.
With the new tile painter, you can do the same thing, but there are more details to see what you're doing. I also allowed for coordinates of the tile to be saved rather than the tile index. This is to allow for ever changing, growing tilesets to be used and not become useless because someone updated their tileset to be too wide.
LOADING EXISTING MAPS:
I have made a lot of maps over the years using relatively the same color codes. There are a lot just lying around, so here's a larger, more impressive map. There are two ways I can pull this map in and that's either by .pngs or .txt files with the data from the .pngs.
At this time I created several more layers, as I've always used layers for rooms, liquids, foreground, background, and three miscellaneous layers that hold most of the same data (solids, extras, guides). Unfortunately the .txt files that hold the data didn't account for three separate layers, they just dumped everything into the same layer.
With so many layers, it was time to see the visuals better. Active layers had 100% alpha and other layers had 10% alpha as you'll see below.
THE PICKER PANEL:
The picker panel was created back with the tile painter, but here I retooled it for the colors of every object in the game... all 200 objects. This was easy enough to do since when I add a new object to any game, I give it a color, but now I gave it a name, and a placeholder for the description.
I also optimized the drawing process more because originally each change had to redraw the surface layer, so now it just draws / removes what you just did from surface layer. This turns a stutter effect into a smooth process.
THE PICKER PANEL (phase 2):
The picker pannel can be clicked + dragged to move it around. It modifies itself to fit the screen. It can be clicked to open and close it. There is now a description and name to so what's being selected.
I took the time to optimize the picker panel to only trigger every 3 frames so what dropped the frame rate to 300 is running back at 1,000+ frames per second. The picker panel performs perfectly at present.
More functionality was added such as the middle mouse button to pan the screen, hovering the mouse at the edge of the window will pan the screen. WSAD + arrow keys already did the same.
CLOSING THE FIRST POST:
As you can see it's still a work in progress and I have a lot more to craft. Another part of this grander editor was to keep it simple, so it's only a single object which can be drag and dropped into other projects. In the past, there were tangled webs of objects for the panels and other things.
Hopefully someone enjoyed reading this.
With a lull in my schedule for the moment, I've started to make a grander editor. I have made quite a lot of in game level editors in the past, but this isn't about them. Instead this is a new level editor that will most likely be used by a lot of people in the future.
THE PREVIOUS EDITOR:
There were a lot of features here, but it was just a small scale. A single room, three layers for background, foreground, and solid objects. No tile painter since the game could auto tile generated tiles on the fly like most of my games.
THE ROOM EDITOR:
The first step, was doing something I've never done before, and that's a room editor for a grander scope. Maps with several rooms. My previous editors had shortcomings where they could only update the room you were in. Now you can edit an entire map's worth of rooms. Each color represents a different room and it's a bit messy since the more rooms you have, the more the colors blend together.
Everything is bound to screens like older games. The use is simple, click a room and drag to add to the room. Click a not room to make a new room. Right click a screen tile to remove the room.
THE SOLIDS EDITOR:
After the room editor comes the solids editor which I have done for a lot of other level editors. In this case, there is a key to let you toggle between the two editing functions. Everything I've ever done with map editors has been relegated to color. Whites are standard ground, oranges are enemies, yellow is the player spawn, greens are ladders, aquas are drop through platforms and so on. It's just the simplest way to offer a visual representation.
In this phase, I also made a selection tool. Click + drag to select areas, which can then be removed with the delete key. Holding the selection and hitting control would fill the entire selection with the color selected. Dragging via the right mouse button through selected area will deselect the area to cut a hole. Right mouse button alone will select the color you're hovered over like an eye dropper. This was just a quick way to get things up and running.
THE TILE PAINTER:
Unfortunately I can't show off the tilesets I'll be using due to an agreement, so instead I'll show you an old tile painter I had come up with. In this instance you can see the ability to select multiple tiles and stamp them into the world.
With the new tile painter, you can do the same thing, but there are more details to see what you're doing. I also allowed for coordinates of the tile to be saved rather than the tile index. This is to allow for ever changing, growing tilesets to be used and not become useless because someone updated their tileset to be too wide.
LOADING EXISTING MAPS:
I have made a lot of maps over the years using relatively the same color codes. There are a lot just lying around, so here's a larger, more impressive map. There are two ways I can pull this map in and that's either by .pngs or .txt files with the data from the .pngs.
At this time I created several more layers, as I've always used layers for rooms, liquids, foreground, background, and three miscellaneous layers that hold most of the same data (solids, extras, guides). Unfortunately the .txt files that hold the data didn't account for three separate layers, they just dumped everything into the same layer.
With so many layers, it was time to see the visuals better. Active layers had 100% alpha and other layers had 10% alpha as you'll see below.
THE PICKER PANEL:
The picker panel was created back with the tile painter, but here I retooled it for the colors of every object in the game... all 200 objects. This was easy enough to do since when I add a new object to any game, I give it a color, but now I gave it a name, and a placeholder for the description.
I also optimized the drawing process more because originally each change had to redraw the surface layer, so now it just draws / removes what you just did from surface layer. This turns a stutter effect into a smooth process.
THE PICKER PANEL (phase 2):
The picker pannel can be clicked + dragged to move it around. It modifies itself to fit the screen. It can be clicked to open and close it. There is now a description and name to so what's being selected.
I took the time to optimize the picker panel to only trigger every 3 frames so what dropped the frame rate to 300 is running back at 1,000+ frames per second. The picker panel performs perfectly at present.
More functionality was added such as the middle mouse button to pan the screen, hovering the mouse at the edge of the window will pan the screen. WSAD + arrow keys already did the same.
CLOSING THE FIRST POST:
As you can see it's still a work in progress and I have a lot more to craft. Another part of this grander editor was to keep it simple, so it's only a single object which can be drag and dropped into other projects. In the past, there were tangled webs of objects for the panels and other things.
Hopefully someone enjoyed reading this.
Last edited: