Some KP screenshots & a gameplay code rant
Some screenshots of what has been going on in the KP world recently:
http://www.codercorner.com/Pictures/KP_Mortar.jpg
http://www.codercorner.com/Pictures/KP_Helico8.jpg
http://www.codercorner.com/Pictures/KP_Helico3.jpg
http://www.codercorner.com/Pictures/KP_Helico11.jpg
http://www.codercorner.com/Pictures/KP_Explo06.jpg
http://www.codercorner.com/Pictures/KP_Explo04.jpg
http://www.codercorner.com/Pictures/KP_Dialog02.jpg
http://www.codercorner.com/Pictures/Depot03.jpg
I know, not really next-gen looking. But hey, that’s fixed function pipeline and I’m the only “artist” involved, so back off. Currently trying to do nice looking explosions without killing the fillrate.
Also trying a “boss fight” against an helicopter. It’s a 2-parts fight where you have to finish it off by deflecting mortars shot at you from the helicopter - a bit similar to what Hibana was doing to missiles in Nightshade.
At Grin, one guy once told me something like “trust me, you don’t want to implement gameplay code in C++”. He meant we should only do it in LUA. I think I disagree. Using a scripting language does not necessarily translate to better gameplay, as the recently released Grin games unfortunately proved. For me, using LUA gave me the feeling I was programming with my left hand, while the right one was tied in my back. No power, and kind of awkward. Using C++ and having access to the full engine anytime gives me a lot more freedom and a lot more control. Going back to C++ gameplay code after one year of LUA in Wanted is incredibly liberating.
As for the argument that LUA scripts give faster iteration times because you can reload them without leaving the engine, well, there is some truth to this but it comes with the proverbial grain of salt. If you put your gameplay code in a separate DLL, there is not much difference in the end between your “game” and, say, a custom format plug-in for Flexporter. Remember Flexporter? Did you have to shut down 3DS MAX to compile your plug-in and try your changes? Nope, you just had one button to press in Flex. How long did it take to recompile your custom format plug-in? Exactly : something like 2 seconds. Iteration times for developping your own format plug-in in Flex were super fast. Well there is no difference with KP. Flexporter is the game engine, the format plug-in is Konoko Payne. It does not compile as quickly as a real Flexporter format plug-in because, of course, there is more code in a “full” game, but the idea is the same, and the iteration times are fast. Sometimes way faster than what we had at Grin.
June 19th, 2009 at 2:23 am
I agree with that gameplay code in Lua vs. C++ too. Every engine I have worked with has certain places where you are not able to reload your scripts… specially if they are using some sort of inheritance. Game code in a dll is one option another one is Edit and Continue in Visual Studio.
I think the best justification for Lua I’ve heard so far is that “it allows you to do ugly, nasty things, because Lua looks more like data than code”
July 2nd, 2009 at 2:27 am
I agree too but I think language like C#/Java will became more used for main game loop and scripting with critical algorithms (like AI, Physics ..) in C++. Like epoch of C and ASM.
I don’t like this, I’m a C++ coder, but now I see young coders to choose C# instead of C++ ….
August 11th, 2009 at 10:33 am
I must note that the original Oni had a Cesqe scripting language that was not compiled in. It had one advantage in that anyone could use it without directly knowing C, meaning better modding capabilities. However, it is only 8 or so years later that we are finally able to add in new scripting functions using engine hacks.