官术网_书友最值得收藏!

Chapter 2. Setting Up Your Warrior

Once we have the project set up and running, it is time to start making the game itself and put something together that we can call a playable game.

The most important part of any game is the player controller. Regardless of the game genre and type, the player has to control the game somehow. It may be in the form of controlling the environment or controlling a character through the environment, or even something else.

Because the game we are building here is a third-person type of game, our players will have to control a character (I'm calling him The Gladiator). This character will be based on the Unreal character class, as it gives us many benefits and saves us lots of time because the character class is basically a Pawn class and pawns are actors that are controlled either by the player or AI. The character class we are building is going to be fully controlled by mouse and keyboard or the gamepad controller.

Keep in mind that we are building our own character class from scratch and not basing our character on the Unreal one, so this process will take a long time. Almost 90% of Unreal game characters are based on the unreal character class, and that's the reason behind having some base classes shipped with the engine.

The character controller we are going to create will be able to walk, jump, control the camera, play animations, switch weapons, affect enemies, get affected by enemies, show some statistics in the UI, read weapon data from the data tables and, most importantly, die when it is the time to die!

By the end of this chapter, you will be able to:

  • Build the character class in C++
  • Write movement logic
  • Map key inputs into the player controller logic
  • Build the character animation blueprint
  • Add an animated mesh, and display animations from the character class
  • Add sockets to the skeletons
  • Build animation blend spaces and use them
  • Assign and use any character as the default game character
主站蜘蛛池模板: 宝兴县| 尼木县| 白沙| 迭部县| 博野县| 江川县| 泸水县| 和平区| 侯马市| 瓦房店市| 龙山县| 仁怀市| 黄陵县| 龙井市| 涪陵区| 丹寨县| 甘肃省| 若羌县| 遵义县| 贵溪市| 金坛市| 仪征市| 体育| 冕宁县| 嘉黎县| 周口市| 旺苍县| 青浦区| 威宁| 宁强县| 桂平市| 吉安县| 时尚| 民丰县| 鄂州市| 商都县| 宜城市| 东港市| 河源市| 叶城县| 宁德市|