Skip to content

E-Jay Tripoli

A documentation of my work for Year 2 – Studying Games Design and Art at the University of Southampton

Menu
  • Lament
    • Development
      • Procedural Room Generation
        • PRG – Pt 1
        • PRG – Pt 2
        • PRG – Pt 3
        • PRG – Pt 4
        • PRG – Pt 5
      • Dungeon
        • Stalagmites
        • Pitfalls
        • Health Potion
        • Dungeon Bug Fixing
      • Player
        • Player – Pt 1
        • Player – Pt 2
        • Player – Pt 3
        • Player – Pt 4
        • Player – Pt 5
      • UI/HUD
        • Start Menu – Pt 1
        • General UI
        • Skill Tree – Pt 1
        • Skill Tree – Pt 2
        • Skill Tree – Pt 3
        • Skill Tree – Pt 4
        • Skill Tree – Pt 5
        • Skill Tree – Pt 6
      • Enemies
        • Whispers – Pt 1
        • Whispers – Pt 2
        • Wrought – Pt 1
        • Wrought – Pt 2
        • Boss
      • Scenes
        • Tutorial
        • Hub
        • Depression Gate
        • Gateway Scenes
    • Logs
      • Initial Plan
      • Teamwork
        • GitHub
        • Discord
      • Weekly Logs
        • User Analysis
        • Accessibility
        • Testing
        • Marketing
        • Formative Feedback
      • Playtests
        • Playtest 1
        • Playtest 2
        • Playtest 3
      • Showcase Event
      • Post-Project Reflection
    • Research
      • Understanding Learning Outcomes
      • Understanding my role
      • Researching Tools
      • Researching Pipelines
      • GDD Breakdown
      • Researching Procedural Generation
      • Existing Games
  • Arcadia GDD
    • Weekly Logs
      • Week 1 – What is a GDD?
      • Week 2 – Game Worlds
      • Week 3 – Concept Art
      • Week 4 – Character Design
      • Week 5 – Narratives
      • Week 6 – Gameplay and Game Systems
      • Week 7 – Feedback week
      • Week 8 – Audio
    • Research
      • Analysing Existing Games
      • Genre Research
      • Research into Psychological Abuse
      • Character Research/Moodboards
      • Environment/Map Research
      • Researching Medieval Knights
      • Researching Enemies
      • UI Research
    • Ideation & Development
      • Initial Development
        • The Essential Experience
        • Initial Game Ideas
        • Choosing a Game Genre
        • Choosing the Game’s Title
      • Game Play
        • Gameplay Loops
        • Mechanics/Tech
      • Story/Narrative
        • Twine
        • Summary of Narrative and Story
      • Game Art
    • GDD
      • Game Overview
      • Game’s Vision
        • Game Pillars
        • Project Focuses
      • Gameplay
        • Mechanics
        • Skills
        • Enemy Behaviour
      • Story & Narrative
        • Twine Prototype
        • Story
        • Narrative
      • Character & NPC Profiles
      • Map/ Level Design
      • UI & HUD
        • Creating the logo
      • Prototype/ Proof of Concept
      • Sound
      • Target Audience
      • Controls & Platform Specs
Menu

Player – Pt 1

Posted on March 10, 2025May 9, 2025 by et4g23

For the first week, I wanted to focus on the Procedural Room Generation aspect of Lament. Therefore, for this week I only created a simple Player gameobject.

To start a created a 2D square sprite gameobject and named it ‘Player’. I gave the player a RigidBody 2D component and a Box Collider 2D. These component will help me in the future when it comes to physics, checks and movement etc.

Moving the player

Firstly, I created references to a Vector 2 data structure called ‘movement’; the players RigidBody2D called ‘rb’ and a public float variable called moveSpeed.

Using the RigidBody2D component, I can alter its position (affectively teleporting it) using the RigidBody2D.MovePosition function. This method of moving the player does not require forces, this gives the player controller a responsive and smooth feeling. Also, not using forces allows me to use forces for other features of the game, things like a dash or knockback etc. Furthermore, if I had used forces to move the player, I would need to create a drag/deceleration feature to prevent the player from sliding.

However, as this method for moving the player uses the RigidBody2D component, all of the logic needs to be put in the FixedUpdate( ) method and not the Update( ). This is to ensure that all of the physics updates that are made are consistent throughout gameplay. Additionally, in the MovePosition function, its movement has to be multiplied by Time.fixedDeltaTime to ensure that physics updates are made consistently regardless of framerate, making all systems run the game equally.

In order to get input from the player, I used Input.GetAxisRaw( ) functions, this returns the value of the player pressing WASD for both of the 2D axises. This is then multiplied by the moveSpeed int and Time.fixedDeltaTime to move the player.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

©2025 E-Jay Tripoli | Built using WordPress and Responsive Blogily theme by Superb