wiki:AngerGameLocationStructure

Location File Structure

Basics

ANGER comes with 2 official game modes (campaign & survivor) and a special 3rd mode we use for the ANGER tutorial.

Those 3 modes have 1 in common - the basic file structure (or at least some elements) - which will be explained in the following lines.

All files are plain text - feel free to open & edit them. We would love to get extra-scenarios by the community.

Files

FILENAME FUNCTION PATH
locations.loc controls campaign-mode /data/locations.loc
survivor.loc controls survivor-mode /data/survivor.loc
tutorial.loc controls tutorial-mode /data/tutorial.loc

Things in common

  • We need to spawn enemies in all 3 modes
  • We need to display a background
  • We need to display a skyline
  • We need to display trees
  • anything else?




Campain (locations.loc)

Campaign Basics

This file contains the definition of

  • Location-Name (a location can contain several stages)
  • Stage-Definition
  • effect per stage
  • tree per stage
  • background image per stage (.png)
  • enemies per stage
  • available weapons per stage

So a location with 2 stages could look similar to this

LOCATION:01 - The hello world thing
weapon:1=true

STAGE
effect:snow
tree:100*1.0,450*0.8
player:400
text:Introducing Parachute Soldier@center,2000
text:TUTORIAL@top,1000
enemy:1*normal@bottom,2000/350-450
background:bg_old_01

STAGE
effect:snow
tree:50*0.9,250*0.8,550*1.0
player:400
enemy:2*normal@player,0
enemy:4*normal@player,6000
enemy:4*normal@player,12000
enemy:4*normal@player,12100
background:bg_old_01

Campaign Details

Location related

  • location:
  • briefing:
  • weapon:

Stage related

  • effect:
  • tree:
  • player:
  • text:
  • enemy:
  • background:
  • skyline:
  • shoot: (used for tutorial)

Tags

location:
LOCATION:insert_your_campaign_name_here
briefing:
briefing:filename_with_extension_to_be_loaded_for_location_briefing

Only the filename without path. The path will be fix data/images/briefing

weapon:
weapon:number=true|false

Activates a specific weapon for this location.


effect:
effect:<effect>

where <effect> is one of

  • rain
  • night
  • snow
tree:

Tree definition is valid only in a stage. Single tree at x-pos = 100

tree:pos[,pos2,...]

A scale factor can be defined for each tree (optional).

tree:100*1.2,150*1.8

This will generate a tree at 100 with a scaling factor of 1.2 and one at 150 with scale factor 1.8

Additional a bitmapname can be specified to use a different shape. tree:<position>,<size>@<bitmapname without path but with extension> e.g.

tree:400*0.8@tree02.png

player:

Note: the player position is required for enemies so ensure that this is placed before the first enemy tag.

player:x-position
text:

This should only be used for tutorials!!!

text:text_to_display@<postion>,<starttime>[,<layer left position>,<layer top position>, <layer right position>, <layer bottom position>]

where <position> is one of

  • center
  • top
  • bottom

<starttime> is the time when the text is displayed the layer positions are optional <layer left> left position of layer <layer top> top position of layer <layer right> right position of layer <layer bottom> bottom position of layer

shoot:
shoot:<flag>,<seconds>

where

  • <flag> is "yes" or "no"
  • <seconds> seconds after start to set the ability
enemy:
enemy:<count>*<type>@direction>,<wait>/<begin>-<end>

where

  • <count> is number of enemies to add
  • <type> is "normal", "kamikae", "freeze", "smoke", "freefall", "medipack", "helicopter" or "tank"
  • <direction> is "player", "bottom" or "jink"
  • <wait> is the time to wait in ms

The following items are optional

  • <begin> is pixel area start
  • <end> is pixel area end

Note: In case of a helicopter the number of enemies defines the number of freefall soldier dropped from ONE helicopter.

background:
background:filename_without_extension

Only the filename without path. The path is fix data/images/bkgnd

skyline:
skyline:filename_without_extension

Only the filename without path. The path is fix data/images/bkgnd


Survivor (survivor.loc)

For the survivor-mode we have to define how the waves are growing.

  • skyline is random-select on launch

Example survivor from 0.5.21:

LOCATION:SURVIVOR MODE
weapon:1=3
weapon:2=5
weapon:3=10
weapon:4=15
weapon:5=20
weapon:6=1
weapon:7=1
weapon:8=1

STAGE
tree:100*0.5,120*0.7,300*0.8
skyline:skyline_05
player:200-600
background:bg_yellow

# wave idea: 
#	1 wave at:		 10.000
#	each new wave at:	+20.000
#

# at bottom
spawn:normal@bottom,10000,3,20000,1
spawn:freefall@bottom,70000,2,20000,1
spawn:smoke@bottom,110000,1,80000,1
spawn:kamikaze@bottom,150000,1,20000,1
spawn:medipack@bottom,50000,1,20000,1
spawn:suicide@bottom,210000,1,40000,1
spawn:stealth@bottom,310000,1,40000,1
spawn:tank@bottom,410000,1,100000,1

# at player
spawn:normal@player,10000,1,40000,1
spawn:freefall@player,90000,1,40000,1
spawn:freeze@player,510000,1,100000,1
spawn:stealth@player,310000,1,40000,1
spawn:kamikaze@player,350000,1,100000,1 




Tutorial (tutorial.loc)

The tutorial is overall similar to our campaign-file (locations.loc) above - but in addition we can enable/disable the main-weaponusing the shoot parameter.

Example tutorial from 0.5.21:

LOCATION:TUTORIAL
briefing:location_briefing.png
weapon:1=1
weapon:2=-1
weapon:3=-1
weapon:4=-1
weapon:5=-1
weapon:6=1
weapon:7=-1
weapon:8=-1

STAGE
tree:100*0.5,120*0.7,300*0.8
skyline:natur_03
player:400
background:bg_green

text:\bWelcome \bto \bthe \bANGER \btutorial!\n\nYou gonna learn the basic elements in the following dialoges\nIt's on you to jump from hint to hint via the <SPACE>-key\n\nGood luck & have fun@center,0
text:\bGame \bStructure\n\nANGER comes with two game-modes\n* campaign\n* survivor@center,0
text:\bCampaign-Mode\n\n* The campaign-mode is scripted\n* Each campaign takes place on a specific location\n* Each campaign is splitted into several (usual 5) stages\n* You will earn money during each campaign\n* You might gain new weapons after finishing a campaign\n* Your target is to finish all campaigns@center,0 
text:\bSurvivor-Mode\n\n* The survivor-mode is a single auto-generated stage with waves of enemies\n* Your target is simple - survive as long as possible@center,0
text:\bPlayer\n\n* The player is located in the truck\n* The truck drives into the each scene to start the current stage\n* You can skip this driving animation via the <ESC>-key\n* You control a gun mounted on the truck (crosshair) with your mouse\n* You fire the gun via <LEFT-MOUSE>@center,0
text:\bInfobar\n\nThe upper info bar gives insight about your current status:\n* score\n* money\n* bullets (<RIGHT-MOUSE> to reload)\n* Outstanding enemies\n* location (campaign and stage)\n* health\n* mute sound@center,1000,5,5,795,35
text:\bWeaponbar\n\n* Below the ground you might see some weapons appearing\n* Weapons do cost money\n* There are 2 types of weapons (single event weapons vs towers)\n* Left aligned event-weapons are cheap and single events (reload time)\n* Right aligned weapons (towers) are more expensive but do shoot constantly\n* Towers are placed on ground by player (crosshair)\n* Towers do have a health bar - so protect them agains enemies at the ground\n* Towers lifetime ends with the end of the current campaign@center,2000,5,530,795,595
text:\bGameplay\n\n* Enemies do come from sky\n* Enemies can land on ground\n* Enemies will target on ground or player\n* Don't let them touch you\n* Defend your truck at all costs!@center,3000
text:\bEnemies\n\nThere is a first enemy-wave coming\n* There are different types of enemies you gonna see during the game\n* Shoot the enemy (<LEFT-MOUSE>) or using a weapon effect / tower before he reaches your truck\n* Remember to reload regularly (<RIGHT-MOUSE>)@center,3500

shoot:no,0
shoot:yes,4000

enemy:1*normal@bottom,4500/100-150
enemy:1*smoke@bottom,5500
enemy:1*freefall@bottom,5500/50-200
enemy:1*normal@player,6500