Game
Project Smile
7 years ago

Devlog #5 - First person controller


Greetings, my name is Jonathan Berhane and I am one of the developer for project Smile.
My role in this project is to make the gameplay as great as possible, and you may wonder how I going to do that. And the answer is that I will work on all task that have anything related to the core gameplay, like button placement and the main character’s movement etc.

My previous experience in unreal.
I have very little experience in working with Unreal as I have only worked with it 1 time before so working with the blueprints felt at the beginning weird. I struggled to remember the shortcuts like the branch shortcut, which is holding down b and left mouse click, and it is possible to split node to make it easier to see in the graph etc. But after using it for a while now I feel way more comfortable working with it now compared to when we started this project.

The group’s vision.
We in the group had a discussion on what feature we wanted the first person controller should be able to do, some cool ideas were mention but we decided that we should focus on the most important stuff. Like the first person controller should let the player move freely around in the level, and make it possible for the player to run, crouch and have a stamina bar that are linked to the player run function, health bar, be able to throw item as a decoy etc.

What I have been working on?
What my plan was for last week was to make first person controller blueprint from scratch. And the reason that we made our own first person controller instead of using Unreal Engine own fps controller, is that Unreal version have some weird camera issues and instead wasting time to fix it we in the group decide it would be best if we made our own instead.

5d0a9569b0fbb.gif

As you can see in the picture above, the camera crosshair in Unreals own fps controller is all over the place when you rotate the player, and this problem could allow the player stand in the air if player would stand near the edge and then turn around.

5d0a956c2d7b8.gif

But as you can see in the picture above that are showing our own first person controller, the camera working fine, so know that camera is working and our character can move around.
I quickly started working on the other feature like jump, crouch, run functions. Does feature was finished very quickly, but a feature that took longer then expected was the stamina function.

I was following a guide on how to make stamina in unreal and it almost worked liked I hoped it to do, but when I was finished with it after following the guide I started to get some problem. Some example of problem I encountered was that the player was able to drain stamina standing still, and the player could bypass out of stamina speed reduction by doing another action when it was out. Fortunately, it was easy problems that could be fixed quickly by placing out some condition and variables that checked if the player was doing some action or holding down some buttons.

5d0a956fbb567.png

Picture above are showing my custom stamina increase and decrease blueprint. In the decrease blueprint I start with a branch that check if the condition can run is true, if the player can run it will then go to next branch that checks if player stamina is less or equal to 0. If it’s true the stamina is then set to 0 so I always now it 0, and then proceed to the next function that is clear decrease stamina timer and I use it to stop the timer that are decreasing the player stamina.

After that I set the player moveSpeed to out of breath which is very low speed to simulate the player fatigue, I and then set a delay with the duration of my float variable OutOfBreath which is representing the time it takes for the player to recover from its fatigue. When the delay is finished I then set the players walkspeed to walk, which is the default speed and after that I start the increase stamina timer, so the player recovers stamina. And should it be false I just the value I get to as the new current stamina.

In my increase stamina event the branch condition is set to check is my current stamina is greater or equal to my max stamina. And if it’s true I then set my current stamina to my max stamina, and then I clear the increase stamina timer to stop the player from getting more stamina then the intended amount. And if it’s false I just the value I get to as the new current stamina.

My next task.
The next thing that I going to work on is the grab and throw function, because in this game the player will be able to throw items as decoy to lure enemy away. But you as the player will be not able to abuse it as the enemy will learn if the player is throwing items just to lure him, so you as the player will need to use the throw mechanic wisely. Hope you enjoyed reading on what I have done so far and I will be back with a new update on Thursday next week, until then, see ya



0 comments

Loading...

Next up

Short intro of us 💕✌️

We're an eletro duo based in Seoul 🇰🇷 Heavily influenced by the 90s.

Our new album #Xennials is all about the nostalgia of that era 💽 CD listenin 📟 beeper beepin 💾 floppy disks floppin days 😎

Stream now! 🎧

https://open.spotify.com/album/3YwWhnHWVy5cA8XOpbaGRA?si=8E9awqU…

Runestones: from concept to in-game model🗿

The Darkside Detective: A Fumble in the Dark is out TODAY! 🖱️Advanced pointing, clicking action 🖨️Very funny words! Loads of them! 👻6 sarcastic, spectral cases to solve

Why walk when you can jump?

I worked so hard to get all four of them to the end safely, but then...

"Day to Day" (also check spud out here he's a great guy and writer: https://soundcloud.com/spudward)

2d lighting experiment

A sneak peek at the new OST, can you guess what this song will be used for? 🤔

I made a small jungle house.

:] me sigue sin gustar

:] I still don't like it