CLICK HERE to visit the new NS2 Wiki! Please do not rely on any information here as it may be inaccurate and/or out of date! For help with NS2, hop onto the official Discord server!


From NS2 community wiki
Jump to: navigation, search

NS2 will use Spark, a game engine developed by Max.


A preview of the engine can be seen in the Fifth Videocast and the Teaser Trailer.

The engine uses dynamic lighting and shadows consistent across everything in the map.

The engine uses Direct3D (Forum post by Max), DirectX 9 (Forum post by Max), and shader model 2.0 (readyroom interview).

Motion blur is implemented in the cinematic tool and may be used in the game (Forum post by Max).

Cameras can be attached to models (cite, explain what this means).

Occlusion culling is hardware assisted, done in real time, using an implementation of the CHC++ algorithm. This method suits both indoor and outdoor environments, reducing the limitations on the types of game mods that can be created (Blog Post, Forum post by Charlie).

Dynamic Infestation

The engine supports a gameplay mechanic called Dynamic Infestation which is a dynamically expanding and contracting mesh.

Main article: Dynamic Infestation.


The HUD was using the popular Flash format. Note: the engine will not use the Adobe Flash Player, but rather something like GameSWF or a custom interpreter (Forum post by Max).

Flash was determined to be causing various issues and slowdowns. The main menu, and marine HUD have been switched away from flash. The alien HUD and other areas are still being changed over.

Gameplay Code

Gameplay code is written in the Lua programming language.

Main article: Lua.


According to Engine questions and answers it features built-in support for PhysX and Bullet.

Networking Code

Uses a custom code borrowing ideas from Half-Life and Quake 3 (Forum post by Max).


Uses the FMOD audio library (readyroom interview), and the OGG audio format (Forum post by Max).

It will have hot-loading. This means, when you change the sound file you can hear the changes immediately in-game. (Twitter post)

Game Engine History

The team initially planned to use the Source engine and the switch to the custom engine was announced in July of 2008 (Podcast #26). Three months prior to the announcement the feasibility study of switching engines had started, with Max adding player movement to an existing "Maxor" engine that he been developing for a few years for other purposes. At the time of the announcement the custom engine was said to already be past where they were with the Source engine, and specifically the following elements were already implemented: graphics, gameplay code, physics, networking, player movement, ragdolls, and model animation.

The reasons for the switch were:

  • Limitations of the Source engine.
  • The large amount of work needed on the Source engine to get it to suit the needs of NS2.
  • The longer development times needed when working with the Source engine. For example, dynamic lighting means no pre-computation when developing maps, allowing the developer to instantly see changes rather than waiting for compilation.
  • Unfamiliarity with the Source engine.
  • Business considerations of the toolchain.

External Links