It’s been a very long time since I’ve made an update here. I’ve been working steadily on the font editor module for the Gorgon editor and it’s finally nearing completion (the last 99% of 99% of 99% etc…).
I’m quite proud of this thing. It’s supports a pretty well rounded suite of functionality for designing a bitmap font for use with Gorgon. Besides the usual standard stuff like font outlines, font faces, styles, etc… it also supports glyph brushes, custom glyphs, glyph advancement and offset editing and custom kerning pair tables.
In the 2.x version of Gorgon I wanted to add cameras. It was most tedious before when you wanted to translate an entire scene by an arbitrary amount. So when I started this thing, I created an Orthographic camera object. The previous version of Gorgon used an Orthographic camera internally and this was never exposed to the user. But in this case, I exposed the camera so that the user can define their own viewing mechanism.
I’ve been spending my time refactoring and just cleaning up the code in Gorgon. I made the mistake of getting Resharper and it put me on this crusade of cleaning up the code because apparently I’m just awful. Also, I’ve been finishing up the primary graphics API (not the 2D stuff) by adding a bunch of new things to it like geometry shaders, compute shaders, and hull/domain shaders for tesselation (this one is cool, if not a little baffling). I also made the API a little closer to Direct 3D 11 by adding views to resource object types.
So I’ve been busy working on building the editor for creating the content for Gorgon. I know I posted a screenshot of a very old initial version of the editor way back:
Anyway, I totally scrapped that old thing and restarted. And here’s a more up to date (but not even close to being done) screen shot:
A little better.
This new editor is going to be a replacement for all the tools in the previous version of Gorgon. It will handle file management duties (File System Editor in v1.x), sprite editing (Sprite Editor in v1.x) and atlasing (Atlas tool in v1.x). It will also add font editing. The big thing about this editor is that it’s entirely plug-in based. Meaning that the font editor, sprite editor, etc… are/will be DLLs that are loaded/unloaded as needed. What this means for you: You can write your own plug-in modules for it. Want to build a map editor and integrate it with the rest of your content? With the plug-in system in the editor, you can write your own map editor and host it right in the editor interface (if anything the minimized tedium of having to write UI code is worth it). Want to write out your content data as encrypted data? You can extend the file writing functionality to write out encrypted file data.
Unlike the sprite editor in the previous version, the files are no longer saved as loose files on your hard drive that require a separate utility (file system editor) to pack into a single compressed file. This editor now outputs data as a packed file (of course, this can be modified with a plug-in) so you don’t have to come up with a strategy to update your content, allowing you to edit directly. This is where it takes over from the file system editor and like the old file system editor this one is capable of importing files by either clicking on an Import menu item, or dragging and dropping directly from explorer. And, obviously, there’ll be a way to extract the files to your harddrive should you wish to do so.
I have several plans for plug-in modules for the editor including a sprite editor, image editor (a very very very very simple editor, use photoshop or paint.net if you want high detail stuff), a font editor and a shader editor (maybe).
FYI, the window will look like that in Windows 7 as well (i.e. no aero glass). I’ve modified it to look like the Zune window by including a new object in Gorgon.Common.Dll called ZuneForm. Basically you inherit this form instead of a System.Windows.Forms.Form and then you get a Zune-looking window.
So I’ve been adding examples to the new version of Gorgon for the last week or so. The latest one shows how to use the new input system to use a Raw Input mouse, keyboard and joystick (if present, and is actually not using Raw Input as such). It’s a pretty silly example, but shows how to get the input plug-ins loaded, how to create an input factory and how to create the objects used to represent the various input devices.
You want pictures though. I have one. And it is here.
So, I got myself a copy of Visual Studio 2012 Pro. It’s pretty nice, except for the shitty all-caps menus (which you can turn off with the registry hack located here). I really didn’t have any plans on moving Gorgon v2.x to .NET 4.5/VS2012 until I saw this:
So, I’ve been quite busy lately with a new job and such. And as a consequence I haven’t had any time for Gorgon recently. But I finally sat down this evening and did a little work (not much mind you, and certainly nothing of note) on Gorgon 2.x.
I’ve uploaded the Ball Demo to the site so people can have a look at it. I’d appreciate any feedback (please post the feedback to the forums, thank you).
Please note the following before running it:
It’ll probably crash. It’s in development after all.
You NEED Windows Vista Service Pack 2, or Windows 7 (Windows 8 -might- work, but don’t count on it).
It will run on Direct 3D 9 capable video devices. However, it requires Direct X 11 be installed on the system (hence the OS requirements).
To run it, just run the BallDemo.exe and pray (oh, and ensure that the zip file isn’t ‘blocked’ by Windows, .NET assemblies hate that shit). It defaults to windowed mode with a resolution of 1280×800 although you can modify the BallDemo.config file to change to a resolution you like.
There’s a new version of Gorgon uploaded. There’s not a huge amount in this release regarding the actual graphics library, just a few bug fixes.
However, there are two important changes:
The project/solution files for the library source code were converted to Visual Studio 2010. This means that in order to compile the Gorgon library, you will need Visual Studio 2010. The library still uses .NET 3.5 SP1, so Visual Studio 2008 will continue to work when using the library assembly.
Most important of all: There’s been a new library added called GSound (Gorgon Sound). Written by ShadowDust702. New forums have been added to reflect this new addition.
Here’s a sample of text rendering in Gorgon 2.0 (Dorian). It’s rendering 16,019 characters, animated with shadowing (which doubles the character count), plus the FPS counter. When it renders the text, it renders with kerning information (provided the font has any) so the output should be properly spaced. And while it’s doing this, it’s scaling the text to pump up the fill rate.
(The video has since been deleted)
All that at ~75 FPS, that’s not too bad hey?
In this particular “demo” you can see that I’m able to compress and expand the lines of text. This is possible because of the new “LineSpacing” property in the text object. This allows the user to set line spacing by setting a multiplier. For example, a LineSpacing of 2.0 will give you double spacing and 0.5 will only move the lines half way.
Anyway, I’m still plowing through all of this. And I’m pretty happy with the results.
So I got custom shaders up and running in Gorgon 2.0. The new version has always had shader ability because it’s using Direct3D 11, so it’s required to use them. However, up until now the shader code has been hardcoded to use 3 default shaders. But after today, there’s an ability to use customized shaders:
In this little sample, there’s a new system at work. It’s basically a mini effects framework that can do multi-pass rendering and in this video there’s a wave shader and an embossing shader at work on the sprite. If you want to learn more, click the stupid link below
So, I’m moving to a new place tomorrow and work on Gorgon v2 is going to halt for a bit until I get my life back in order. In the meantime, here’s a screenshot of the primitives (rectangles, lines, etc…) that have been making me insane (click it to see a larger version):
You can see the line (barely, I know, you can see it when it’s running for sure) and the rectangle, but I’ve gotten ellipses to work as well. Now, what’s the big deal you ask? (You are asking that, I demand it). And I’ll tell you. Unlike the previous incarnation where the primitives were generated one pixel at a time (very inefficient), this time it’s using polygons to generate the primitives. So a line is using the line drawing on the video card, the rectangle and unfilled ellipse are using the line drawing as well and the filled ellipse is using triangles. So all in all, they’re MUCH faster than the previous version. For more details click the thingy at the bottom there…