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

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
主站蜘蛛池模板: 钟祥市| 姚安县| 涟水县| 扎囊县| 黄大仙区| 淳安县| 永城市| 遵义县| 长宁县| 界首市| 柳河县| 文安县| 当雄县| 青州市| 永吉县| 庆阳市| 忻城县| 长沙县| 芦溪县| 环江| 鹤峰县| 贡山| 云安县| 休宁县| 陇南市| 吉林市| 色达县| 景洪市| 七台河市| 武隆县| 福海县| 磴口县| 闸北区| 十堰市| 陕西省| 牡丹江市| 汝城县| 周至县| 通海县| 宁城县| 兴城市|