4 ms·
"I think the trap people fall into is to have things be overly specific in the name of optimization they never get to achieving anyway." Yes I agree, writing a
by samiv 2y ago
"I think the trap people fall into is to have things be overly specific in the name of optimization they never get to achieving anyway."
Yes I agree, writing a specific functionality in the engine does allow for more optimal performance but the tradeoff is that it's more brittle and more complicated to write and maintain.
My personal approach has been to do the first principles and avoid writing use-case specific features in the engine as much as possible but provide more fundamental functionality that the game then combines to create the desired effect.
That being said I've still had to do some concessions and move stuff like simple constant velocity game object integration to the engine side simply because the perf difference between native code doing that vs Lua code are just too massive.
- hedvig23 2y agoA question then, I have run some game servers in my time that had quite advanced console options and scripts to run, in Lua, which I then saw as maybe the most common language in this area. But I wondered where and why Lua which is its own full language was kept to a certain part of the game and running instance, and where the other runtime and the games main language differed. How is that division of responsibility separated or chosen I guess?
- samiv 2y agoThere's no single answer to this, it all depends on the game, the engine and the team(s) executing the engine and game. Some typical ways to divide this though is Some org has "engine" team and "game" team. Engine team implements features in the engine itself and game team implements game specific features using the embedded scripting language. Engine features are game agnostic and game features are specific to games and are scripted / built-on top of the engine features. But sometimes things get muddled as general purpose engines are used in games that require specific features in the engine itself. Typically the decision is then made by a) what kind of feature and how does it fit in the architecture of the engine b) what are the performance requirements c) who is willing to do the work and maintain it