RPGConcept — Final
Sorry for the veeerrry long pause on the RPGConcept series. I’ve had a long hiatus since the last time I’ve worked on the RPGConcept, so here are some of the features I’ve added to the final product: Camera shaking, inventory system, projectile, controlling projectile/movement speed, picking up items, hp/mp bars. I’ll be showcasing these features but won’t go in-depth on my process, problems, and solutions for these features (I’ve forgotten most of it :x)
Inventory system. Player could pick up items using “E” and drop items using “Q”. The items on the ground are displayed in the bottom right corner. This one was a pain to make since I had to somehow transfer the item on the ground to the HUD 😦
Shooting Projectiles. With debug mode on, you can see the collision boundaries, and adjust the shooting speed (dexterity). The hardest part about this was probably making the bullets fire at the angle that your mouse was at. Since the character isn’t centered, I had to make shifts to the firing angles relative to the player position. You could also adjust player movespeed, though it isn’t shown here.
Camera shake. This one was a lot of fun to do, and pretty simple too. I just needed the camera to go in random Vectors of diminishing lengths over the course of around 1 second.
HP/MP bar. The bars are made with rectangles lengthening and shortening as you gain or lose HP/MP. At first, the bar would be chunked down to the value that you were hit by, but I decided to add the shrinking bar effect, which was the hardest part about the HP/MP bars. I had to have a variable store the final rectangle, initial rectangle, then have the rectangle shrink/grow to the final rectangle dimensions.
Originally published at http://noviceprogramming667661022.wordpress.com on December 23, 2018.