Level Editor Part 2

I have progressed quite a bit now on the level editor.

Compared to an earlier post, the level editor now has spikes and enemies as a new addition. Previously, making an exit did not actually make an exit, but now it does. Also, I added a seventh button (the one with a red ‘X’ in the first screenshot). That’s the oblivion calibrator. Or rather, it’s just a delete button! There are several ways to code a function to delete items on the level, but I thought that the easiest way was to just create a yellow sprite that locks onto the gridspace as above (see second screenshot). When the player clicks, it deletes ANYTHING on that grid.
Also, I have improved the level editor such that you cannot place TWO objects on the same tile. Previously, you could spawn a player inside a platform. That’s weird! Spikes are also smart – I disabled the ability to place them anywhere. There must be a platform above or below, and the spikes will automatically change their orientation and will point away from where the platform is!
Now I am working on how to check that a platform does not have any spikes attached to it when I delete them because now, you can place spikes on a platform, and then delete the platform, and the spikes remain there, floating in space. I want to make any spikes connected to a platform disappear.
I also face severe memory leak from my oblivion calibrator (the delete button). Whenever there are spikes on the map, using it will cause some severe memory leak. By continuously using my oblivion calibrator, my memory consumed spiked up to 1051.95MB as in the above screenshot. This is NOT good at all. The game begins to lag when using the delete. I do NOT like this at all. Good thing is, I have found the cause of the problem, and am trying to rectify it.
Other small things I did today:
– All actions cause a text of instructions / descriptions to appear on the level editor
– Text disappears after 3 seconds
– I can no longer create multiple player characters. Only one instance of main player character is allowed on the map.
– Help popup fixed (previously, the spikes and characters covered it) 

Issues I need to fix:
– Delete spikes connected to platform
– Rectify lag
– Find a more efficient way to load platforms in the level editor
– Find a way to export the map so that I can play the levels created in the editor
– Think of how I’m going to save the level data and how I’m going to store them in specific save slots (I plan to make 5 to 10 slots for customized levels, accessible by a hidden room above the level selection screen. I’m also afraid that the level selection screen will become too packed, so I read and learnt to make a side scrolling camera for the level selection screen just to prepare should I ever have the need to do it)
I am considering to use my own level editor to actually generate levels. However, I will need to implement doors and keys for this. Also, it’s quite late to actually use my level editor now -_- because at this stage, most of my levels are far too complex for the current level editor to accomplish. I will need to make HUGE improvements to the editor before I can use it to generate my future levels, which frankly speaking…are rather painful to do. I spend a lot of time creating levels. It’s not as easy as I thought =(

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 )

Facebook photo

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

Connecting to %s