For adding the enemies I will add in multiple sprites of the same image
I added the Enemies in as a group in random areas into the map just like i did with the Diamonds and astroids.
I have created 7 aliens to be in the level.
The code I have implemented randomly sets the aliens into a group that is named aliens. i have also included a tweening function for all of the aliens that makes them seem as they are disappearing into the darkness and reappearing .
Wednesday, 30 April 2014
SpaceShip movement added
Using the Phaser resources I have allowed the spaceship to movement the level and getting the sprite to rotate with the arrow keys and move in the direction of the keys.
This is the Code i have used to allow for the movements.
SpaceShip Movement
The Spaceship will move by the use of the arrow keys, the left and right arrow keys will rotate the directions of the spaceship, the up arrow key then will allow the ship to move in the direction that it is facing
additional buttons can be added such as a fire using the space button.
Developing the FIrst level
To make my first level I will have to make my tile set, I will hand draw in them in either PhotoShop or Gimp. I first Started to use Gimp to draw the Tiles however I found this program difficult to understand to use, so i moved on to using PhotoShop.
I have developed a TileSet is set to 64 by 64 pixels, I have made 6 different planets and object that will feature in the map design.
Originally the planets in the map were going to be obstacles in the games however, as with the restrictions of the phaser. The objects cannot be round. so i have decided that these objects will only feature in the game as a backdrop.
The Program I used to develop my level was 'Tiled' i imported the image i made into tiled where I set the tiles to 64 by 64, it then allow me to click and drag the tiles in the places where i wanted them to be. after I set all the tiles in the places i wanted them to be I exported the as a JSON file.
Adding Collectibles
To save time for other areas of the game, i have used a diamond image i found available in the phaser resources. however the diamond image has managed to stay in theme with the rest of my game. the image is pixel art and goes well within the game.
To improve my game, I want to add collectibles into it. I wanted diamonds into the game the player will have to guide the spaceship into the diamond to collect it. I will put 5 diamonds in the first level, i entered the the diamonds in a group. using a random function i will enter in 5 diamonds in random positions and in a random colour out of the 5 colours in this image.
Like the diamonds i also found this image in the phaser resources. I will enter 3 coins in the level to the level. this time the coins will be individual sprites and set in position. a animation will be added to allow the coin to seem as it is spinning
Tuesday, 29 April 2014
Astroid Sprite
initial for the image of the Sprite i was going to make multiple image of rocks, however once i started to make the first lot of images i saw that this would take too much time. so i decided to make them into a groups and randomise the size and scale of each image to make them seem as unique rocks.
I have made this astroid image in photoshop i will use the image in the game as a sprite that interacts with the Spaceship. The space will be able to collide with the astroids. at the start of the first level i want it to be as the Space ship has encountered a astroid field. There i will use this sprite in a group where it will produce multiples of this sprite as different scales and velocities in x and y. thus giving the effect of the Spaceship being inside of astroid field
Here is the start up of the First level where the astroids have been randomly inserted as size, speed and areas of the level. when the Ships collides with one of these rocks then the speed and direction of the astroid will alter.
Subscribe to:
Posts (Atom)