Game Development Task 3 Game prototype
28 October 2024 - 15 December 2024
WANG ZILONG(0361141)
Game development | Bachelor of Design in Creative Media | Taylor's University
Introduction
In the process of 2D game development, design is not only about the choice of art style, but also involves the full creation of everything from UI interface to character and level mechanism. In this blog, I will elaborate on the content involved in the development process, including UI design, character control, enemy scripts, level mechanism and special design of the second level. These elements provide indispensable support for building a complete game experience.
Fig 1.1 Edit UI for the start interface Add jump scene event
Fig 1.2 Bind the button event jump
Fig 1.3 Build the level environment
1. Start interface and UI editing
The start interface is the first impression of the player when contacting the game, so it must not only be beautiful but also have clear functions.
(1) UI design and event binding
Core function: By designing the jump scene event of the button, ensure that the player can seamlessly switch between the start interface and the game scene.
Key steps:
Create a button and bind an event script to it.
Realize scene switching when the event is triggered (such as entering the game main interface or setting interface).
(2) User experience optimization
In UI design, clear navigation and intuitive button layout are the key points. For example:
Button style: Use color and dynamic effects (such as button click animation) to guide the player's attention.
Background design: Add a background image that matches the game theme to the start interface to enhance immersion.
Fig 1.4 Character control script
Fig 1.5 They are the character's movement control, the character's health, picking up gold coins and fruits
The character PlayerMove contains the character's various states, such as jumping, climbing back and forth, and sprinting
Fig 1.6 PlayerHealth controls the player's health script
Fig 1.7 Fruits and Coins are triggers for picking up fruits and coins.
Fig 1.8 The enemy script is mainly for Enemy to realize the collision with the enemy, then the collision will reduce the blood and deduct the player's health
The enemy also has a rigid body and a collision body Boxcllider2d
2. Level environment construction
The level environment is the core stage for the player's adventure. In "Tribal Quest", each level contains carefully designed platforms, props and obstacles.
(1) Platform design
Provide players with multiple path options for jumping, climbing and falling. For example:
Normal platform: Supports character standing and jumping.
Penetratable platform: Allows players to press the S key to fall, providing flexible movement.
(2) Scene switching
Add a door trigger to trigger the script when the player reaches the target area to achieve scene transition (such as switching from the first level to the second level).
Provide visual and sound prompts to enhance the player's sense of achievement in passing the level.
Fig 2.1&2.2 The ground spikes will deduct blood
Fig 2.3&2.4 The gear also needs to be hit to reduce health. At the same time, add a script MovePlat to move back and forth
Fig 2.5&2.6 Design platforms so that players can go up and press the S key to get down
Fig 2.7&2.8 A door script, triggering behind the door to switch scenes
And a UI trigger, both are controlled by triggering
3. Character control script design
Character behavior control is the core of the gameplay, including movement, health management and prop pickup.
(1) Character movement script
PlayerMove script: responsible for various character movement states, such as jumping, wall climbing, sprinting, etc.
Function optimization: through smooth animation and accurate physical feedback, ensure that each player's action is natural and in line with expectations.
(2) Health and item pickup
PlayerHealth script: manages the player's health value, ensuring that the player's health reduction can be correctly displayed and fed back to the UI when the player is hurt.
Fruits and Coins script: design a trigger mechanism, and the player automatically picks up and counts fruits or coins when touching them, which is used to complete game goals or unlock abilities.
Fig 3.1 Player climbing script
Fig 3.2 When touching the stairs, a climbing animation is performed
The fan uses Area Effector to set the wind speed
Fig 3.3&3.4 Bounce Script
Fig 3.5 When the player enters, add an upward force to him to achieve a bouncing effect
When the button mechanism touches an object, it will have a pressing effect and trigger the door opening animation
4. Enemy script and interaction mechanism
Enemy is an important part of the level challenge. Through behavior scripts and physical collision mechanisms, a variety of enemy interactions are constructed.
(1) Enemy behavior design
Enemy script: basic functions include collision reduction. When the player contacts the enemy, the health value decreases.
Enemy3 script: enhanced version function, adding left and right point movement scripts, allowing the enemy to move back and forth within a fixed range, increasing dynamics and challenges.
(2) Application of physical components
Enemies are equipped with rigid bodies and BoxCollider2D collision bodies to ensure realistic physical effects of interaction with players and the environment.
Dynamic behaviors such as movement and attack animations are combined to enhance the presence of enemies.
5. Design of mechanisms and traps
Mechanisms and traps provide players with diverse challenges and enrich the fun and tension of the levels.
(1) Trap types
Ground spike trap: When the player touches it, health points are deducted. Visually, sharp wooden spikes and red danger signs indicate danger.
Gear trap: Combined with the movement script (MovePlat), gears can move within a fixed area, increasing the difficulty for players to dodge.
(2) Button mechanism
Add an interactive button that triggers the door opening animation when the player touches it, and at the same time, the dynamic effect of pressing the button (such as the button sinking) is fed back.
6. Special design of the second level
The content of the second level further enhances the playability and challenge of the game through unique mechanisms.
(1) Climbing script
When the player touches the stairs, the climbing animation is triggered to simulate a real climbing experience.
The stairs are set as the trigger area to ensure smooth action switching after the player enters.
(2) Fan and Bounce Mechanism
Fan Mechanism: Use Area Effector2D to simulate wind and push the player into the air or to a specific area.
Bounce Mechanism: When the player touches a specific area, the script gives an upward force to enable jumping or reaching a high platform.
(3) Comprehensive Scene Design
In the second level, a complex level path is designed by combining multiple dynamic elements (such as fans, gear traps, and bounce areas). Players need to flexibly use skills and strategies to pass the challenge.
Conclusion
Build a complete game experience from details
In the development process of "Tribal Quest", every design link is aimed at improving the player's gaming experience. From the intuitive operation of the UI interface, to the interaction between characters and enemies, to the complex level mechanism, all elements work together to build a rich adventure world.
Through this development, I deeply appreciate the charm and challenges of 2D game design. In the future, I hope to further optimize these designs and introduce more innovative mechanisms to bring players a more diverse experience. If you are also designing a similar 2D game, I hope this blog can provide you with inspiration and help!
Comments
Post a Comment