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.
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 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.
So, here’s some more proof that I’ve been working on the next version of Gorgon:
As per the description on the youtubes:
An example showing the new version of Gorgon.
Currently this is just a simple sprite test using 1024 multi-textured sprites via shaders on Direct3D 11 hardware. It also shows a new feature that’s being planned (but not promising anything) to use the 3D stuff to allow perspective corrected sprites.
This video also shows depth for the sprites by walking a camera into the sprite cloud.
Currently getting about 1200 FPS with this (the selective multi-texturing really slows shit down).
I recently played around with my own library (see an earlier post about the sun effect) and I found it… well, lacking. In my day job I do a lot of framework/library code for re-use amongst my co-workers and I’ve learned a great deal over the last few years of doing that professionally. There’s a huge difference between writing a database/application framework and a graphics library, but, I’ve always been amazed how concepts from one architecture will map to another and as I developed Gorgon in my own time, I ported concepts to the framework code I write for my job and vice versa. One major difference is that our framework code at the office is always evolving from project to project (granted, the pace of evolution has slowed somewhat), while Gorgon was written, and aside from bug-fixes, it never evolved because I never really used it except to prototype small things from time to time. Until I wrote the Sun thingy….
Yep, finally. I’ve rolled up all the updates/fixes that were in the subversion repository and put up a new version of Gorgon. Version 1.1.4119.34319 is the latest version and you can get it from here. You can view the change log in this forum post.
So, I bet you’ve been wondering what I’ve been up to lately… You haven’t? You selfish bastard.
Anyhow, I’ve gotten around to playing with this library I wrote for a bit. I do so little programming on my own time these days and honestly, I never much cared for Gorgon (I felt it could have been better), that I haven’t bothered to try and write anything with it. That my users actually say it’s useful and well written comes as a complete shock to me. Anyway, this last week I mustered up some spare time and I created this abomination:
It’s not much, but it’s just a little thing I threw together to see if I could get a “bloom” type effect with a star. I did. And there it is. Note how the surface of the star moves around and all that. Neat hey? No? Shut up.
I’ve limited it to 60 FPS on purpose, but it is fairly swift. I think at one point I was getting > 1000 FPS. However, my vidja card is quite beefy, so take that with a grain of salt. So… yeah…. that’s all I have to say.
Well we have another user contribution from forum member domq. He’s doing a “sort-of” Ultima 6 MMO remake called Britannia On-Line. Frankly it looks awesome, and I can’t believe Gorgon can be used for stuff like that. Who knew? I sure didn’t.
Anyway, I’ve added screenshots of the project to the screenshots gallery under the user contribution gallery. You can check out more about the project in the forums.
Domq also found an issue with the TextSprite when the bounding rectangle is very small and WordWrap = true. This has been corrected (by domq) and I’ve put the fixed code into the Subversion repository.
So I’ve been meaning to do this for a while, but laziness and real life gets in the way. Anyway, one of the forum members, Zeraan, has created a nifty little asteroids clone called Asteroids of Beyaan. You can check out the project (which includes a link to the game itself) in the forums. I’ve also added screenshots for the game in the screenshots section of the site under the user contributed screenshots section.
I’ve also added two new (well, not so new seeing as they’ve been there for a long time) screenshots for the RPC project by ShadowDust702. Those too can be found in the screenshots/user contributed section. Check the project description for a download (demo/test version) link.
So I’ve finally gotten off of my lazy ass and uploaded a new version of Gorgon. This version contains all the bugfixes, and enhancements that have appeared in the Subversion repository over the last few months.
Yes, I know I spelled “time” wrong. Yes, it’s on purpose.
I’ve uploaded a new version of Gorgon today. That puts the current release at version 1.1.3436.39405. You can read what’s changed by heading on over to the forum and reading this announcment. After you’ve become completely brainwashed by reading that you can download it.
Clearly I’m still working on Gorgon. I probably will be until the day I expire, which given my healthy intake of McDonald’s, should be any day now. If someone wants to lend a hand, contact me via the forums.
Edit – May 29/2009
Because I’m very dumb, I released Gorgon with a nasty bug in the Batch sprite object. When you use the batch sprite it will complain that it can’t find the vertex declaration for PositionNormalDiffuseTexture1 or some such nonsense. This of course just totally breaks the Batch sprite. It’s been fixed and the new version (v1.1.3436.39405) is uploaded.
Sorry about that folks, sometimes Tape_Worm is stupid like ox.
So I’ve been a busy little bee the last couple of days adding a couple new features to Gorgon.
One of the things I’ve been wondering about is how I could possibly improve performance. To understand, I should explain how Gorgon does its “thing”. When you draw a sprite to the screen using the Draw() method the actual data doesn’t go to the current render target (screen for our purposes) right away. What happens is the vertices for that sprite are added to a dynamic vertex buffer. If the next sprite you draw has the same texture and states as the previous (which will most likely be the case if you perform batching properly) it will just add that sprite to the dynamic buffer and the process continues over and over until the end of the frame. When the end of frame is reached the buffer is drawn to the screen and the buffer is ‘reset’, that is, all data in it is overwritten with our next frame. This is all well and good if you only use the same texture and render states (Smoothing, Blending, etc…) But let’s say we have 3 sprites. The first 2 sprites share a texture and the last uses a seperate texture. When the first two are drawn they get added to the vertex buffer and then when the 3rd sprite is drawn the system detects a change in state (in this case it’s the texture) and the buffer is flushed and process starts over with our third sprite. As you can imagine this can be very inefficient, but if you batch sensibly you’ll see excellent speeds.
I’ve actually been working on Gorgon off and on (mostly off) throughout the last 2 weeks and I’ve sent a few new changes to the svn repository:
Modified the bump in the night sample (-again-) to allow better results when rendering specular maps and also to update a stupid mistake that I made. That is, I added unicode symbols directly into the source code instead of using their respective codes. While this hasn’t given me trouble yet, there’s always that possibility.
Modified the TextSprite object to fix an issue where the MeasureText function was not calculating the correct height for a block of text. Also fixed an issue where the alignment settings would sometimes place the text in between pixels and cause the text to look jagged and unreadable.
Removed Mount()/Unmount() from the public interface of the FileSystem object. These functions didn’t really serve any purpose and just made more work for the user. Internally Mount() is still available as a protected method for plug-ins so that the file system index can be built after a root is assigned. Sorry if this breaks anything.
Added support for MRT (multiple render targets)! Finally! This allows a pixel shader to output to multiple targets at the same time and should help out in performance situations where multiple passes are being used to achieve the same thing. To manipulate the additional render targets you can call Gorgon.SetAdditionalRenderTarget to add/update/remove a render target or Gorgon.GetAdditonalRenderTarget to return one. The previous property: CurrentRenderTarget is still in place and uses the SetAdditionalRenderTarget internally and is available for use if you’re only looking to switch the primary target.
Font objects can now load external TTF files. While you could always do this by hand by using PrivateFontCollection and then creating a Gorgon Font object from the resulting GDI+ font, it was a pain the ass. This new functionality will allow the reading of TTF fonts from various sources such as: A TTF file on the disk, an embedded resource, from a stream, or from a Gorgon file system. To load a font you just call: Font.From* (were * = Resource, File, FileSystem, or Stream) and it’ll import the font. For luddites: You can still create fonts directly from GDI+ font objects if you wish.
And finally, the one that caused the most cursing: GorgonZipFileSystem.dll. What’s that? It’s a file system that allows you to manipulate zip files (you know, the files that Winzip generates). Now using this plug-in the file system editor can open/create/update your zip files. Or you can forego the file system editor completely and just use winzip. There are some caveats however: You cannot use a password, you cannot use encryption and the file format must be the legacy zip file format (Zip 2.0). But yeah, awesome.
So there you have it. Hopefully the zip file support will be a plus. I have no idea when a packaged release will be available, but when it is I’ll make sure to announce it.
A new version of Gorgon has been released. The current version is now 1.1.3266.898. This fix includes some enhancements to the sprite editor animation editing interface and several bug fixes. You can see the change list here.
This will be the final release for Gorgon for a while. I’m going away on vacation at the end f the week and real life (i.e. work) has become increasingly busy so I have no time to devote to Gorgon at least until later in the new year. If someone wants to pick up the reins and take over for a bit, post a comment here or contact me through the forums.