Wednesday, 9 March 2016
Tuesday, 8 March 2016
Class 20 AI
AI
Today I wanted to create an AI system that will be used for the future enemies and NPC's within my game. At the moment its very simple, the objects that represent the enemies have code written into them that tell the enemies to follow the player if he comes within a range of 256. The enemies are coded to only follow the player if he is in the view of that enemy, meaning that if you stay behind the walls you'll be safe. I will eventually make it so the enemies can attack the player, and the player can fight back. today I've learned how create a basic AI system. Tomorrow I plan on finishing the walking animation on the player.
the collision code that instructs the enemies to follow the player. I can change the speed of which the enemies can move along with the distance they will follow the player to.

This is an example of how the enemies follow the player while he is in their view.
Today I wanted to create an AI system that will be used for the future enemies and NPC's within my game. At the moment its very simple, the objects that represent the enemies have code written into them that tell the enemies to follow the player if he comes within a range of 256. The enemies are coded to only follow the player if he is in the view of that enemy, meaning that if you stay behind the walls you'll be safe. I will eventually make it so the enemies can attack the player, and the player can fight back. today I've learned how create a basic AI system. Tomorrow I plan on finishing the walking animation on the player.
the collision code that instructs the enemies to follow the player. I can change the speed of which the enemies can move along with the distance they will follow the player to.


This is an example of how the enemies follow the player while he is in their view.
class 19
Leveling
Today I focused on finishing the leveling system, you can now pick up XP off the ground to level up and gain a higher HP. There is still tons of stuff I can add to the leveling such as attack, strength or magic, and I plan on adding these things eventualy but not at the moment. The leveling system itself wasn't that hard to code but it took some time to learn how to do it. I also added a pixal grass background to give it some atmosphere. Tomorrow I plan on finishing the new player model along with a walking animation and maybe a attack animation.
The code below is basically the leveling code each global variable contains a value and when one of the blue dots is picked up it increases the amount of HP, your level, and increases the amount of XP needed to level up again.

As you can see the player is able to collect XP and the stats chart at the bottom changes to the amount of XP you collect.

Today I focused on finishing the leveling system, you can now pick up XP off the ground to level up and gain a higher HP. There is still tons of stuff I can add to the leveling such as attack, strength or magic, and I plan on adding these things eventualy but not at the moment. The leveling system itself wasn't that hard to code but it took some time to learn how to do it. I also added a pixal grass background to give it some atmosphere. Tomorrow I plan on finishing the new player model along with a walking animation and maybe a attack animation.
The code below is basically the leveling code each global variable contains a value and when one of the blue dots is picked up it increases the amount of HP, your level, and increases the amount of XP needed to level up again.

As you can see the player is able to collect XP and the stats chart at the bottom changes to the amount of XP you collect.

Monday, 7 March 2016
Class 18 Leveling
Leveling System
Today I really wanted to create a simple leveling system for my game (RPG). To begin made a global obj and coded in the global values for the player health,XP and how much XP is needed to level up.

Then I created a Draw Event (this part took me a while because I had to look it up on the internet and watch a few videos. Basically the draw event is what is displayed on the screen for the player to see. I was able to input the Level of the player and HP but for some reason when I tried to code in the amount of XP the player needs to level up, that piece of code would the cause the game to crash. I dont know why so I just removed it until I figure it out.

Today I really wanted to create a simple leveling system for my game (RPG). To begin made a global obj and coded in the global values for the player health,XP and how much XP is needed to level up.

Then I created a Draw Event (this part took me a while because I had to look it up on the internet and watch a few videos. Basically the draw event is what is displayed on the screen for the player to see. I was able to input the Level of the player and HP but for some reason when I tried to code in the amount of XP the player needs to level up, that piece of code would the cause the game to crash. I dont know why so I just removed it until I figure it out.

I'm still trying to figure out how to allow the player to collect XP and actually level up but I hope to figure this out by the next day
This is what the display looks like, In the bottom left hand corner. The blue dots are the XP that the player will collect.
class 17 new project
New Project

The Room

Today I started a new project under the name (RPG). So far all I've done is created a block knight with 4 dimensional movement using 4 sprite models to create the an animation. The game play area at the moment consists of one room with varies walls that the player collides with. The player has been set to be controlled with the arrow keys using the code in the picture below. Today is the first time that I was able to properly create collision with the player and the walls and create smooth player movement. Tomorrow I plan on creating a leveling system that can be used to level up your player.
Movement Code
Movement Code

The Room

Subscribe to:
Posts (Atom)