Use scripting languages in gamedev? It depends

What does the game or game developers gain (or lose) when having scripting language in the game?

Some games use scripting language to build gameplay code but some do not.

By scripting language I mean dynamically loaded bytecode or code that is compiled during runtime through interpreter or JIT engine. I go through some of the pros that first came to my mind.

Fast gameplay code iterations. It’s quite easy to implement script code reloading to enable much faster turnaround for code change. That can be also done remotely for example to a game running on a phone.

Modding and sandboxing. By giving end users possibility to easily change gameplay code, it can generate strong community around it. Scripting language also gives possibility to sandbox execution context for improved security and prevent crashes. For example Roblox combines these two and sends user created mods through the netcode.

Coding is easier. Often scripting languages such as lua implement memory management through garbage collection, this combined to the fact that scripting language is simpler than C++ can make gameplay coding more pleasant and productive.

What about the downsides of scripting language?

Need to implement a bridge between engine and gameplay code. That also means thinking how to send and receive messages between the layers or deciding how much of the game is implemented in the scripting language.

Another language to think about. A context switch has to be made when jumping across engine and gameplay code.

Poor debugging support and development experience. All big languages have lot’s of tools like IDEs and debuggers build around them. Those are probably lacking for the scripting language.

Low performance. Scripting languages are slow and they need to be interpreted on consoles and on iPhone, so performance is at least an order of magnitude slower compared to native code.

Thinking about my own gamedev projects, I would only implement scripting language when your main language doesn’t support hot reload during runtime. And/or when I want the game to be as moddable as possible. And maybe I would only choose little parts of the code that I want to be dynamically modified instead of trying to force generic scripting implementation on top of game engine.

Thoughts on cheating in multiplayer games

I just watched video by g0at on Escape from Tarkov cheating issue, The Wiggle That Killed Tarkov. I haven’t played Tarkov myself, but it seems that it’s the perfect game for cheating: you don’t need to kill anybody to progress or if you want to kill somebody, you can do it easily without being suspected as a cheater. Also I guess it’s running on C# on mono backend, so reverse engineering the data structs and pulling out data for ESP or aimbot seems very easy, so there is probably a plenty of cheats available for Tarkov. The Tarkov developers don’t seem to be bothered with cheaters as the client knows everyone’s location even though they wouldn’t be rendered. That would also ease out the networking bandwidth and improve the Tarkov’s “netcode” overall if they would just bother to cull the players server side.

I don’t think cheating in multiplayer games is justifiable in any condition but think there a many reasons to cheat:

  • Want to be better than everybody else.
  • Monetary gain for winning or selling looted items.
  • Notoriety.
  • More fun (for the cheater).
  • It takes away the feeling of anxiety of dying or getting wrecked.

Seems that cheat makers make a good money. It’s quite mind boggling to me that someone is ready to pay a hefty monthly fee often more expensive than the game for a cheat. So cheat market is thriving, I think better than ever. I just shudder to think about running an .exe from cheat maker on my local machine. For cheat maker it’s probably quite fun to crack open the game and pull out the data. Reverse engineering is always a thrill!

I think there is one solution for cheating, allow and embrace it. But would that make a game fun anymore? Probably not and that would be a match between the best cheat makers.