Game Development Community

Using TMK in script

by Daniel Buckmaster · in Torque Game Engine · 12/20/2007 (4:24 am) · 1 replies

I've got my own game working nicely, based off tutorial.base. How do I add MK support to this? I've got the MK compiled, and it works beautifully in starter.fps, but what scripting hoops do I have to jump through to get the bloom and normal mapping working? I've added the DRL:: stuff in main.cs, and normal maps are being auto-generated, but my DIFs are still normal, and no DRL/bloom stuff is going on.

EDIT: Okay, I'm a tool. If you're trying to do the same thing, add in the console:
MaterialManager::setShaderQuality(500);
DRL::enable(1);
DRL::setBloomQuality(3);
Might be nice to load some preferences into those so you can turn it off for lower-end PCs.

About the author

Studying mechatronic engineering and computer science at the University of Sydney. Game development is probably my most time-consuming hobby!


#1
01/03/2008 (1:20 pm)
I've been looking into the TMK, but I haven't added it yet, so here's a possible solution to your last question. I did this with the CG Gamma and water upgrade, and it works. If you can find a place in the TMK that reports an error based on client specs (not good enough, old graphics card, etc) than you could add Con::executef(1, "badSpecs"); and in the script
function badSpecs() {
   MaterialManager::setShaderQuality(50); // < No clue what these should be
   DRL::enable(0);
   DRL::setBloomQuality(1);
}