Well, a mixture of being in hospital and moving to a new apartment has left me with little time to work on this, especially with some of my other projects requiring a lot of attention, but here we go.
Here's the changelog since the last post.
v2.1.6:
• Replaced constant tile caching with a flag which triggers a cache just before the next render.
• CacheSurroundingTerrain now adds tiles to the precalc stack, improving performance.
• Fixed bug where tiles were getting added to the precalc stack multiple times.
• Altogether new caching system improved performance by 1,000%. :D
v2.1.5:
• Fill tool now supports terrain & tiles.
• Selecting the fill tool whilst placing terrain will switch to the terrain fill tool. Whilst placing normal tiles it'll switch to the normal tile fill tool.
• Selecting a terrain tile whilst using the fill tool will automatically switch to the terrain fill tool.
• Selecting a tileset tile whilst using the fill tool will automatically switch to the normal fill tool.
• Terrain fill tool now works.
v2.1.4:
• When opening a project you now select the Project.xml file rather than the folder.
• Deleting tilesets will now clear all related tiles from all maps.
• Deleting terrain will now clear all related tiles from all maps.
• Added a project closing dialogue which lists all files with unsaved changes rather than showing a dialogue for each individual one.
v2.1.3:
• Map eraser & terrain highlight no longer renders when outside map area.
• Added right-click context menu to tabs.
• Added Save, Close & Open Containing Folder menu items to the tab context menu.
• Can now close a single file through the File menu.
• File -> Save now shows what will be saved.
• Added Save All menu item.
v2.1.2:
• Terrain icon generation is now threaded to improve project loading.
• Terrain icons no longer crash the program if you close the project whilst icons are being generated.
• Terrain icons are now cached in the /terrain/ folder to improving loading speeds.
• Terrain icons are now forcibly re-generated when the terrain is modified in any way.
• Tileset dockpanel is now properly disabled when the project is closed.
v2.1.1:
• Moved terrain icon creation to a background worker to decrease project load time.
• Changed how tileset list is generated in the terrain dialog. It now doesn't derp out if you add a new tileset, and all the textures match the items properly.
• Terrain dialog no longer crashes if you don't have any tilesets.
v2.1.0:
• Reversed the list of layers to more naturally show how the map is built.
v2.0.19:
• Can now seamlessly undo & redo map size changes.
• Can now select an anchor point when re-sizing the map to declare which direction the map should resize in.
• Moved tile array resizing to the ResizeMap() method.
• Can now undo a command which resized both width & height.
Most of the time which has been spent on the engine has been spent fixing up user experience issues and performance.
I've been sending out early copies of the engine to various developers who used to use my previous game engines. The response has been overwhelmingly positive, and I've taken a lot of the feedback to heart.
User ExperienceOne of the big ones was how each individual map would ask you if you wanted to save your unsaved changes. Whilst perfectly fine when closing individual tabs, if you wanted to close the entire project at once it was fairly tedious. I decided to steal Visual Studio's answer to this by creating a custom dialogue which lists all unsaved objects and allows you to make a batch decision on things.
I also tweaked a few of the other interface panels, such as reversing the list order of the Layers panel to make it match the visualisation of map layering.
PerformanceWhilst I have plenty of experience writing these kinds of systems in other languages, I pretty much taught myself C# as I went along with this one. Creating everything to be event-driven and modular was interesting, but challenging.
The undo/redo stack has certainly caused me a lot of headaches in terms of object retention and 2D arrays, but I think I've finally got a firm grip on them. However, I had plenty of systems which I wrote when I was still learning which ran at a crawl.
One of these was the terrain caching system. I ended up having a little brainwave and replaced the on-demand caching to instead add to a pre-calculation stack, checking to make sure no duplicates make it through. When a map is rendered in the IDE, the pre-calculation stack is processed in a single batch, making sure no tile is ever out-of-date.
Surprisingly this actually improved performance by close to 1,000%. Although not noticeable most of the time, large fill calculations and undo/redo operations were cut down, in some cases, from 2,000ms to just 200ms. It makes for a much smoother experience.
I also started screwing around with background workers and threads. Having come straight from VB6 which had... questionable support for these kinds of things, I was quite impressed by how much I could actually do.
One of the most time-consuming operations when loading up the toolset was the generation of the terrain icons from the various tilesets. I ended up not only caching these icons within the project folder, but I also moved the actual bitmap rendering to a separate thread. It results in a 'cascade' effect as each icon loads one after the other, but it's much nicer than having to wait 2 seconds which the entire panel loads.
GamesWhat's a game engine without the games? Right now there are three flagship projects I'm involved in which will act as guinea pigs for this new development suite.
Crystalshire -
http://www.crystalshire.comThis project has been my little pet project for close to 8 years now. It's basically a playground for me to test my ideas and whims. It has been the flagship product of my engines for as long as it has been around, with most features which see widespread popularity now-a-days originating from this project.
Nin Online -
http://www.ninonline.orgAn online multiplayer Ninja RPG. Built around roleplaying and PvP, we've had a very successful limited alpha release over the last few weeks.
Elandor Chronicles -
http://www.elandorchronicles.comA retro online RPG which aims to bring a mix of Dragon Quest, Zelda LTTP and Pokémon. It has a strong emphasis on group gameplay and retro mechanics.