Game Development Community

dev|Pro Game Development Curriculum

Modernization Kit: Now on Windows!

by Alex Scarborough · 02/28/2007 (11:18 pm) · 16 comments

I think the title explains everything, but anyhow, the Modernization Kit now works on Windows. You should check it out if you're into crossplatform shaders, render to texture, and other such shiny things.


The Modernization Kit is one of the largest free addons to the Torque Game Engine available. It includes crossplatform support for GLSL, Cg, ARB_vertex_program, ARB_fragment_program, and ATI_text_fragment_shader, as well was crossplatform support for render to texture through framebuffer objects and GL vertex buffer objects.

To demonstrate the uses of this code, the Modernization Kit makes extensive modifications to interior and water rendering, including support for parallax mapping on interiors and reflective/refractive water. The Modernization Kit also features a completely shaderized version of the Dyanmic Range Lighting resource which has little to no impact on framerate in most situations.

The Modernization Kit has been designed to be easy to integrate. All modifications to existing Torque code are clearly marked and all major additions are contained in new files in the ModernzationKit directory. Combined with included project files for VC7, VC8, and XCode, integration into a new or modified copy of TGE is a snap.

It's completely free, so download it today!


There's a reason I'm not in marketing you know.

Obligatory image (it's new!)
farm1.static.flickr.com/169/406543229_b4e6280b1f.jpg

#1
02/28/2007 (11:28 pm)
Awesome resource Alex! Most impressive....thanks.
#2
02/28/2007 (11:28 pm)
Great work, GLSL is the way of the future :-)
#3
03/01/2007 (12:52 am)
@Alex: stop fooling people with TGEA screenshots! ;-)

I still haven't found what's going wrong on both my computers.
I recently installed BootCamp (and I'm now running XP on the Mac too), but since XCode is crashing on me each time I try to compile Modern Kit. I suppose my FileVault user space is corrupted at some point.
BTW: I also use FileVault on the iBook... I have to dig in that direction to see what's wrong.

Is anyone else running FileVault and Modern kit?
#4
03/01/2007 (1:29 am)
Looks great.
#5
03/01/2007 (1:56 am)
Looking good :)
#6
03/01/2007 (6:54 am)
Great stuff Alex!
#7
03/01/2007 (8:54 am)
Alex....You ROCK!
#8
03/01/2007 (9:06 am)
Alex, you are my hero!

Thanks a lot for sharing this with us, it's very generous of you!

I just wonder if this kit can speed up the TGE 1.5 lights a bit caused by the Lightning Pack?
I like TGE platform, but the TGE 1.5 performance is a show stopper for me now (as well as the absence of OpenGL support in TGEA).
#9
03/02/2007 (4:39 am)
Alex thats what I love about the garage games site, you've always got someone who releases something very useful to everyone and just gives it away. Cool very cool man,
Thanks
Mal
#10
04/23/2007 (1:38 pm)
Nice work
#11
05/24/2007 (1:05 pm)
For TGE 1.5.2 ???

^_^
#12
05/31/2007 (3:19 am)
@Andrea: Until Alex releases the next update, you can merge it in yourself and it should work perfectly. It does not take much time, as most of the files can just be overwritten, assuming you are merging into a fresh installation of Torque. The only files that you need to merge manually, at least for Build 0010 of the modernization kit (with a tool such as WinMerge, etc) are: core/torqueConfig.h, gui/core/guiCanvas.cc, interior/interior.cc, interior/interior.h, interior/interiorRender.cc, lightingSystem/sgLightManager.cc, math/mathUtils.h, terrain/waterblock.cc, and terrain/waterblock.h . For script, all of the files apart from demo/main.cs and starter.fps/main.cs can just be overwritten (these two files should be merged manually).
Again, this is for Build 0010 of the kit, so it might not be valid for future versions.
#13
05/31/2007 (2:54 pm)
OK very good I test it !!! Thanks very much !!!

^_^
#14
07/03/2007 (2:38 pm)
I used Beyond Compare 2 and merged Build 0010 with a clean version of 1.5.2 and it worked great. Thanks for the wonderful resource, Alex!
#15
08/19/2007 (1:18 am)
@jason
To add to Alex's comments about the differences.

The kernel is mainly BSD, with Mach IPC primatives and memory management. (FreeBSD uses the Mach memory model also) The BSD portion handles POSIX, permissions, networking, etc. It is a hybrid kernel, as is NT, while Linux and regular BSD are monolithic. Porting from Linux cannot be done as easily as one may think. Leopard is UNIX certified, and follows several POSIX standards, and FreeBSD's main goal is to follow them as well, although it isn't certified as it's an open-source project. Linux follows absolutely no industry standard throughout distros, and so far none of the collaborative efforts are working to stabilize the ABI. It's fully possible if you're using ANSI-C code, but any OS-specific API's, especially X11 OpenGL extensions must be taken into consideration. The "WindowServer" aka Quartz has several Apple GL extensions, and one can see them by running OpenGL extensions viewer or by tweaking various aspects of TGE.

Linux uses X11 with OpenGL extensions provided by either Mesa or the graphics card vendor (NVIDIA/ATI) Images are typically drawed directly like with DirectDraw/GDI on Windows 2000/XP unless you use a compositing window server. (Which is a modified X11 server with offscreen rendering)

Macs use Quartz to draw and compose offscreen (Could be compared to Beryl but predates XGL/AIXGL by a few years) and is much more integrated and compatible throughout. OpenGL applications don't all play nicely on top of AIXGL. Quartz is a Postscript-like rendering server developed originally in NexTStep, but is now free of Adobe license obligation. The WindowServer like many applications is multithreaded, where non-compositing X11 on UNIX is more monolithic, putting the threading requirement on the applications themselves, not the server itself, although this has changed lately with modular X.org. The Engine runs on top of the Window Server's 3D rendering layer which is on top of the 2D layer running alongside other subcomponents, such as Java, Carbon, and Cocoa, which although technically foundations are always present throughout the system. TGE mainly abstracts on top of the renderer regardless of the server, as long as a common set of core GL extensions are present.

As for porting, just don't use #ifdefs all over the place, don't assume integer sizes or byte ordering if you intend to provide changes to PowerPC users, and trust me there's still tons of them. Porting from Linux to OSX is fairly easy, at least if one compared the difficulty of porting Windows to UNIX-like systems. Essentially the modern servers operate in a similar fashion, but the details differ and each have features that you must be sure and not use unless you have a single platform target.

Thanks Alex for such a cool "kit"
#16
09/05/2007 (12:45 pm)
Looks awesome!!!! Has anyone tried it with AFX and TGE 1.5.2, would appreciate any feedback.