Urban Assault

This was our final group project for Scripting 3 at University. The brief was to create a level in which the player moved through an urban environment escorted by a squad of NPC allies towards a goal at the end of the level. Along the way, they were to fight groups of enemy NPCs, proceeding only when all members of a group had been eliminated.

Ordinarily, this would have been a simple brief, but the game we were to use was Unreal Tournament 2004, which was designed primarily as a competetive multiplayer game – the AI is ill equipped to support things such as stationary ambush enemies, or allies which simply follow the player in a squad.

Fortunately, one game mode in UT2004 was “Invasion”, which pits all human players in the game against wave after wave of enemy NPCs. The bots used for this are far simpler than those designed to emulate human players, and they do nothing except stand still when there are no enemies within range – except for one problem. To prevent them from standing around idly, they are coded to teleport to the location of the first player they can find and attack: I had to alter this functionality before they worked as intended. Once this was done though, it  was a far more elegant solution than that which had been suggested by our lecturer, which was to simply have all the enemies run by individually scripted sequences.

The allied squad members though were run as suggested – editing the AI of ordinary bots to have them follow the player was beyond my abilities in the space of time we had, and so I simply scripted their AI to follow the player along a simple route, proceeding to the next point when the game registered that all enemies in the current group had been killed.

I also had to edit the weapons carried by the player’s allies to ensure that they never ran out of ammo – in early versions of the map, they’d fight the first group of enemies, then charge at the second group and stand there uselessly while their guns clicked on empty chambers.

The level itself wasn’t terribly impressive looking, but the focus was intended to be largely on the scripting side of things, and so we were able to produce only a passable piece.

Advertisements
Published on January 7, 2010 at 11:04 am  Comments (1)  

One Comment

  1. […] Urban Assault ~ Published […]


Comments are closed.

%d bloggers like this: