Search this site
Embedded Files
Callum Summers
  • Home
  • About
  • Schedule
  • Blog
  • Design documents
  • Extras
Callum Summers
  • Home
  • About
  • Schedule
  • Blog
  • Design documents
  • Extras
  • More
    • Home
    • About
    • Schedule
    • Blog
    • Design documents
    • Extras

BACK

We Are RoadKill - Blog #3

NEXT

We Are RoadKill - Character system improvements

Introduction:

In this blog post, I will go over the scriptable objects I have currently implemented into the game, as-well as future implementations of scriptable objects in future development.

Currently, the scriptable objects that are being worked on are: Weapons, Characters and pickups.

Current plans:

Below is an image containing the branches I have set up on GitHub desktop. These branches showcase what my current plan is for developing the project. Once these branches are complete, I will then look through the documentation to see what would be the ideal steps to take to ensure development continues smoothly, and, allows me to get a working prototype out as soon as possible.

This section will be a breakdown of the current priority branches and my estimated time to complete and tasks.

Better Camera Setup:

  • Implementing a camera to switch to upon player death. (Hovering above)

  • Improving the first-person camera to prevent clipping with the player model.

  • Adding a camera to the character selection for future system development.

Estimated Time: 1 hour

Player Ragdoll:

  • Implementing the ability for characters to Ragdoll.

  • Have characters Ragdoll upon death.

  • Add a rigid body to the player object, which will be activated upon player death.

  • Deactivate player controller when character requires rag doll.

Estimated Time: 4-6 hours.

Character-animation:

  • Implement basic animations for player movement (walking, crouching, jumping and sliding.)

  • Implement basic animations for interaction (picking up objects, opening doors, pressing buttons.)

  • Implement basic animations for weapons (reloading, recoil, equipping, holstering)

  • Use temporary animations from mixamo for testing and system implementation purposes.

Estimated Time: 4-6 hours

Improve movement/Camera:

  • Tweak movement to make it feel much more natural.

  • Fully implement the crouching and sliding mechanics (needs animations)

  • Improve movement in the air when toggled (characters have air movement off by default)

Changes:

This section will detail the changes I've made since the last blog post. This includes additions, removals and system changes. Each subsection will likely include: Images and Gifs, with code sometimes making an appearance if necessary.

The Brain:

The brain is a game object that acts as a communicator to other scripts and objects. It contains multiple different scripts that make communication between different scripts much easier and tidier. The brain also contains debugging scripts, global variables and the input manager.

These are the components that are currently attached to the object. Almost all the variables are gained during the project running, making it much easier to set up, with the only one being filled being the UI_Character_Selector, as that is used to initialize the object.

TB_SystemCheck:

  • Determines whether systems are running correctly.

  • Checks whether the player needs to be selected, if the player needs to be selected it will initialize the Character select menu. This has checks in place to ensure that only the player object will initialize the character selection screen, AI missing required components won't.

  • Communicates between the player object and the character selector to update the player object with the selected character. This makes the code tidier and easier to debug.

  • Lock's cursor to the centre of the screen and hides it once gameplay has begun.

Debugging:

  • Allows for the resetting of the scene for quick testing.

  • Updates cursor to allow for it to re-appear and hide when needed.

Input manager:

  • Currently manages player input: Movement, looking around.

Global Variables:

  • Contains a private gravity variable and a public getter for the private variable.

Character selector:

The character selector is a UI object that can either be placed in the scene or initialized by TheBrain. By default, the character selector is not in the scene to begin with.  The character selector currently allows the player to select between 2 different characters, however, the system has been developed with modularity in-mind allowing me to easily expand the current character list, while also having checks to see if the character is unlocked or not.

This is the character selector as it has been dragged into the scene, it appears to be missing the name of the characters and the image, however, when the game loads, they update to show the Image of the character along-side its name.

This is the Hierarchy of the character selector object. The Xhaia Select and Zarya select are prefabs that contain the: Image, button and text. Therefore, implementing more characters is simply changing the scriptable object stored within the prefabs and renaming them in the hierarchy for easy editing.

This is the inspector within XhaiaSelect. When you place a prefab in the game, it will only need the char variable to be selected, which is the SO_Character scriptable object. Allowing for easy additions.

GIF:

Player movement:

The player can now move the player around the scene. The current movement options are: Walking, Sprinting and jumping, with functions in place for the full implementation of crouching and sliding.

I decided to use a player controller for the character. I selected a player controller over the RigidBody as I believed it would be more fitting for an FPS game that has minimal physics interaction, however a RigidBody will be an additional component I add for the specific purpose of Ragdolling.  

However, through using the player controller, it created the issue of not having momentum and gravity as a built-in feature, and therefore would have to be implemented. Gravity was an easy enough addition, but momentum had me stuck for a while. I didn't like the ability for the player to move freely while in free-fall, and therefore knew momentum would be an important addition. I researched for hours coming up with the best methods of implementing momentum, only to realise, my first idea, one I didn't implement because I thought it would never work, worked, and all it needed was a single variable that gets the horizontal vector3, while having the Input manager prevent further horizontal Input while the player is not grounded.  I made sure to allow the option of toggling Jump Movement on, just in-case I desire to make characters, pickups, or weapons which grant that ability.

The player object inspector:

GIF showing movement with JumpMovement toggled:

GIF showing movement with JumpMovement Disabled:

Character models/rigging:

Below are two images of the characters I have currently made for this project. They were created in MagicaVoxel, with the rigging, UV unwrapping and materials done with blender.

An image of the rigging will also be shown.

Next post

The next post should be written once notable progress has been done on the branches as shown above. This may be once all the branches purposes have been implemented and deleted, as that would allow me to write more about what comes next. I aim to have a dev vlog uploaded to my youtube channel along with the blog post, which should allow for a better showcase of the current systems.

Until next time. [New post available]


Google Sites
Report abuse
Page details
Page updated
Google Sites
Report abuse