Thursday, 27 March 2014

a idea for a game (still in progress)



the idea is your a news reporter sent to find out why a city was abandoned and you find things like abandoned science labs.


something like This could be one of the building to enter in order to complete the news report


We could put something like this in the intro along with some sort of background story






We could have a abandoned science lab in there to possibly explain why the city was abandoned.
e.g. a experiment went wrong and forced the people to leave 
















Feelings

Scared
You will feel a bit scared while walking around this abandoned city all alone and also we could convey this feeling with a few dead bodys and failed experimants on people in labs
We will do this will dark colours and music.
Putting creepy music in the background while your wandering around the city and this will change depending on where you are.
Lost
You are in a starnge city and dont know your way around
The player will have to find their way around with no tips or maps to convey that they have no idea of the layout of the city. When you leave a building the lighting will change from what it was to make it so that you think its a different place.

Confused
Wondering why the city is abandoned and the more you search the city the more confused you get untill you get the full picture
The more you search the more clues you get as to why the city was abandoned but some may not even be close to the others that you have found and this will confuse the player completely we could do this withsay a abandoned science lab and some guns around the city. The abandoned science lab would show that the city was abandoned because of a experiment that went wrong and the guns would show that they may have been a war there.

Shocked
Seeing all the failed experimants and the destruction in the city you feel shocked but at the same time you start to see why it was abandoned
Dead bodies around the city and failed experiments in the labs would shock the player.this would be done with cut up bodies and body parts around the lab and piles of dead bodys in the streets.





























some 3d models i made

i made these using 3ds max.























Wednesday, 26 March 2014

code for lootgame

 this is the main code the rest is for the assets and spawing enemies


package
{
    import adobe.utils.CustomActions;
    import flash.display.MovieClip;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.KeyboardEvent;

    /**
     * ...
     * @author greg
     */
    public class game extends MovieClip
    {
        private var gamestate:int = 0;
        public var enemyholder:Sprite;
        public var enemypool:Vector.<enemy > ;
        private var framessincespawn:int;
        private const cs_load:int = 0;
        private const cs_running:int = 1;
        private const cs_paused:int = 2;
        private const cs_Gameover:int = 3;
        public var Pause:Boolean = false;//:int =2;
        public var armourholder:Sprite;
        public var armourpool:Vector.<armour> = new Vector.<armour>();
        public var framessincespawn2:int;
        private const cs_inventscreen:int = 3;
        public var Inventscreen:inventoryscreen;
        private var invent:Boolean;
        static public var inventscr:Boolean = false;
        public var Youwin:youwinscreen = new youwinscreen();
        public var Gameover:gameover = new gameover();
        //armour value
        public var a = 0;
        public var attvalue = 0;
        public var defvalue = 0;
        public var Level:int = 0;
        public var winner:int = 0;
        //private var _player:player;



        //public var Gameover:gameover = new gameover();
        public var health:int = 20;

        public function game()
        {
            trace("Created game");
            addEventListener(Event.ADDED_TO_STAGE, addedToStage, false, 0, true);
            fillenemypool();
            fillarmourpool();


        }

        function changeLevel(levelNumber:int)
        {
            Level = levelNumber;

            trace("Changed level to " + Level);

            // change background image
            background.gotoAndStop(levelNumber + 1);
        }

        // Change armor

    private function addedToStage(e:Event):void
    {
        Inventscreen = new inventoryscreen();
        Inventscreen.parentGame = this;
        trace("added to stage");
        removeEventListener(Event.ADDED_TO_STAGE, addedToStage);
        stage.addEventListener(Event.ENTER_FRAME, loop, false, 0, true);
        stage.addEventListener(KeyboardEvent.KEY_UP, keyup );


    }
    private function loop(e:Event):void
    {
        switch (gamestate)
        {
            case cs_load :
                initalizegame();

                break;

            case cs_running :
                gameloop();
                break;

            case cs_paused :
                //addChild(Inventscreen);
            default :

                break;
        }


    }





    private function gameloop():void
    {

        if (! Pause)
        {
            Player.update();

            updateenemy();
           
           
            if (Level == 0 && defvalue == 0 && attvalue ==0  )
            {
            updatearmour();
            }
            else if (Level == 1 && defvalue == 10 &&  attvalue == 10)
            {
                updatearmour();
            }
            else if (Level == 2 && defvalue == 20 && attvalue == 20)
            {
                updatearmour();
               
            }
            if (contains(Inventscreen))
            {
                removeChild(Inventscreen);
            }
        }
        if (Pause)
        {

            if (Inventscreen.parent != this)
            {
                addChild(Inventscreen);
                Inventscreen.refreshScreen();
                inventscr = true;
            }

        }

        //Player.update();
        //updateenemy();

        if (Player.health <= 0)
        {
            addChild(Gameover);
        }
    }


    private function initalizegame():void
    {
        stage.focus = stage;

        // add the layers for bullets and enemies
        enemyholder = new Sprite  ;
        addChild(enemyholder);

        armourholder = new Sprite();
        addChild(armourholder);





        //set up the player
        //trace("addplayer");
        addChild(Player);

        gamestate = cs_running;
    }

    private function keyup(e:KeyboardEvent):void
    {

        if (e.keyCode == 80)
        {
            Pause = ! Pause;
            trace("i'm in pause");

        }



    }

    private function spawnenemy():void
    {
        var EnemyIndex = findenemy();
        trace(EnemyIndex);
        //check its valid
        if (EnemyIndex != null)
        {
            trace("found enemy");

            if (Level == 0)
            {
                enemypool[EnemyIndex] = new enemy1();
                framessincespawn == 100;
            }
            else if (Level >= 1)
            {
                enemypool[EnemyIndex] = new enemy2();
                framessincespawn = 60;
            }
            else if (Level == 2)
            {
                enemypool[EnemyIndex] = new enemy2();
                framessincespawn = 40;
            }
            enemypool[EnemyIndex].activate(50+Math.random() *(stage.stageWidth -100), 0, Player, this);

            enemyholder.addChild(enemypool[EnemyIndex]);
        }
    }
    //this function spawns armour
    public function spawnarmour():void
    {
        var ar:armour = new armour();
        var offset:Number = 100;

        ar.activatearmour(
        offset+Math.random() *(stage.stageWidth -offset * 2),
        offset+Math.random() *(stage.stageHeight -offset * 2),
        Player);

        armourpool.push(ar);

        //armourpool.push(50+Math.random() *(stage.stageWidth -100),0,Player);
        //armourpool.push(100+Math.random() *(stage.width -100),0,Player);
        armourholder.addChild(ar);

    }



    public function fillenemypool()
    {
        enemypool = new Vector.<enemy >   ;
        var i:int = 0;

        while (i < 25)
        {
            i++;
            enemypool.push(new enemy());
        }
    }

    public function fillarmourpool()
    {
        armourpool = new Vector.<armour >   ;
        var b:int = 0;

        while (b < 25)
        {
            b++;
            armourpool.push(new armour());
        }
    }




    private function updateenemy()
    {
        framessincespawn++;

        if (framessincespawn == 100)
        {
            framessincespawn = 0;
            trace("trying to spawn enemy");
            spawnenemy();
        }


        for (var i:int = 0; i < enemypool.length; i++)
        {
            if (enemypool[i].isactive)
            {
                if (enemypool[i].hitbox2.hitTestObject(Player))
                {


                    Player.health--;
                    enemypool[i].deactivate();
                    trace("health");
                }
                else
                {
                    enemypool[i].update();
                }
            }

        }
    }


    private function updatearmour()
    {
        framessincespawn2++;
        if (framessincespawn2 == 100)
        {
            framessincespawn2 = 0;
            trace("trying to spawn armour");
            spawnarmour();
        }

        for (var b:int = 0; b < armourpool.length; b++)
        {
            if (armourpool[b].isactive)
            {
                if (armourpool[b].hitTestObject(Player))
                {

                    trace("armour collected");
                    if (Level == 0 && a < 3)
                    {
                        a++;
                    }
                    else if (Level == 1 && a < 6)
                    {
                        a++;
                    }
                    else if (Level == 2 && a < 9)
                    {
                        a++;
                    }
                    armourpool[b].deactivatearmour();
                }
                else
                {
                    armourpool[b].updatearmour();
                }
            }

        }
    }






    private function findenemy()
    {
        //loop through all the enemies to find an inactive one
        for (var i:int = 0; i < enemypool.length; i++)
        {
            // once we find one that's spare
            if (! enemypool[i].isactive)
            {
                // return it ready for use
                return i;
            }
        }

        return null;
    }

    public function youwin():void
    {
    addChild(Youwin);
    Pause = true;
    trace ("im in pause");
    }














}

}

my loot game

i did all the code for this game but someone i was working with did all the art.
basically the goal of the game was to collect the suits of armor till you get enough to move on.
in order to move on you had to set your attack and defence values and then move to the far right of the screen while avoiding the skeletons and the dragons. the skeletons moved slowely while the dragons moved faster and the dragons on level 3 moved faster than the ones on level 2.

this is level 1

this is level 2


this is level 3

this shows the pause menu and is also where you set your attack and defence values.





this is the win screen




this is the game over screen


 


main menu for wow i modified


this is the main menu for wow which i modified 



i decided that the character screen wasnt needed as soon as you logged into the game.
with this version you have the character you used last already selected and can just start or you can change it via the character select option.
when you went into the character select option the background changes depending on which class you are rather than the area you where in before for example if you where a death knight the image would be of the lich king. the image is shown below.













the reason i used the lich king for the death knigh is because he is a death knight.

a game i designed

Introduction
Mobilize your armies, devise a strategy to capture planets from your opponents and take control of the solar system.

DIFFERENT RACES
THERE IS THE MARS RACE, IKEYA-SEKI RACE, the HUMAN RACE and the CENTAURES COMET RACE.
The mars race is a race of volcanic creatures and has lived on the planet for a long time before the ikeya-seki race landed on the planet with the comet.
The ikeya-seki race is a race of fire creatures and has lived on a comet orbiting the sun for many years until a small meteor hit it and then it went off course and landed on Mars.
The Centaures comet race is a race of ice creatures and has been going around the solar system.    It has been changing the orbits of other planets, until one day when it landed on earth.

When these two comets landed on mars and earth they started using up all the resources on each planet and now there is none left on either planet, so all four races have to find more by going out into the solar system.               They soon realised there were four races and not two after them, so they fight each other in order to have enough resources for their race. 


Setting up the game
When you start place the corresponding colour counter in each corner and give each player a 10 troop card and a barracks card as well as territory cards which would be spilt between the players so they have 4 each. Each player also starts with a level 1 barracks card.





Start of the game

When you have the game set up each player rolls the dice then whoever gets the highest roll starts. When the first player has been chosen, its time to start the game.
On each players turn they get a roll for each territory they control and move by what they roll each time. When they roll they can choose to go into their safe zone or into enemy territory. If they go into their own territory it’s just a chance to get their troops up or to build up their barracks level. But if they go into enemy territory they can land on a territory space controlled by the enemy and that will cost them troops equal to the amount of territories that player has. It will also be a chance for them to capture one of them as well if they decide that they want to.
When the a player rolls for their final  time and does whatever they need to do depending on the space they land on their turn will be over. If a player wants to put troops to defend their territories they will have to do it before their final roll.


Capturing territories

When another player lands on a territory space in a enemy players zone they then check to see if that player has the corresponding territory card. If they do then they have to pay 1 troop for each territory they control then they can choose to try and capture it. In order to capture a territory they need to send in their own troops and these have to be from their spare troops. all the troops fight at one time . A player rolls and whoever loses has to remove troops from the battle depending on the difference between the 2 rolls and they then lose it for good, if the defending player rolls a 4 and the attacking player rolls a 2 then the attacking player has to remove 2 troops from the fight, if the difference is greater then they loose more troops..  they have to roll until one player runs out of troops when a player is out of troops either if it’s the attacker or the defender they loose the battle. If the defending player runs out of troops they have to give the territory to the invading player.




How to win the game
A player wins when they control all 16 territory cards


How to get troops and moving round the board

Whenever a player reaches a corner they have to stop there even if they rolled higher and at that point, they get one troop and can choose to either stay there or go back to their own corner.
Each player gets one troop for each territory times their barracks level.



How to level up your barracks

A player has to spend 10 troops to get their barracks up one level, Or you can get the barracks level up card.
Some strategies that the players can use

A player can either decide to go it alone and take all three on at once or they can team up with another player to take out 2 of them as a team and then take each other on when its just the 2 of them.
If 2 players decide to team up then they will probably try and take out one player at a time but do it before they get their defences up but the strategy depends on how they want to do it. However even if 2 players decide to team up they cant share their troops with each other.

If a player decides to go it alone then they can decide to take out the players as soon as possible or they can go for defence and collect troops.
Of course players can also make up their own strategies these are just are just some examples

design document for the game of ur

Module: Critical games studies
Assignment 2: Design document
Module code: imdcgd101                       Date: 15/02.2014
Name: Greg Rutter                                  Student number: S158490


The following is the design document for the game of Ur as it was and how I modified it for more modern gameplay

·       Game scenario

The goal of the game is to get all 5 of your game pieces from the start to the finish. To do this the player must roll 4 d3s and make it to the end. There are three strategies within the game to allow the player to race the other player to the goal, one of which is rush the pieces to the end using the safe zones to stop the other player from taking their pieces. Another is taking the other players pieces until they get a big enough advantage on the board to go for the win. The third is to take the other players pieces as you go along and rush to the finish (this is basically a combination of the first 2 strategies). While playing the game I found the 3rd strategy to be the most effective but you can win with either.

Please refer to the appendix for game rules.

·       Board design

The board design is the same as the original game of Ur.


·       Game-piece design

The game pieces are just counters. I thought about changing the pieces to star wars or knight figures but doing this didn’t affect the gameplay. If you were going to market it for a specific company then you would change the theme to sell it better but as a general design there was no need to do so.


The same would be done for all the components for the game like the game pieces, the board and maybe even the dice.

·       Asset list

The game board
4 d3s with tipex on one corner
And 10 counters (5 for each player)




·       Game design and gameplay

I saw no need to change the board or the pieces or even what was used for movement in the original game. The 4 d3s are designed to simulate the way the old game moved the pieces but for a more modern age.

The gameplay can be fast if one player gets lucky at the start but both players have the same odds of this happening and this could happen at any stage of the game which means that if one player gets lucky at the start the other player can still win the game if they get lucky later on or if the player that got lucky at the start has a run of bad luck. At any point in the game the player can have a lucky turn which could give them a lead over the other player or catch them up, but at the same time a player can get unlucky which may give the player in the lead an even bigger advantage or catch the other player up if they are ahead.













Appendix

Rule set for the player



The player rolls 4 d3s to decide how many spaces they can move a single piece. The tipex on the dice decides on how many spaces this is. The amount of tipex corners facing up decides this. As well for each tipex corner facing up the player can reroll that many dice during this turn. This continues until no tipex corners are facing up.
If the player takes another players piece they get one of the d3s back that they lost if they still have all 4 d3s they get none back. Also the piece they landed on goes back to the start.
When a player runs out of dice the next player takes his/her turn.

There are safe spots on the board which stops the other player from taking your pieces. 








Once the player gets all 5 of their pieces of the board they win the game. 


How to win


In order for a player to win they have to get all 5 of their pieces of the board before the other player by following the route shown above.