Page 3 of 19 in Python to allow game administrators to customize their servers with new objectives and newgameplay rules. Many other games allow for extensions written in C++.Popular games that do not have a vendor-supplied extensibility model often find that one is provided forthem. For example, the original
Counter-Strike
game did not include an SDK, but community hackersdeveloped plugin hooks via a project called
Metamod
that allowed server-side customizations.
Source-based Games
Overview
Half-Life
by Valve Software was one of the most popular first-person shooters of all time. The
game’s
physics and graphics engines became a prolific basis for new content in the gaming community. Popular
games (or “mods”) like
Counter-Strike
.After the success of the Half-
Life engine, Valve began work on their “Source” game engine, whi
ch wasfirst released in 2004 with
Half-Life 2
and
Vampire: The Masquerade
–
Bloodlines.
(Interestingly,
Bloodlines
embedded its own Python interpreter to control some story elements, goals, and entityinteractions.)
Counter-Strike: Source
was released for the PC in late October 2004 and has grown anaudience nearly as large as its predecessor.
Source Server Plugin Model
The Source engine was released with the Source SDK
–
a development kit for the PC which providedsource code and tools to create mods for Source. In addition, it included a C++ interface for creatingserver-side plugins for games written on the engine. This paper discusses one such plugin, EventScripts.Server-side plugins for Source are driven primarily by callbacks and event notifications. These C++projects implement the IServerPlugin interface and the engine uses that to deliver interface factoriesand general callbacks as the game progresses. (2)When the server starts, the engine enumerates the
game’s
addons
folder and loads any plugin DLLsfrom that directory. Each plugin is given a turn to use interface factories to access global servicesprovided by the Source engine. For example, the Source engine provides the following services accessedthrough interfaces:
Player information lookup
Generic visual/sound effects
Registering console commands
Registering new and adjusting existing server variables (e.g.
sv_gravity
to adjust simulatedgravity)
Physics engine interaction
Basic entity manipulation
Bot and player manipulation
Leave a Comment