Tag Archives: Game Development

The future.

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

Continue reading

New version of Gorgon – 1.1.4119.34319

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.

Enjoy.

Sun

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:

https://www.youtube.com/watch?v=PqPGa6P52LM

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.

Enjoy.

Moar User Stuff

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.

User stuff

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.

New version: Gorgon v1.1.3638.20767

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

You can read about the changes here.

Then you’ll probably want to download it.

New version tiem! Gorgon v1.1.3436.39405

sitelogoYes, 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.

Batches of hate

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

Continue reading

MOAR!!! NAO!!!

sitelogoAhoy hoy.

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.

Gorgon v1.1.3266.898

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

Helps

sitelogo

So I’m at a bit of a crossroads here.  I plan on releasing a new version of Gorgon by the end of next week (then I’m on holiday in Winnipeg… I need my head examined).  I’m running out of steam for working on Gorgon.  And I think I’ve done as much as I want to do with it.  It’d be a shame to give it up and just let it die, I did put a lot of time into it. 

So with that in mind I’d like to put a call out for help.  Basically I need someone other than myself to help with maintaining the code, and so on.  So if you like Gorgon and you think you can do it better, then please, leave a message either in the comments section or on the forums and we can get talking.  Even if you just want to write (or already have written) examples or tools for Gorgon, that’d be a help. 

Eventually I’d love to just leave this project in the hands of whatever “community” is interested in Gorgon and then I can go on my merry way.

Animation is fun

So I took on a major undertaking this weekend and fixed up some outstanding issues with the SpriteEditor’s animation editor system.  Mostly tweaks and bug fixes for the next release, nothing major.  The major undertaking was the new track view panel I added.

One thing that’s bugged me for a long time is that the animation editor never had a standard track view where you could add keys and see all the other tracks in relation to the track you were busy building.  The downside to this was that building an animation with multiple tracks could be tricky to sync up.  The reason for this is because in the public incarnation, the animation editor only has a combo box displaying the track names and a track slider to advance through the keyframes.  If I wanted to sync up a rotation to match up to a position key frame, I’d have to switch back to the position track find the key, make a mental note, switch to the rotate, add the key and pray it worked.  This of course was designed this way because I’m very lazy and wanted something quick.  No real animation package would work this way.  They all have this wonderful grid of boxes with each row representing the animation track and the cells indicating the individual key frames.  All very pretty, and very annoying to code.

But this weekend, I did this:
Behold the track system at the bottom.  And it’s got those funky glassy buttons that we all hate but secretly love because they do look fairly awesome.  I think it looks much better now.  And of course the thing is functional, if you click on a keyframe button, it’ll jump to that frame, and if you click on the track name, it’ll load the appropriate editor.  Assigned keys show up in blue, and so on, It’s just fantastic.   

One thing I ran into while building this behemoth (aside from the spectacularly shitty code I’ve written for the sprite editor in general) was that once an auto scroll has an AutoScrollMinSize of (32767, 32767) it stops responding to events.  What’s even more funky is that it still works, it scrolls right to the end even if the size is greater than 32767.  Unfortunately this causes issues for my animation system as you can have thousands upon thousands of keyframes if you so choose.  The solution to this hiccup was to make the keys wrap underneath after 1024 keys (1024 was the highest number of keys that could be displayed before the scrollbars went into overflow).  Of course, not the best solution to the problem, but it works.

Anyway, this will be included in the next milestone of Gorgon or if you’re addicted to subversion, you can grab the most recent build from the trunk.

Gorgon v1.1.3246.24958

It’s that time again.  A new version of Gorgon has been released into an unsuspecting populace to help spread terrorism and christianity at the same time.

There are multiple bug fixes, and these are detailed here.  The most fun thing is that I’ve included a new example that demonstrates how to make per-pixel lit (and bump mapped) sprites via normal maps.  It’s pretty spiffy if I do say so myself.

Other than that, the biggest change is the upgrade to the November version of SlimDX.  With this version the requirement for the Visual C++ 2008 SP1 runtimes has been dropped (about goddamn time too) and the SlimDX guys have created awesome installers for SlimDX.  The big deal about dropping the runtimes is that Gorgon no longer requires the runtimes to be distributed with its own installer and this has decreased the size of the installer (a little).  But the biggest deal comes from the SlimDX runtime installer and x64.  This installer will put SlimDX (both x64 and x86 versions if you’re on an x64 version of Windows) into the GAC.  This means that if you’re running with a project configured for AnyCPU (Project Properties->Build Tab), and you’re running on an x86 OS, it’ll use the x86 version of SlimDX automatically, and if you’re on an x64 version of Windows it’ll use the x64 version automatically.  This means there’s no longer a need to maintain two project/solution files for x86 and x64.  This is a great relief to me as it was a pain in the ass to keep updated.  Of course, this only works if both platform versions of SlimDX are installed into the GAC (e.g. if you only have the x86 version of SlimDX installed and the program is forced to compile to x64 – it’ll fail). 

Wait… what’s that?  You -want- an x64 (or x86) only version of your program?  Well, just set it to compile for x64 (or x86) instead of AnyCPU and the runtime will automatically use the x64 (or x86) version of SlimDX.  Fantastic!

So what are you waiting for?  Happiness is only a download away.

New Gorgon Example

So I kind of broke my promise to not add anything new, and added a new example.  This one deals with per-pixel bump mapping.  It will be included in the next round of bug fixes for Gorgon (of which there are many).   I’ve put up a screen shot of it in action, although it really needs to be seen in its fully animated glory to get the full effect.

As I said there are many bug fixes that have been implemented in Gorgon and I’ll package and distribute another release by the end of the month (I want to be sure to catch as many as possible).  None of them are show stoppers, just annoyances.  You can easily keep up to date by grabbing the code from the sub version repository on the google code page.  I’m aiming for the end of the month for a release unless I find a really major bug, so it’s entirely possible that it could come sooner.  But the way things are looking, it looks like I’ll stay on schedule.

As always, I’ll keep all two of us posted.


Edit: I just encountered a bug with the 1.1.0.0 installer. If you attempt to install the source code it’ll complain about installing x64 components if you’re using an x86 version of Windows. Just deselect “Install Source” before installing. If you need the source, you can get it from the subversion repository. Sorry about that, I’ll get that straightened out with the next release.

Gorgon v1.1.0.0 released from it’s beta cage to cause untold carnage.

Version 1.1.0.0 (Ionian) is now live.  This is a final release version and that means v1.1.x is now out of beta.  The list of changes are located here.

Note that since the beta, I’ve yet again changed installers.  I know some people don’t like installers (and I don’t either sometimes), but it’s really handy when I need to set up file associations, and have some sort of automated uninstall.   Plus the installers will automatically detect whether the Visual C++ 2008 SP1 runtimes are installed and install the necessary files if needed.  That’s a convienence that I appreciate.  Note that I don’t have redistributables for DirectX or .NET 3.5 SP1.  Those installers are huge, and I don’t think I’m allowed to package the web installers – nor am I able to write the install scripts required to download them (yet).  For now it just tells you that you need those packages and will abort until they’re installed.  Links to those installers are provided on the downloads page.

From this point on, I’m only going to be making small corrections to the library if a critical bug pops up.  I don’t plan on doing any other major additions or upgrades (at least, not for a while).  I’m going to focus on other projects in the coming months.  I will be keeping an eye out for bug reports on the forums and on the google code issues page so I’m not abandoning the library.  However, if there’s anyone who’d like to pick up the reins of this project and move it on to the next level, let me know via the forums and I’ll add you to the project user list. 

With that said about installers, please be sure to remove any previous version of Gorgon before installing.  If you were using the betas, this should just amount to deleting the directory you installed Gorgon into and the start menu folder by hand.

Anyway, enough of that.  Go download it and write something spiffy.