I'm currently preparing the first release candidate (RC1) of the upcoming release when I noticed two nice features that I'd like to share with you:
- I've just (re-)added support for wireframe-rendering and other rendermodes again. Wireframe mode etc. has been missing since the introduction of the MatSys, and it took until now (MatSys complete, ConsoleInterpreter complete) to add this nice feature again:
http://images.ca3de-community.de/main.p ... temId=2025
This is achieved with the new console function forceRM(matname), where matname is the name of a material that should be enforced for all rendering. For example, the upcoming release includes a material definition named "wireframe", and thus the above example screenshot was taken after this console command:In order to turn off the material force mode again, just use forceRM() without any parameters.Code: Select all
forceRM("wireframe");
The same technique works of course also with other materials, e.g. the following examples shows the pure lightmaps:Code: Select all
forceRM("Textures/generic/_white");
- It is possible to re-load map/entity scripts while the map (and of course the engine) is running, no interruption or reloading required!
This is easily achieved with the runMapCmd() console function, that runs any Lua statement in the context of the map/entity script. Therefore,loads and runs the TechDemo.lua script once more in the context of the currently loaded map script.Code: Select all
runMapCmd(" dofile('Games/DeathMatch/Worlds/TechDemo.lua') ")
This of course makes the most sense when Ca3DE is running not in full-screen, but in windowed mode (use the -nofs command-line paramater to achieve this), and you have a text editor with the TechDemo.lua script opened in parallel.
After saving your changes in the text editor, simply ALT+TAB to Ca3DE again, type the above command (or just press arrow up to repeat it from the command history), and all statements are run again as during map initialization, so that your changes become immediately effective.
This technique preserves most of the current script state, btw., it does not do a full map re-init from scratch. Sometimes the situation is hopeless though (e.g. barrels already exploded, enemies already dead), in case of which a full map restart is preferrable.
Oh, and if you think that the above is too much to type over and over again, and TAB completion and command history is still too much work involved, there are several solutions for this problem. For example, you might write something likeinto the config.lua file that is introduced with the new release. Then you can just enter r() into the console as a shortcut. Much better, isn't it?Code: Select all
function r() runMapCmd(" dofile('Games/DeathMatch/Worlds/TechDemo.lua') ") end
Another alternative is to put a shortcut function into the TechDemo.lua file itself. for example my TechDemo.lua file has this piece of code near its top:so I type runMapCmd("reloadscript()") for reloading the script. Not as convenient as the above variant, but easier to remember and type than no abbreviation at all.Code: Select all
-- This function reloads and runs this very script again. -- Useful for working with and testing scripts "online", -- i.e. while the engine is running and without reloading the map! function reloadscript() dofile("Games/DeathMatch/Worlds/TechDemo.lua"); end
Finally, here is an example screenshot:
http://images.ca3de-community.de/main.p ... temId=2027