When discussing coding versus scripting, you know that scripting gives you the possibility to implement a lot of functionality without changing code. As you already learned in the previous chapter, you can easily add new entities and implement the behaviour in Lua. You can manipulate AI, script your UI, or use the Flow Graph to create game logic. But you are always limited to the functionality that is exposed to Lua/Flow Graph. Also, Lua is always slower in performance than C++.
With C++ there are no limitations, but be aware, if you create a bug in your script you might not get the expected result—a bug in C++ can easily crash the whole game!
In this chapter, you will learn how to use Visual Studio Express Edition to compile and debug CryENGINE 3. Further, you will learn how to expose new functions to Lua by writing code with C++.
In this chapter, we shall:
So let's go and write some code!
Programmers basically rule the world when it comes to game development. For this reason, having C++ game code released in the Free SDK for CryENGINE is an invaluable tool. I encourage everyone to download the freely available Visual C++ Express to, at the very least, explore the provided game code. This game code is designed to be a template to create your own games and has a huge array of possible functions.
3.14.251.128