Oh, and I've finished my bachelor's thesis, like a month ago. Forgot to mention that earlier. :P Now I'd need to decide if I continue to write master's thesis on the same subject, or choose something completely different. If only I could think of a subject having to do with game programming, that would certainly help with the motivation..
Tuesday, November 18, 2008
Random things..
Oh, and I've finished my bachelor's thesis, like a month ago. Forgot to mention that earlier. :P Now I'd need to decide if I continue to write master's thesis on the same subject, or choose something completely different. If only I could think of a subject having to do with game programming, that would certainly help with the motivation..
Monday, October 20, 2008
Shader goodness: Bloom!
So I coded a quick & dirty shader support to the engine, and today I've been trying to get the bloom working. And now it does. :) I'm still not done with it, needs some tweaking - and that's somewhat impossible right now since I have no final assets for the game yet! Everything you see in those screens is temporary and/or random. For anyone interested, here's some technical details on the subject.
I based the implementation on the GLSL bloom shaders from Funguloids, which in turn are modified from Ogre sample shaders. I'm still a beginner with the shader programming as I may have mentioned, so having anything to work from was invaluable. I tweaked the shaders to get the subtle look I was aiming for.
I'm using two small render textures (which are FBOs, no support for Pbuffers yet - and I think I'll have to do those at some point, as my laptop doesn't support FBOs), 128x128 in dimension and one bigger 512x512 RT. I render the scene normally to the bigger RT. The blurring is then done in two passes: first the scene RT gets rendered to 128x128 RT #1 using a horizontal blur shader (it also does some luminance stuff to have the bright parts more bright and dim parts more dim). Then RT #1 gets rendered to RT #2, this time with a vertical blur shader. Finally the RT #2 contents are blended additively over a normal 1:1 render of the scene. It needs quite a lot of tweaking, but I think it looks quite nice now.
In another news, my thesis is now almost complete! ^^
Thursday, October 16, 2008
Let there be LIGHT!
Last couple of days I've been implementing a lighting system to the engine (and preliminary scripting support before that). The lighting system is based on very simple ideas and was quite easy to implement. No troubles whatsoever, I was actually surprised. First I was contemplating on doing it using pixel shaders, but that would've required much more work (still learning the shader stuff) and I'm not sure if I could have pulled it off anyway. I still need to incorporate some shader support to the engine if I want to have a bloom effect later on.. Pixel shader lighting would have allowed to have normal maps for the textures though, now that would have looked very nice if done properly! Oh well.
Instead I went for texture based approach using a single FBO (Frame-Buffer-Object) where the lights get rendered to (additive blending naturally). Then with help of some stencil buffer magic, the light map is rendered over the scene using multiply blending. Stencil buffer is needed because it makes no sense to render the lights/shadows over the background (i.e. sky in my platformer). That would be very unrealistic (you can't really cast shadows on the sky, now can you?) not to mention ugly. For top-down games no stencil buffer would be needed, unless the area that gets lit must be restricted somehow.
This technique allows completely dynamic lights of any shape (like flashlight cones) using one render-to-texture (FBO in my case). The light map doesn't even need to be large, since (at least with soft lights) it's hard to see the difference between 256x256 or 512x512. I'm using 256x256 currently, but even 128x128 looks fine. The system works nicely and I've yet to optimize anything about it: for starters I'm currently rendering each light, no matter if they're actually visible or not!
Overall it suits my purposes perfectly - carefully arranged lighting can make a tremendous difference in the feeling and apprearance of the game. :)
Here's a few sample screenshots. Please ignore all the graphics etc., as the level is just random polygons and lights are literally randomly generated. And the background is lifted off Jewels. :P
Wednesday, October 8, 2008
Long Time No See
Not much coding, unfortunately (or is it unfortunate, don't know really.. :P). The fact is, while the Qt Jambi patch is now out and indeed fixed the problem I was having, I haven't found out the motivation to work on the editor. That doesn't mean I've abandoned the project, not at all. I have these periods when I just don't feel like doing much hobby coding, if any. But no worries, some day I find myself hacking at it like no tomorrow! ;)
Speaking of movies (well, technically at least), I finally updated the movie list with latest additions. Unfortunately I had forgotten most of their purchase dates and prices, so I couldn't add those.. Note to self: enter new movies to the "database" in much shorter time span from the purchase than this. I'm also celebrating my first Blu-ray movie, I Am Legend. It was a nice flick and the picture looked awesome even on my 32" HD-ready TV. Looking forward to having more BRs. ^^ (damn they're expensive, though!)
In other news, I'm still working on my Bacherlor's thesis.. Hopefully I'll get it finished in few weeks tops. That is all for now.
Saturday, August 23, 2008
A quick update..
School starts in September again, yawn. The Qt Jambi update I'm waiting for might also happen in Sept.
Oh, I went to see The Dark Knight again - it was even better this time, like I thought it would. 5/5 it is.. :)
Friday, July 25, 2008
Why so serious?
Sunday, July 20, 2008
Somewhere Back In Time 2008
In addition, I managed to wash my cell phone in 40 degrees Celcius two days ago. It doesn't work any more. :(
Oh, and PolyAnim now has some Java Web Start demos up at http://code.google.com/p/polyanim/wiki/WebStartDemos..
Sunday, July 13, 2008
Inkscape to the rescue!
Once again, Inkscape proved its worth. SVG was relatively easy to parse (except the damn transformation matrix - I wasted hours searching for clues how to decompose the original scaling and rotation from the matrix, finally got it working though..), and the Inkscape layers turned nicely into animation key frames. It requires quite a lot of patience, and my conversion tool is dodgy to say the least, but it will enable the creation of animations for PolyAnim!
So I wasted more hours, and created the very first proper PolyAnim animation, in Inkscape. After seeing the animated dude moving on the screen, I felt very pleased about how it all turned out. :) Rare moments, those. Hell, I even made a video to celebrate the event! ;) In case anyone would want to try the Inkscape route, I also wrote a tutorial about it.
Check out this screen shot from the demo, and compare it to the earlier shot a post or two back.. The biggest dude is the original, the others are rendered using the various render modifiers.
Friday, July 11, 2008
PolyAnim progress..
Okay, there's a bit more. The core library itself is in (somewhat arbitary) versi0n 0.5. Most of the important functionality is in there already. Anchors and different blending modes are still missing. Read more about the current state of features here.
There's still a big mystery in this project, for I have no idea if the code is fast enough for the intended usage (which is game sprites)! The tests I have made are composed only of a few polygons, which is not very demanding.. Therefore I've started the work on the animation editor, using Qt Jambi. But alas, I have bumped into a severe bug, which unfortunately crashes the Java VM. While waiting for that to be solved (the bug fix is scheduled for the next Qt Jambi patch release), I'm wondering what I'm going to do in the mean time.
Should I hack a quick and dirty editor in Swing? Or work on the other (unimportant) parts of the real editor? Implement more features to the library? I don't know, I'd rather not add more stuff to the lib, because in that case the editor's going to have a lot of catching up to do.. :P Perhaps I could throw together a stress test using lots of random shapes.. Hmm..
Or I could succumb to the goodness that is (J)Box2D, like I momentarily did about a week ago. I made some platformer physics tests with it. Good stuff. :) All this is obviously for a grand purpose: finally making a (platformer) game that's perhaps a bit more than just nice and simple 10-30 minutes fun. That's my intention anyway, we'll see what happens.
Friday, July 4, 2008
Introducing PolyAnim!
Too bad there's still not anything nice to show yet.. :P The stuff I have so far is a few hard coded animations consisting of couple of triangles and squares, it's not very sexy to look at, mmkay? But all that will change once I get the editor going and can finally make something cool with this thing. So, be patient. ^^
Just to prove I've achieved *something*, here's an ugly screenshot of the test program. I'd say it looks better when it's animating... I mean, really. Hey, it really does.. *sigh*
Tuesday, June 24, 2008
Getting tired of C++?
I've been further tempted to the Dark Side by my very recent interest in Qt Jambi and LWJGL.. :P I mean, what the hell, is there really anything stopping me of doing the sekrit projekt(tm) in Java, using LWJGL and Qt Jambi for the editor (ooops, slipped that out!)? I think not!
So.. Perhaps we hear more about these shocking developments later on. Perhaps.
*) Incidentally, I'm doing my bachelor's thesis on "Automatic Garbage Collection In Programming Languages".. ;)
Saturday, June 14, 2008
Intellisense in Visual C++ Express, and getting it working with Qt 4.4
Visual Studio Express editions are nice and free, but Visual C++ 2005/2008 Express seem to be lacking in the code completion (or Intellisense as it's officially known) department. If I recall correctly, in MSVC++ 2003 (version 7.1, that is) Intellisense worked perfectly. When writing new code, Intellisense picked it right away, even without saving the source file. I never had any problems with it.
In MSVC++ 2005 and 2008 (Express editions, I haven't tried the full featured versions - although I doubt they'd work any better..), the code completion has definitely taken a step backward. It just doesn't work as nicely as it did in MSVC++ 2003. It seems to parse the source files quite lazily, and sometimes just doesn't work at all. When given a moment, it works again. I've found out that switching between Release and Debug from the toolbar dropdown causes "Updating Intellisense..." to appear in the status bar. That helps, but it's still not very convenient.
As I recently installed and compiled Qt 4.4, I noticed that Qt classes would not be in the code completion list at all. I included Qt's include-directory to the "VC++ Directories" in Options. That wasn't enough. Finally I got it working by including "$(QTDIR)\src" to the "Source files", and listing all the Qt include subdirectories separately in "Include files".
Monday, June 9, 2008
Status update
My sekrit projekt(tm) is proceeding, albeit quite slowly. Today I have coded it a lot, though. It's still too early to be shown - not that there is anything interesting to show in any case.. Not yet. But fear not: I'll write about it once it is developed a bit more. ^^
So yes. I'm still alive.
Monday, May 26, 2008
Plans for summer - Revisited
Right now I'm wondering whether to go with SourceForge like I always have, or to use Google Code. Google Code seems nice and simple, as I'll only need SVN and some pages (or a wiki). And yes, it'll be open source. ;)
Sunday, May 18, 2008
"Jewels" version 1.0 is out
Thursday, May 8, 2008
Qt 4.4 released + plans for summer
Anyway, that's my current plan - things might still change. :)
Sunday, May 4, 2008
Why my stuff is Open Source?
Let's consider an example. Why is Formido available for Windows, Linux, MacOS X, BeOS, Xbox, AmigaOS and even OS/2..? The answer is obvious. Should I have kept it closed source, it'd be for Windows only, and maybe Linux.
Here's another example. Recently I was contacted regarding a bug in Funguloids that prevented it from working with Ogre versions 1.4.6 and newer. I had no idea of this bug, as I haven't personally touched the game since its last release, which uses Ogre 1.4.1. Things have been happening on the community front however, as Funguloids has found its way into Ubuntu Hardy (for which I'm very grateful! :)) After exchanging a few e-mails, the person who reported the bug presented me a patch (an one-liner, even) that fixes the problem. I didn't even get started examining the issue myself! Very nice.
Also, as I have learned a lot by reading source code, I feel kind of obliged to do the same.. I'm not worried about people stealing my code - the code's not that good to begin with. ;)
Monday, April 28, 2008
Why I use Linux more than Windows on these days..
Anyway, I noticed that I needed a key typing sound for the highscore screen where the player enters their name. You know, the old typewriter sound. So, I browsed my earlier game sounds, found a sound, double clicked it. Winamp starts. At this point it occured to me: oh crap! I have Winamp set to playlist looping, which is what I like when I listen to music. However, double clicking a file replaces the current playlist and plays the single file looped. In case of a short sound clip, the sound repeats quite often. It sounds a bit annoying, but that's not the worst effect here.
When Windows finally comes up (that's another thing, it takes ages to start up - although I do have years worth of crap installed, so no wonder..), it presents me a familiar little dialog:
Feels like coming home.
Saturday, April 26, 2008
My adventures with Python / PyQT
As you can probably tell, I'm very impressed with PyQt and the Python language, and I'll be using them in the future as well. =)
Friday, April 25, 2008
I Have No Delete Key
When I press delete, the laptops WLAN led goes on - nothing else happens. When I press it again, the led goes off. [Homer impression:]
Update: Turned out it was a known bug. It works now. :)
So it's finally come to this..
And that's that. I guess this shall do as The First Post(tm).