OK here goes the final instructions for using your own graphics in this game.
Option 1:The Easy way
Download the zip and change bullet.png,health.png,player.png etc. to be your own images (they are in the files folder). Don't mess with the xml file at all. Double click Main.swf and the game with your new graphics will run.
Option 2:Pretty easy way
Say you want to do the same as above but instead of only having 1 enemy image as I have you want multiple types of enemies. Drag all your enemy images into the files folder now open up the file test in a text editor. You will notice that there are tags called <image>. Change those to be the correct file for example say you wanted to change the sin wave enemies to a image called sinEnemy.png. you would change line 22...
<Actor>
15 <Type>Generator</Type>
16 <vely>4</vely>
17 <wait>50</wait>
18 <movement>sinWave</movement>
19 <shoot>singleShot</shoot>
20 <death>spreadShot</death>
21 <reload>30</reload>
22 <image>files/enemy.png</image>
23 <bulletImg>files/enemyBullet.png</bulletImg>
24 </Actor>
to this
<image>files/sinEnemy.png</image>
and then your good to go.
The hard way:
You want to customize everything you say? Oh good well here's what you do. All data for the game is stored in the file test. To change it open it up in your favorite text editor. There are 4 types of Actors, Player, Generator, BulletProto, and Enemy. To make a new actor you open with the actor tags
<Actor>
Then you list it's type
<Type>insert 1 of the 4 types here</Type>
then you list the properties of this particular actor
<x>200</x>
<y>100</y>
<image>myActor.png</image>
then you close the actor
</Actor>
now what properties do the actors have and what are they exactly well... here goes...
PlayerThe player is the player controlled ship. He moves with arrow keys and wasd. it's properties are as follows.
x
y
health
speed
score (if you wanted the player to start with some score)
reload ( a reload of 4 means you can fire once every 4 frames)
Right now movement is arrows or awsd and space is fire.
EnemyAn enemy is one single enemy. This means you could plan out by hand all the enemies that would come but this would take a lot of time and I doubt any one will do it. It has the properties.
score (the score you get when you kill them could be negative)
health (how many hits it takes to kill it)
colHealth (how much health to take off the player when you collide with this enemy so -1 would mean if you get hit by this enemy your health gets decreased by 1)
period (for sin wave movement it affects your period a big number means slow)
amplitude (amplitude for sin wave movement note it's not in pixels)
x (defaults to be a random x value)
y (defaults to be a little above the top)
velx
vely (defaults to -10)
movement (the movement function pick between none (moves at velx,vely) or sinWave)
shoot (how the enemy shoots singleShot,spreadShot,none)
death (what happens when the enemy dies it can be none, singleShot, or spreadShot)
reload (how often the enemy fires)
bvelx (the bullet x velocity)
bvely (the bullet y velocity)
startAngle (for spread shot the ship fires between this and endAngle defaults to 0)
endAngle (defaults to 180)
numBullets (for spread shot this is how many bullets the ship fires in the spread)
bcolHealth (how much a bullet hurts the player)
bulletImg (the image to use for this ships bullet)
Generatorthis will generate enemies so you can give it any of the enemies values and it will generate enemies with those values. in addition it has the properties
wait (the delay between enemy creations)
toActivate (the delay before this generator starts running, this helps for a gradual build up of difficulty)
both of which are counted in frames.
BulletProtothis is the type of bullet that gets created when the player fires
velx
vely
All actors have the following properties
image the image to load for this actor
xMax, xMin, yMax, yMin which are the maximum values of x and y this actor can have
Also any actor can have a value of count which just means it will create that many of that type of actor.
Now lets look at an example
14 <Actor>
this starts the actor 15 <Type>Generator</Type>
this says it's of type generator 16 <vely>4</vely>
this is the y velocity of the enemies it creates 17 <wait>50</wait>
it will wait 50 frames between creating enemies 18 <movement>sinWave</movement>
enemies move in a sin wave 19 <shoot>singleShot</shoot>
enemies shoot a single shot 20 <death>spreadShot</death>
on death enemies shoot a spread 21 <reload>30</reload>
enemies reload every 30 frames (1 second) 22 <image>files/enemy.png</image>
the enemies image 23 <bulletImg>files/enemyBullet.png</bulletImg>
the enemies bullet image 24 </Actor>
ends the actora lot of the properties here have not been mentioned which means that they will be set to their default value.
There is no sound support yet we'll see if I can get it working. If anyone does anything with this I will also post instructions on how to upload it to kongregate etc.
So here it is...
http://dl.dropbox.com/u/3234887/Assembly1.zip