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

Chapter 2. Your Point of View

Imagine that you are making a video. You've got your cell phone out, and you point it at the area that you want to shoot and press record. You're taking a video of the Grand Canyon, so you have to pan the camera around to get the whole scene in. Suddenly, a bird flies past the field of view, and you've captured the whole scene.

The preceding scenario is pretty much how games work as well. The game has a virtual camera that can be positioned and even moved around. Similarly to the video camera on your cell phone, the game camera can only see a part of the game world, so sometimes you have to move it around. Any game objects that move in front of the camera will be seen by the player.

This chapter will explain how things are rendered in the game. Rendering is the process of actually displaying images on the screen. In order to get your get your game onto the screen, you will need to have a solid understating of the following terms:

  • Coordinate systems: The coordinate system is the reference that allows you to position objects in the game
  • Primitives: Primitives are the fundamental building blocks of the images that you see on screen, and OpenGL was designed to work with them
  • Textures: Textures are image files that are used to give the objects in your game a realistic appearance

By the time you have read this chapter, you will understand how to use images to build your game world and display it on the screen.

主站蜘蛛池模板: 金山区| 鄂尔多斯市| 红原县| 璧山县| 鄂托克前旗| 封丘县| 房产| 沾化县| 达孜县| 石家庄市| 沭阳县| 广安市| 墨玉县| 正宁县| 定结县| 泽普县| 玉溪市| 黄冈市| 灌云县| 德兴市| 西林县| 永泰县| 清河县| 三台县| 三明市| 连南| 舒兰市| 浦城县| 东乡族自治县| 美姑县| 通辽市| 盐边县| 宝应县| 陆良县| 洮南市| 龙南县| 佛坪县| 海伦市| 广州市| 盈江县| 泰顺县|