In this chapter, we will show how to create a game world by storing information in the memory. We will introduce basic (numerical) types and variables and how they can be used to store or change information. We will discuss the difference between instructions and expressions, and we’ll introduce a number of operators that can be used to combine expressions. We will show you how to store more complicated information such as sprites and sounds and how you can use them to draw a nice-looking game world with sounds. We will present a few examples that illustrate how the information stored in the memory is updated and drawn in the game loop.
Unable to display preview. Download preview PDF.