SFML community forums

General => SFML projects => Topic started by: Robin on July 01, 2013, 06:08:53 pm

Title: Crystal Toolset - 2D MMORPG Development Suite
Post by: Robin on July 01, 2013, 06:08:53 pm
Decided to teach myself C#, .NET, MDI and SFML (After first wrestling with XNA's MSBuild.exe resource... thing *shudder*).

Somewhere along the way I went a bit crazy and actually wrote a fairly large chunk of a game development application.

(Large image, click thumbnail or link: http://i.imgur.com/MbWOsxF.png (http://i.imgur.com/MbWOsxF.png))

(http://i.imgur.com/vMhovZa.png) (http://i.imgur.com/MbWOsxF.png)

So far I've managed to work around just about every problem I've come across with getting SFML to play nice with such an interface style. (Control handles being lost was the bane of my existence for a good few days.)

No doubt I'll be coming along with my tail between my legs asking how to fix/optimise things as the core application hits the gym and starts to bulk up.

Thought it might be polite to come along and show what I've accomplished so far before asking people to do my job for me.

Everything you see enabled in that screenshot is fully working in the application itself. There are still a few dozen inconsistencies in the way processes are carried out, but user experience is one of my few strengths, so those will be ironed out as I near completion of this portion of the application.

In terms of SFML related features, things are pretty slim. I have a resource manager... of sorts. Map renderer, tileset renderer, some fancy caching and image exporting stuff. The usual.

As time goes on I'll probably have to be a bit more concious about performance, but everything works at the very least.

Haven't fully decided on whether this will actually be released or not. It was actually supposed to be a simple in-house editor for my personal projects.

I'm sure the draw of free testing will cause me to release it eventually.

Thanks to everyone who contributed to the library and wrote all those wiki articles. Really made things easy to get started with.
Title: Re: The horrific love child of Visual Studio, Photoshop and Unity
Post by: cpolymeris on July 01, 2013, 07:18:28 pm
Whoa. That's cool. Nice UI.
How flexible is the code? Can, for instance, new providers be defined to import/export in your game's file format?

So far I've managed to work around just about every problem I've come across with getting SFML to play nice with such an interface style. (Control handles being lost was the bane of my existence for a good few days.)
I know your troubles. Been trying to use SFML/C#/Gtk#, myself.
Title: Re: The horrific love child of Visual Studio, Photoshop and Unity
Post by: Robin on July 03, 2013, 12:50:06 pm
Whoa. That's cool. Nice UI.
How flexible is the code? Can, for instance, new providers be defined to import/export in your game's file format?

So far I've managed to work around just about every problem I've come across with getting SFML to play nice with such an interface style. (Control handles being lost was the bane of my existence for a good few days.)
I know your troubles. Been trying to use SFML/C#/Gtk#, myself.

Not something I've really looked in to. My experience with C# is concentrated in UI and DB. Right now I'm just trying to get a working map editor. From there the code will be refactored to meet some higher programming standards.

It's hard enough for me to get some of the more intricate systems working at all, so overcomplicating things might be a bit much for me.
Title: Re: The horrific love child of Visual Studio, Photoshop and Unity
Post by: Jungletoe on July 08, 2013, 03:21:39 pm
...Robin?

I swear, you pop up in the most random places.
Title: Re: The horrific love child of Visual Studio, Photoshop and Unity
Post by: Robin on July 09, 2013, 01:03:10 pm
...Robin?

I swear, you pop up in the most random places.

I'd hardly call a graphics library forum a random place considering our hobbies. ;]

I saw your game man, looking good.
Title: Re: The horrific love child of Visual Studio, Photoshop and Unity
Post by: Jungletoe on July 09, 2013, 08:16:33 pm
...Robin?

I swear, you pop up in the most random places.

I'd hardly call a graphics library forum a random place considering our hobbies. ;]

I saw your game man, looking good.

True, true.

And thanks :3
Title: Re: The horrific love child of Visual Studio, Photoshop and Unity
Post by: Mario on July 12, 2013, 10:02:30 am
Lol, to be honest, I clicked this thread just for the caption alone.

So is this supposed to become some editor of sorts or a complete engine? Also where's Unity involved? ;)

Anyway, looks really nice and reminds me a lot of the RPG Maker series.
Title: Re: The horrific love child of Visual Studio, Photoshop and Unity
Post by: Robin on July 12, 2013, 02:40:36 pm
Lol, to be honest, I clicked this thread just for the caption alone.

So is this supposed to become some editor of sorts or a complete engine? Also where's Unity involved? ;)

Anyway, looks really nice and reminds me a lot of the RPG Maker series.

Current plans are for a fully integrated development environment specifically for 2D Multiplayer RPGs.

The caption comes from the Visual Studio style project management and UI, the Photoshop style design area and, although not currently implemented, the Unity style game development aspects. Those will come more in to play once I refactor and clean up the existing stuff.

It certainly takes a lot of inspiration from the RPG Maker series. This is actually a spiritual successor to a line of open-source game development projects I've been involved in which were developed parallel to the RPG Maker series from the late '90s onwards.
Title: Re: The horrific love child of Visual Studio, Photoshop and Unity
Post by: Nexus on July 12, 2013, 03:09:26 pm
Really clean user interface! I like the way how it is inspired by Windows 8 style, but doesn't suffer from its fanatic simplicity (like VS 2012 does). I guess these are the default C# widgets meanwhile?

Do you build the editor/development tool with a game you eventually want to realize in mind?
Title: Re: The horrific love child of Visual Studio, Photoshop and Unity
Post by: Robin on July 12, 2013, 04:11:22 pm
Really clean user interface! I like the way how it is inspired by Windows 8 style, but doesn't suffer from its fanatic simplicity (like VS 2012 does). I guess these are the default C# widgets meanwhile?

Some aspects of Windows 8 are fantastic, some are just... confusing.

I love the simplicity of the Visual Studio 2012 docking system, and was lucky to find the same functionality in the Dock Panel Suite (https://github.com/dockpanelsuite/dockpanelsuite) library.

Other aspects, like the 2-tone vector icons, I find a huge step backwards in terms of usability for the end-user. This and the restrictions imposed by using the WinForms library lead to a very... eclectic interface. Most of the widgets are default .NET with the occasional inherited replacement to fix some annoying rendering eccentricities.

I'm hoping the MDI style and modularity of the tools will allow the program to scale without losing the simplicity which is needed when bringing complex development tools to inexperienced users.

Do you build the editor/development tool with a game you eventually want to realize in mind?

Actually yes. I have a modest little project called Crystalshire (http://www.crystalshire.com/). It's a project I've been building on and off under several different names since ~2003/2004. I've actually released a good 3 or 4 game engines in the past which were built specifically for developing this game.

I've been pretty lucky with the amount of exposure these projects have encountered, and what I'm developing with SFML is an answer to the problems and restrictions I came across after trying to develop similar things in the past.

The game itself was released in 2011 and has retained a respectable user-base. There are a few videos and screenshots flying around if you Google the name of the project.

Here's the official media page on the website: http://www.crystalshire.com/screenshots.php (http://www.crystalshire.com/screenshots.php)

(http://www.crystalshire.com/files/images/screens/16_th.png) (http://www.crystalshire.com/files/images/screens/16.png)(http://www.crystalshire.com/files/images/screens/13_th.png) (http://www.crystalshire.com/files/images/screens/13.png)(http://www.crystalshire.com/files/images/screens/8_th.png) (http://www.crystalshire.com/files/images/screens/8.png)(http://www.crystalshire.com/files/images/screens/6_th.png) (http://www.crystalshire.com/files/images/screens/6.png)

Previous versions were all built on very dated technology, with a kind of meta-game developing where PvP combat was decided by who could predict where their opponent was actually placed on the server due to the lack of lag compensation.

Luckily I've managed to build up a very talented pool of friends who are going to be helping out with both the game and the engine itself, so I believe any future releases will be a much higher quality.

With libraries like SFML to replace my rather disappointing and rather buggy DirectX8 implementation from years gone by I'm hoping that things go a hell of a lot more smoothly this time around. :)
Title: Re: The horrific love child of Visual Studio, Photoshop and Unity
Post by: Jungletoe on July 12, 2013, 08:13:33 pm
Luckily I've managed to build up a very talented pool of friends who are going to be helping out with both the game and the engine itself, so I believe any future releases will be a much higher quality.

Who are you working with now, besides Rory?
Title: Re: The horrific love child of Visual Studio, Photoshop and Unity
Post by: Robin on July 12, 2013, 08:51:48 pm
Who are you working with now, besides Rory?

Same as always. Jacob is going to be writing the core components of the business logic. He's concentrating on the networking engine at the moment.

Rory is on graphics design duty and will be giving input as a game developer.

Eventually we'll be releasing a new website and that's when everyone else will be getting involved properly. I've kept in touch with the pool of original content creators we had before and it seems everyone is excited to share their experience with the public as well as being able to resurrect dead projects on a new medium.

I'll be writing some resource sharing systems in to the community site which allows people to post resource packs, articles, tutorials and the like. Considering the amount of people who went on to work in the industry, it'll be a pretty valuable commodity for people just starting out. Coupled with a new engine which concentrates on usability and simplicity it should make for some interesting times ahead.
Title: Re: The horrific love child of Visual Studio, Photoshop and Unity
Post by: Jungletoe on July 12, 2013, 09:29:14 pm
I'll be writing some resource sharing systems in to the community site which allows people to post resource packs, articles, tutorials and the like. Considering the amount of people who went on to work in the industry, it'll be a pretty valuable commodity for people just starting out. Coupled with a new engine which concentrates on usability and simplicity it should make for some interesting times ahead.

Sweet. I told Evan (ICT, IceCreamTuesday) about the engine and he's considering using it for a game he's been trying to get off the ground since the early days of Eclipse. I was going to write a whole engine for him, but you obviously have a lot more engine experience and work under your belt.
Title: Re: The horrific love child of Visual Studio, Photoshop and Unity
Post by: Robin on July 15, 2013, 11:21:49 am
Sweet. I told Evan (ICT, IceCreamTuesday) about the engine and he's considering using it for a game he's been trying to get off the ground since the early days of Eclipse. I was going to write a whole engine for him, but you obviously have a lot more engine experience and work under your belt.

That doesn't really go as far as you'd think. My experience is very niche and is based around a very specific code base.

My experience with user interfaces will make things much smoother for the end-user, but it'll be Jacob's work on the core systems which will make up the game engine proper. Both of us have improved immensely since we effectively retired from our game projects and concentrated on our real-life stuff.

As always all our work will be released open-source, so if anything I'd say to pick up our bare-bones release and build off of that. I'll be releasing a tonne of video tutorials, articles and the like so it should be fairly easy to expand on.

Would be nice having people like you and Evan around making our stuff break in weird and wonderful ways. Wouldn't have it any other way.
Title: Re: The horrific love child of Visual Studio, Photoshop and Unity
Post by: ICT on July 15, 2013, 03:34:30 pm
Awesome! Can't wait to give it a whirl. Very excited to see what you all have planned.
Haven't seen you in so long figured you let real life take you away from the hobby, thankfully you're still at it.
Miss you. Sign into skype so we can catch up. I miss hearing that sexy accent of yours.
Title: Re: The horrific love child of Visual Studio, Photoshop and Unity
Post by: DarkSpartan4 on July 16, 2013, 03:38:34 am
Robin? What are the chances of us running into each other on here?! It's a small world!  :o

This project is looking nice, by the way.
Title: Re: The horrific love child of Visual Studio, Photoshop and Unity
Post by: Tank on July 16, 2013, 08:17:09 am
I'm curious: Who is Robin? ;)
Title: Re: The horrific love child of Visual Studio, Photoshop and Unity
Post by: Robin on July 16, 2013, 01:22:27 pm
Awesome! Can't wait to give it a whirl. Very excited to see what you all have planned.
Haven't seen you in so long figured you let real life take you away from the hobby, thankfully you're still at it.
Miss you. Sign into skype so we can catch up. I miss hearing that sexy accent of yours.

Good to see you man. I'll PM you my information. AFAIK Skype can still handle old messenger handles.

I'm curious: Who is Robin? ;)

I spent quite a few years running several open-source game development communities.

I worked as a developer on Mirage Source, Playerworlds and Elysium before moving on to release my own stuff as Essence and later Eclipse Origins.

I'm hardly well known, but we had a community of just under 50,000 users on Eclipse so it's not uncommon to run in to people in random parts of the internet. It's fairly humbling when I get PMs from people who recognise my name or alias on websites like Reddit -- it's very rare, though.

This thread is very disproportionate simply due to the fact that we're on a site designed for game developers wanting a simple 2D library... something which a large portion of my old user-base will be looking for now my previous projects have been shut down. x)
Title: Re: The horrific love child of Visual Studio, Photoshop and Unity
Post by: Robin on July 24, 2013, 04:56:58 pm
Well, I updated quite a lot. The entire project, in fact.

I was getting a lot of code smell which resulted from some deep-rooted issues in the initial framework I built up whilst I was picking stuff up.

As such I started with a fresh solution, fragmented the functionality in to three distinct projects and then re-built the entire thing around a set of custom events.

The result is not much has changed on the front-end. I felt the UI was already solid and didn't need much else done to it. On the flipside, the back-end is completely different and waaay more responsive due to distinct lack of bodges. It's always nice to write a program a second time when you know what kind of problems you're going to face down the line...

(http://i.imgur.com/1TTJr5p.png) (http://i.imgur.com/yjNKqgE.jpg)

Although the UI doesn't look different, it feels 100x more responsive due event-driven functionality. Things that were hacked in before, like automatically selecting layers after they've been created, were planned from the start.

Most code is now accessed from a single point, and so the few dozen functionality inconsistencies that I had before have all but disappeared.

The code is also much more clean. We now have much more classes which do much less, making going back and fixing stuff up a much more enjoyable task.

Also, actually having some experience with the SFML library now made it so the latest batch of SFML-based controls perform a hell of a lot better.

Here's the latest change log.

Code: [Select]
v2.0.6:

• Can no longer drag selection off-screen in the tileset panel.
• Tile selection now stops on mouseup.
• Removed a lot of the padding from the document tabs.
• Moved some menu items around.
• Can now edit multiple maps at once.
• Can now set and remove tiles from the map.
• Can no longer set and remove tiles from outside the map's bounds.
• Added a map renderer.
• Hooked the map renderer in to the various events, making sure it automatically re-renders when any changes are made.
• Map saving/loading now automatically converts the enumerable tile list to and from a 2D array for faster processing in-memory.
• Maps now have a cached 2D sprite array which is automatically updated whenever tiles are placed.
• Fixed inconsistencies with the various 'deleted' events.

v2.0.5:

• Implemented EditorMap class.
• Added Layers panel.
• Added map-specific events.
• Hooked layers panel in to all the map events.
• Added layer adding, renaming and moving.
• Added 'unsaved changes' property to maps.
• Maps will now show a save prompt when closing.
• Can now edit multiple maps at once (tiled or floating).
• Added layer visibility and opacity.
• Created custom ListView control for better functionality.
• Can now duplicate layers.
• Duplicated layers are inserted below the layer duplicated from.
• Duplicating a layer brings up a prompt allowing you to edit the details.

v2.0.4:

• Tile selection now renders on the map control.
• Now renders all tiles, toggled individually or not.
• Tile selection now calculates the offset from the 0, 0 on the tileset.
• Individual tiles no longer render outside the map area.
• Map control now recognises map size changes.
• App now restores maps opened last session.
• Persistent Project Explorer nodes no longer get confused when switching between projects.
• Toggling individual tiles in the selection now calculates the offset properly.
• Map tabs now automatically close when a map is deleted.
• Added tile layers to maps.

v2.0.3:

• Re-implemented resource manager and replaced all texture calls.
• Can no longer toggle tile selection outside of the tileset region.
• Pulled in the Edit, Database and Tools menus. Disable till implemented.
• Project explorer now retains node selection intelligently.
• Added maps.
• Implemented MapManager class.
• Added dockable map editor form.
• Can now open, rename, edit and delete maps.
• Editing a map's properties will now update the map's tab.
• Added inherited menu to the DockMap form.

v2.0.2:

• Re-implemented tile selection.
• Can now drag up and left.
• Tile selection now stored as a list of points.
• Can now toggle individual points by using ctrl.
• Can no longer select tiles which don't exist.
• Bug with tileset selection and area fixed.
• Cleaned up the PointSelection class.
• Replaced direct manager calls with multiple events.

v2.0.1:

• Re-factored singleton classes in to a collection of manager classes.
• Rather than monolothic call stacks, now uses centralised events.
• Replaced copied & pasted code with centralised, inheritable classes.
• Built new dialogs which can be switched to 'edit mode'.
• Moved dialog and docking librarys to new CrystalLib.Toolset.
• Moved object management to Toolset project.
• Standardised the 'project' concept.
• UI uses event handlers to update itself automatically.
• Re-implemented tilesets.
• Re-designed Project Explorer panel.

v2.0.0:

• Re-created solution from scratch.

v1.0.9:

• Can no longer try and rename or delete tilesets which don't exist.
• Can now edit tilesets.
• Replacing tileset textures now properly rebuilds maps.
• Fixed crash when clicking both mouse buttons at once.

v1.0.8:

• Added terrain (previously known as autotiles).
• Refactored old new item dialogs to generic edit & new.
• Can now edit game properties.
• Added terrain dock panel.
• Can now edit map properties.
• Fixed map re-sizing.
• History list now only refreshes when items are added/removed.

v1.0.7:

• Changing opacity is now merged in to a single undo/redo command.
• Changing opacity no longer re-caches the entire layer.

v1.0.6:

• Fill tool now recognises single tile areas.
• Creating a new layer now adds blank tiles properly.
• Eraser highlight now disappears properly.
• Added eyedropper tool.

v1.0.5:

• Replaced EditableTileMap tile lists with a 2D array.
• Optimised fill function to run off new 2D array.
• Re-implemented cached fill highlights.
• Re-implemented SetAffected() for tile-specific caching.
• Fill function now calls individual tile caching.
• Loading/Saving maps now converts tile lists in to 2D array.
• Undo/redo stacks are now document specific.
• Added changes to the map's layer structure to the undo/redo stack.
• Fixed rendering on undo/redo.
• Fixed layers not being selected when using undo/redo.
• Fixed new map functionality.

v1.0.4:

• Creating a new layer will now select that layer.
• Project Explorer treeview node states are now saved between sessions.
• Fixed icons not displaying.
• Added undo/redo and history.
• Replaced direct calls to the CrystalLib map array with an EditableTileMap wrapper.
• Loading/saving maps will now automatically convert EditableTileMaps to TileMaps.
• Added icons + proper step highlighting to the history list.
• Added eraser tool to history.
• Right-clicking with the tile brush tool will now show up as eraser action.
• Clearing history will now update UI.
• Making a new map will now clear the history to avoid a bug.

v1.0.3:

• Optimised fill function to create more intelligent enumerations.
• Real-time fill highlights no longer highlight when not hovering over stuff.
• Added File -> Export menu item. Can export maps as .png, .bmp, .jpg or .tga.
• Implemented new layer list system.
• Added eye icons to the layer list.
• Added null checks to various EditorManager.cs methods.
• Fixed various docking issues.
• Added 'properties' panel.
• Replaced map list with project explorer.
• Added context menu to the map layers control.
• Added context menu to the project explorer control.
• Multi-tile placement will now only re-cache the layer once.
• Added history control.

v1.0.2:

• Added map sprite caching.
• Added per-layer sprite arrays.
• Optimised rendering methods.
• Optimised flood fill methods.
• Re-factored most of the code to better incorporate LINQ + lambda.
• Fixed some readability and flow issues.
• Standardised control colours across the application.
• Added highlight overlay for fill tool.
• Fixed layer opacity and tile placement to work with map caching.
• New layer list control.

v1.0.1:

• Fixed fill tool.
• Re-programmed tileset & map rendering for better performance.
• Added flood fill support for both existing tiles and null regions.
• Added eraser & fill tools.
• Can now delete and rename maps and tilesets.
• Added zoom to tileset view -- disabled it because it looks terrible.
• Added grid & selection toggle to tileset view.
• Fixed flickering on render on map & tileset views.


v1.0.0:

• Created program.
Title: Re: The horrific love child of Visual Studio, Photoshop and Unity
Post by: eXpl0it3r on July 24, 2013, 04:59:04 pm
Stop teasing us and finally release some binaries! :D
Title: Re: The horrific love child of Visual Studio, Photoshop and Unity
Post by: Robin on August 15, 2013, 03:16:32 pm
Well, more updates. A lot of time was spent re-implementing systems from the old version.

The fill tool, undo/redo stack and property dialogues were all brought back with some improvements.

Most of the time was spent normalising interactions with the undo/redo stack. Rather than relying on specific events to trigger caching, rendering and re-building UI components I now rely a lot on PropertyChanged events. At least when dealing with maps.

I also took a bit of time out to standardise the MDI environment. Each individual object being edited will now recognise unsaved changes, and I also keep a cache of the object's original state in memory.

When closing an individual file with unsaved changes made, or when closing the application as a whole, I'll now go through and alert the user to any changes which will be lost -- giving them the option to save them, discard them, or cancel the closing operation completely.

The biggest 'new' addition would be terrain/autotiles/whateveryouwanttocallit.

At the moment I have support for the big few formats. Emphasis was put on adding the formats used by First Seed Material resources, as those are the ones I use in my actual game.

The system itself works similarly to the tilesets & maps.

(http://i.imgur.com/IERSd45.png)

You can add a new terrain type using the dialogue window. I'll then generate an icon based on the tileset & selection set by the user, pass that through to the terrain panel which will then add it to the list of terrain.

From there you can edit it, rename it, delete it, duplicate it... all that good stuff which makes a piece of software feel "right".

You can then select the terrain you like, place it on the map, and the caching system will notice the property changes and go through and build the arrays of sprites and such.

http://i.imgur.com/sYh84v9.png (http://i.imgur.com/sYh84v9.png)
(http://i.imgur.com/AkA8kL9.png) (http://i.imgur.com/sYh84v9.png)

I went a lot further with the system this time around, rather than the more relaxed approach I took in the past. I feel the polish to the system, especially with the interactions with the undo/redo stack, will make the software feel much more smooth and professional.

Here are the changes made since last time.

Code: [Select]
v2.0.13:

• Added proper terrain rendering through TerrainCache.cs.

v2.0.12:

• Terrain now loads & saves.
• Terrain will now create a tile-sized icon showing a preview of how the terrain looks for the lstTerrain control.
• Terrain can now be created.
• Terrain can now be edited.
• Terrain can now be renamed.
• Terrain can now be deleted.
• Updated lstTerrain control with the custom control FixedListView.
• lstTerrain now has a right-click context menu.
• Generated icons are now deleted when a terrain tile is deleted or changed.
• Terrain can now be duplicated.
• Terrain selection now tries to stay pretty constant.
• Hooked up all the TerrainManager events to the DockTerrain UI.

v2.0.11:

• Clicking in the middle of a brush action no longer breaks the undoredo class.
• Saving now only saves the open file, and only if unsaved changes are present.
• Added a Console dock panel.
• Added ListViewStreamWriter.cs.
• Re-directed console output to the listview on DockConsole.cs.
• Fixed newline problem with console.
• Console now ensures the latest addition to the log is visible.
• Added Delete button to the console.
• Closing a map with no unsaved changes will no correctly clear the history.
• Added terrain panel.
• Added terrain brush tool.
• Added terrain dialog.
• Built up terrain manager.
• Can now create new terrain objects.
• Hooked the DockTerrain functions up to the TerrainManager events.
• TerrainAdded event now properly firing when new terrain is created.
• New terrain is now added to the lstTerrain control.
• Tile selection in the terrain editor now works.

v2.0.10:

• Added EditorTileMap Clone method to fix MapChanged event.
• EditorTileMap now keeps a cache of the last saved state.
• If you close a map when changes were made it'll now correctly allow you to either cancel closing, save your changes, or revert back to the last saved  state.
• All dockpanel content checks now type-cast as DockMap. TabText is no longer used to identify documents.
• Maps with unsaved changes now show a * next to their name in the TabText.
• Renaming a map no longer forces it to save.
• Renaming a map will no only rename the file.
• Choosing to not save changes will still save the XML after reverting to the concrete map data.
• Closing a map will now clear the undo/redo history.
• Cancelling the save operation of anything when closing the entire application will now stop the application from closing.
• DockMap will now only prompt to save the map when the document is closed by a user specifically (fixes double prompts when closing application).
• Maps now correctly commit changes made to ConcreteLayers when saving manually.
• UnsavedChanges no longer set to true when setting tiles down fails.
• Fill tool now correctly triggers the UnsavedChanges bool.

v2.0.9:

• Added a 'Changed' event to the UndoRedo class.
• Hooked in to each individual Changed event on EditorTile and EditorLayer.
• Map now intelligently re-renders specific areas based on what was changed in the undo/redo command.

v2.0.8:

• Brush and eraser tools now handle all changes done in a single mouse action as a single undo/redo command.
• Fixed bug with eraser tool not being able to be 'redone'.
• Replaced ICloneable inheritence due to no deep cloning of undoredo properties.
• Fixed layer duplication.
• Can now undo/redo all layer operations.
• Layer list now updates on undo/redo changes.

v2.0.7:

• Added Camera intrect to the ScrollableSFML control.
• Camera now passed as a parameter to the RenderMap method.
• Map no longer renders areas outside of the Camera area.
• Enabled fill tool.
• When hovering over a tile with the fill tool, it'll highlight the area which will be replaced if the fill tool is actually used.
• Fill tool now fills tile areas when used.
• Fill highlight no longer highlights tiles outside of the camera view.
• Fixed bug with flood fill algorithm checking tiles twice.
• Fixed bug where empty tiles were getting serialized.
• Optimised map camera. Now ONLY checks tiles within camera view.
• Re-programmed entire EditorMap system to support undo/redo.
• Added EditorTile and EditorTileLayer.
• Added DockHistory panel.
• History now keeps track of all undo/redo events.
• Added undo/redo buttons.
• Fixed bug where you couldn't undo/redo Tile Brush events.
• Undo/Redo menu on MainForm now hook directory in to DockHistory.
Title: Re: Crystal Toolset
Post by: Robin on September 18, 2013, 04:35:34 pm
More development has taken place, this time with a lot of emphasis on the 'feel' of the program. No new huge features yet, more fleshing out of the current map editor.

Things like making sure the Project Explorer scrolls back to its original position after populating the content nodes, making sure that lists of filenames appears as '1, 2, 6, 8, 10, 15, 20' instead of '1, 10, 15, 2, 20, 6, 8' etc. Little things which would make the program feel off.

However, one feature I've been putting a lot of time in to is the map properties.

I'm not sure if any of you used my previous engine Eclipse Origins, but once you created a map... it was kind of set in stone. You couldn't 'nudge' the painted area to the left or right. You could only expand/contract the map size on the right and bottom sides. It was very rigid and quite frankly hard to use.

As such I took a feature idea from Photoshop with the 'Edit Map Size' function (which comes with the newly added context-specific 'Map' menu which will be injected in to your main menu bar when editing maps).

It took a while to get right due to having to create a size-sensitive anchor selection control from scratch, but the results are pretty damn smooth.

http://i.imgur.com/5FC0YSn.png (http://i.imgur.com/5FC0YSn.png)
(http://i.imgur.com/EfXo87u.png) (http://i.imgur.com/5FC0YSn.png)

This will give mappers the ability to expand their regions in any direction needed, and not punish them for not planning the size perfectly as soon as they create the map.

I'm pretty happy with how the arrows give a solid picture of how the map will be effected based on the anchor selection and the new size selected. It's a very good example of how such a feature can be completely intuitive using graphical representation.

I also started work on the idea of a 'test/play/compile' button. Once clicked, it'll take your current project and feed it in to an example client which will load up over the top of the IDE and allow you to immediately test content you've just added.

It's a kind of middle-ground between having to re-compile your entire project, à la Visual Studio, and running the editors within the actual game client, à la Eclipse Origins. We'll see how it goes. Right now it's just a blank SFML window run in a background worker, but it is contained in its own project so should be easy enough to expand.

Code: [Select]
v2.0.18:

• When Project Explorer nodes are restored, the currently selected node is forced in to view.
• Added a 'Edit Map Size' dialog.
• Created anchor point selection control.
• Added map-specific menu which is attached to the main form through MDI.
• Added map name to the map menu.
• Anchor point selection control is now size sensitive.

v2.0.17:

• Added 'Play' button.
• Added game client.
• Play button now loads a game client in to the toolset.
• Game client now run on its own thread.
• Split TerrainCache.cs. TerrainCache remains in the Toolset project and handles all SFML caching. TerrainHelper.cs was created in CrystalLib.TileEngine and handles all point calculations.

v2.0.16:

• Added natural list sorting to Project Explorer.
• Added natural list sorting to Terrain.
• Checks to see if maps/tilesets etc. already exist are now case insensitive.
• Lowered padding on terrain list.
• Added EnsureVisible() method to scrollSelect. This will ensure the user can see the tileset selection when editing or duplicating terrain tiles.
• Name check on renaming/editing objects is now case insensitive. (No longer tells you off if you change the casing without changing the actual text).
• Selecting terrain in the project explorer will now switch to the terrain brush tool and also switch the currently selected terrain to the one...

selected.
• If name not set in the New Tileset dialog, it'll be generated from the file name of the texture imported.

v2.0.15:

• Replaced History & Terrain icons.
• Fixed portability of tileset textures.
• Terrain added to the Project Explorer.

v2.0.14:

• Entire map will now cache when reverted to its concrete form.
• Removed extra calls to CacheAllTiles().
• Split Terrain caching between map-wide caching and per-tile caching.
• Per-tile caching (terrain or normal) will re-cache the terrain of the

surrounding 8 tiles.
• Seperated the TerrainCache methods for type-specific settings.
• Fill tool now recognises terrain matches.
• UnsavedChanges flag now set on property change. Undo/Redo will now trigger

it.

v2.0.13:

• Added proper terrain rendering through TerrainCache.cs.
• Fixed rendering.
Title: Re: Crystal Toolset
Post by: zsbzsb on September 18, 2013, 06:10:49 pm
This looks very good, did you happen to code this using Windows Forms or WPF?
Title: Re: Crystal Toolset
Post by: Robin on September 18, 2013, 07:21:30 pm
This looks very good, did you happen to code this using Windows Forms or WPF?

WinForms. WPF is... annoying to work with.

I use DockPanelSuite (https://github.com/dockpanelsuite/dockpanelsuite) for the tabbed MDI.

Everything else is default .NET controls with various hacks and interops to make them not look bad. Far too many lines of code were dedicated to getting basic features such as double buffering and intelligent layout freezing.

Anything with a texture in it is based off a generic SFML control I created which handles overflow scrolling for an SFML Window object.
Title: Re: Crystal Toolset
Post by: cloudncali on September 18, 2013, 08:39:10 pm
I'm curious: Who is Robin? ;)

I spent quite a few years running several open-source game development communities.

I worked as a developer on Mirage Source, Playerworlds and Elysium before moving on to release my own stuff as Essence and later Eclipse Origins.

I'm hardly well known, but we had a community of just under 50,000 users on Eclipse so it's not uncommon to run in to people in random parts of the internet. It's fairly humbling when I get PMs from people who recognise my name or alias on websites like Reddit -- it's very rare, though.

This thread is very disproportionate simply due to the fact that we're on a site designed for game developers wanting a simple 2D library... something which a large portion of my old user-base will be looking for now my previous projects have been shut down. x)

Holy crap, Playerworlds, That is a name I have not heard in many years. I used to fool around with that program a lot when I was younger. I was to young/inexperienced to do any thing productive with it. I was a nice system, Aside from being made in Visual Basic 6.0 *Shutters*
Title: Re: Crystal Toolset
Post by: eXpl0it3r on September 18, 2013, 09:35:59 pm
So is there any chance, we're ever gonna get a binary of it? ;D
Title: Re: Crystal Toolset
Post by: Robin on September 19, 2013, 02:01:05 am
Holy crap, Playerworlds, That is a name I have not heard in many years. I used to fool around with that program a lot when I was younger. I was to young/inexperienced to do any thing productive with it. I was a nice system, Aside from being made in Visual Basic 6.0 *Shutters*

Haha, yeah. The entire community was made up of young programmers just starting off, myself included. I learnt everything I know growing up making games with those people.

I've got to admit, I ended up taking that Visual Basic 6.0 code base as far as 2012 before I finally sold it off.

Working in .NET allows me to shore up a lot of the problems which engines like Playerworlds had problems with, in terms of both performance and usability.

So is there any chance, we're ever gonna get a binary of it? ;D

I've had some small-scale releases with some very positive feedback.

Right now some of the core features still need fixing and re-factoring. I want to give full control over everything to the end-user, and right now the map size changes are having some pretty explosive effects with the undo/redo stack. People are also picking up on problems with specific workflows which I don't necessarily go through myself.

Once I feel people can actually use it to, at the very least, create a project, import their resources and create a map in a professional manner I'll put up a more public download so people can break everything. Right now you'd crash the program too easily, and I want to keep that kind of reputation away from my work, especially considering how much time is spent on stability and user control.
Title: Re: Crystal Toolset
Post by: Robin on October 25, 2013, 03:39:56 pm
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.

Code: [Select]
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 Experience

One 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.

(http://i.imgur.com/HEGjNcd.png) (http://i.imgur.com/oKhxRrg.png)

Performance

Whilst 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.

Games

What'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.com (http://www.crystalshire.com)
This 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.

(http://i.imgur.com/S6FOYQa.png) (http://www.crystalshire.com/files/images/screens/16.png)

Nin Online - http://www.ninonline.org (http://www.ninonline.org)
An online multiplayer Ninja RPG. Built around roleplaying and PvP, we've had a very successful limited alpha release over the last few weeks.

(http://i.imgur.com/FFBtsmz.png) (http://www.ninonline.org/forum/uploads/gallery/category_2/gallery_1644_2_40472.png)

Elandor Chronicles - http://www.elandorchronicles.com (http://www.elandorchronicles.com)
A 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.

(http://i.imgur.com/cxVjMKM.png) (http://3.bp.blogspot.com/-kGcs8-KWzxU/UfQrWl3oSVI/AAAAAAAAAIo/m3VCuTFopeQ/s1600/cinder.png)