Mr. Postma’s Patch Notes 1.0 - 6/4/2020
New + Improved
- Input checks created for: horizontal inputs, the mouse position, as well as where the mouse position is relative to our character, and a check to see if we press our spacebar key and if we have touched the ground then the Jump boolean variable is true. The input checks method is run in the Update Method.
- A PlayerMovement() method that is checked in FixedUpdate. The PlayerMovement() method uses velocity as movement.
- A JumpMethod() is created that says if the jump boolean is true and our character is on ground then we will jump using velocity during the jump an animation is played.
- An inBounds() method is created that keeps the players position in bounds if he goes too far to the left or right.
- A spriteFlip() method is created that changes the direction our player faces based on where our mouse is.
- An Animations() method is created that makes our player use the idle animation if speed is between -.5 and .5, and will play the run animation if our speed is greater than .5 or less than -.5.
- Enemies have been created. These enemies have a variable called lookDirection that tells them what direction the player is compared to them.
- A startMoving boolean variable is created. This variable is true if the enemy has taken damage. If startMoving is true then the enemy will move with velocity towards our player
- A Takedamage() method is created that will subtract from the enemies health if our mouse has clicked on the enemy. Once the enemies health reaches 0 a Die() method will run which will take that enemy and make it not active anymore.
- When the enemy is disabled the health will reset back to 30 and the startMoving boolean becomes false
- A bounds is coded so the enemies cannot go to far left or right
- Using object pooling to spawn enemies where the total number of enemies is 20 and it will randomly spawn 2 enemies until the 20 limit is reached. If an enemy is eliminated it will add back to the pool. So if there are 20/20 enemies on the level and two are eliminated there are 18/20 possible enemies on the level and the eliminated 2 enemies will respawn after the spawnInterval time period has passed.
- For version 1.0 the spawning enemies is possible but I have it inactive for the moment and just have 3 enemies on the level at this time.
- For my weapon I have coded two raycasts to see if we have hit our enemy. I have a raycast coming from the mouse position to the mouse position and a raycast coming from the player to the mouse position. I want to make it so the mouse has to be actually in the box collider for the hit to count and not just in the right direction. So both of these rays need to hit an enemy for the enemy to take damage. The ray from the player is there so if there is an obstacle that is in the way of the raycast from the player to the enemy then the hit will not register with the enemy.
- I have built a basic level using tilemaps and 2d objects
What’s Next
- A crouch function to the player where they crouch but also move slightly slower
- Use maplestory sprite sheets to create a level
- Add in more detailed animations with the maplestory sprite sheet
- Fix a bug where the player sometimes sticks to the side of objects and walls when jumping
- Create equipable items to the player
- Create quest using user interface methods we learned in unit 5
- Create an HP and MP bar to be used
- Create an experience meter.
The Legend of the Red Weapons: Version 1.3
Alpha
Status | Prototype |
Author | JockBuffton |
Genre | Role Playing |
More posts
- The Legend of the Red Weapons: Version 1.3Aug 01, 2020
- The Legend of the Red Weapons: Version 1.2Jul 13, 2020
- Mr. Postma’s Patch Notes 1.1Jun 30, 2020
Leave a comment
Log in with itch.io to leave a comment.