TAILIEUCHUNG - Game Programming All in One 2 nd Edition phần 3

giả mạo chương của mình về phía trước với rất nhiều điều tôi đã không được thảo luận được nêu ra, chẳng hạn như phát hiện va chạm và bàn phím đầu vào, nhưng các trò chơi chiến xe tăng được tạo ra trong chương này sẽ giúp bạn hấp thụ tất cả các thông tin trình bày do đó đến nay. | CHARTER 4 Writing Your First Allegro Game This chapter forges ahead with a lot of things I haven t discussed yet such as collision detection and keyboard input but the Tank War game that is created in this chapter will help you absorb all the information presented thus far. You ll see how you can use the graphics primitives you learned in Chapter 3 to create a complete game with support for two players. You will learn how to draw and move a tank around on the screen using nothing but simple pixel and rectangle drawing functions. You will learn how to look at the video screen to determine when a projectile strikes a tank or another object how to read the keyboard and how to process a game loop. The goal of this chapter is to show you that you can create an entire game using the meager resources provided thus far in the form of the Allegro functions you have already learned and to introduce some new functionality that will be covered in more detail in later chapters. Here is a breakdown of the major topics in this chapter Creating the tanks Firing weapons Moving the tanks Detecting collisions Understanding the complete source code Tank War If this is your first foray into game programming then Tank War is likely your very first game There is always a lot of joy involved in seeing your first game running on the screen. In the mid-1980s I subscribed to several of the popular computer magazines such as Family Computing and Compute which provided small program listings in the BASIC 119 120 Chapter 4 Writing Your First Allegro Game language most often games. I can still remember some of the games I painstakingly typed in from the magazine using Microsoft GW-BASIC on my old Tandy 1000. The games never ran on the first try I would often miss entire lines of code even with the benefit of line numbers in the old style of BASIC. Today there are fantastic development tools that quite often cost nothing and yet incorporate some of the most advanced compiler technology available.

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.