LWN.net Logo

Python slithers into Wesnoth

Python slithers into Wesnoth

Posted Jan 18, 2009 20:32 UTC (Sun) by zlynx (subscriber, #2285)
In reply to: Python slithers into Wesnoth by massimiliano
Parent article: Python slithers into Wesnoth

I believe Quake2 used native code DLLs and .so files.

But in general you are right. Using an interpreter gives the game better security, portability and error recovery.


(Log in to post comments)

Python slithers into Wesnoth

Posted Jan 18, 2009 21:01 UTC (Sun) by massimiliano (subscriber, #3048) [Link]

Oh, you are right, I was forgetting Quake 2!

But for Quake 3 they got back to the VM approach... with a twist: the language was C (plain, old C), but they had a compiler from C to bytecode, and an interpreter able to execute that bytecode.
So the game was able to execute game logic either in native form (C compiled to a shared object), or in bytecode form, where the bytecode was produced from the same source files...

...which tells a lot about the fact that they really, really wanted a VM to solve the safety and platform compatibility issues for game mods. They decided to use a VM even if they preferred the C language for game logic!

Have fun,
Massi

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds