just wanted to let you know that I yesterday finished revising the Ca3DE in-game console. The console is entirely based on Lua now (see http://www.lua.org for details), plus I've revised the code thoroughly again, and finally obtained a new, clean and beautiful concept for console variables and functions that I'm very content with, and I'm convinced that it is very viable for the future.
Thanks to Lua, the new console is very powerful now, you can format the harddisk and reprogram your OS from the Ca3DE in-game console now if you wish.
Also, a bit of familiarization might be involved, as the new console functions have been moved into their own namespace (a Lua table) "cf", and the variables have been moved into namespace "cv". That is, new console commands look for example like this:
Code: Select all
cf.help(); -- prints a help message, the ; at the end is optional.
cf.list(); -- lists all available Ca3DE console functions and variables.
cf.list("sh"); -- lists all available Ca3DE console functions and variables that match the pattern "cv.sh*" or "cf.sh*".
cv.showFPS=true; -- sets the value of the cv.showFPS variable to true.
cv.showFPS=1; -- same as previous line.
print(cv.showPos); -- prints the current value of the cv.showPos variable.
cf.quit=1; -- quits the game.
Interestingly, the DirectInput part of DirectX is - by design - not able to provide character codes for the keys that have been pressed, it just provides codes for the physical keys. The proper solution is to use the regular WM_CHAR messages of the regular Win32 API instead, and I'm currently in the progress to change the Ca3DE keyboard input handling appropriately.
Even more surprisingly, even Microsoft discourages the use of DirectX for keyboard and mouse input these days: Here is a quote from http://msdn.microsoft.com/library/defau ... vement.asp
Well, let's get back to work...DirectInput is only useful for reading data from DirectInput joysticks; however, if you only need to support the Xbox 360 controller for Windows, then use XInput instead. Overall, using DirectInput offers no advantages when reading data from mouse or keyboard devices, and the use of DirectInput in these scenarios is discouraged.