Quake 4 SDK: what's the source code for?
How does the Quake 4 SDK work? Is it for scripters/modders, or is it for programmers? both? I ask because I downloaded the Quake 4 SDK, and it comes with a visual studio solution file. I opened it, built it, only to find that the output file is a .dll, not a .exe. What is this dll for?
Another question: with the scripting language for Quake 4, is it possible to call functions that are in a dll? Not the dll that was generated, but say: I made a .dll with some functions embedded in them, then called them from Quake 4's scripting language.
That source code builds gamex86.dll, which is a majority of the lower-level game logic - for the most part physics, entity interaction, AI, and the scripting interface.
The script language cannot call arbitrary functions in arbitrary DLLs. However, that is why you have the source code to the game DLL - you can add functions to be called from scripts. There's virtually no documentation, but I'll give some hints from what I remember:
- idEventDef has a lot to do with exporting functions to scripts.
- the EVENT and CLASS macros have a lot to do with the game's RTTI information, which is used to export classes to scripts.
- look up Script_Thread.cpp (I'm not sure on the file name...you'll know it because it has a load of idEventDef definitions at the top) for all of the core function implementations.
The most I can also offer is a suggestion on how to follow the code. Search for script function names you're familiar with and look at how they're implemented - I believe you need to define an idEventDef separate from the function, but writing the function is trivial.
Again, this is, to my knowledge, not documented anywhere, just what I remember from browsing the code.
The script language cannot call arbitrary functions in arbitrary DLLs. However, that is why you have the source code to the game DLL - you can add functions to be called from scripts. There's virtually no documentation, but I'll give some hints from what I remember:
- idEventDef has a lot to do with exporting functions to scripts.
- the EVENT and CLASS macros have a lot to do with the game's RTTI information, which is used to export classes to scripts.
- look up Script_Thread.cpp (I'm not sure on the file name...you'll know it because it has a load of idEventDef definitions at the top) for all of the core function implementations.
The most I can also offer is a suggestion on how to follow the code. Search for script function names you're familiar with and look at how they're implemented - I believe you need to define an idEventDef separate from the function, but writing the function is trivial.
Again, this is, to my knowledge, not documented anywhere, just what I remember from browsing the code.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement