075_《Delphi图形和游戏编程突破》

简介: 《Delphi图形和游戏编程突破》 Delphi 教程 系列书籍 (075) 《Delphi图形和游戏编程突破》 网友(邦)整理 EMail: shuaihj@163.

《Delphi图形和游戏编程突破》

Delphi 教程 系列书籍 (075) Delphi图形和游戏编程突破》 网友(邦)整理 EMail: shuaihj@163.com

下载地址:

Pdf

Delphi图形和游戏编程突破

  • by John Ayres
  • Wordware Publishing, Inc.
  • ISBN: 1556226373 Pub Date: 12/01/99

内容简介

In the beginning, there was darkness. In this Age of Innocence, the unwashed masses practiced the art of

entertainment with small pieces of paper bearing symbolic images of kings, queens, and jesters. Sometimes,

they used minute pieces of metal and plastic, shaped like various real-world objects, moving them about on

large, colored cardboard sheets in accordance with the runes inscribed upon small white cubes. To the casual

observer, all was content, but in the minds of the newest generation born of this age, there was a yearning for

more. Unbeknownst to the world, this yearning grew, and soon these young pioneers began working in the

dark recesses of colleges and universities to bring about a change that would alter the course of history in

ways no learned scholar could have ever imagined. Brandishing vacuum tube sabers and using arcane words

of power such as RAM, ROM, Bit, and Byte, these acolytes of technology brought forth a new creation

known as the Computer. But, their new creation was naive, and lacked intelligence or sophistication; to

control it, they had to use a mystical, magical language known as Code. Thus, the Art was born, and a new era

had begun.

The First Age was marked by the genesis of immense, hulking beasts that required enormous resources to

sustain life. These new life forms were rare, but typically stood several stories tall and required incredible life

support systems to maintain an agreeable environment. These giants were moody and possessed little

intelligence, but through great effort, they could be trained to perform incredible feats, for their day. The

digital landscape was dotted with few of these behemoths, and their trainers were monk-like in their

dedication. Unable to break free of their confines due to the immense size of their charges, these monks were

forced to toil maddeningly long hours. Their torturous task of preparing the vegetarian meal of holy leaves

consumed by these monsters had them working late into the night, and the Art required to create these holy

leaves was arcane indeed.

These monks practiced the great Art in the same dark recesses from whence it was conceived, and the Art

grew. The once young pioneers had become pedantic, wizened old masters. These old wizards were still

rebellious and, yearning for a new form of entertainment, they used the Art in ways that the Powers That Be

felt were unproductive. Away from the watchful eyes of their overseers, they shaped the Art in ways that

previously existed only in their dreams.

In the dark hours of the morning, these masters used the Art to coax the new creations into providing their

long-sought-after entertainment, and they played games such as Tic-Tac-Toe and Pong. Several of these

wizards used the Art to create much more sophisticated forms of entertainment, and played games such as

Checkers and Chess with their silicon automatons. In the wake of the First Age, walking in the shadow of the

evolving Art, a new form of the Art began to grow.

Like dinosaurs, the reign of these behemoths was relatively short-lived. A new catalyst known as the

Corporation had used the knowledge learned in the First Age to effect an evolutionary step known as the

Home PC. Thus, the Second Age began.

In the Second Age, the pantheon of overlord gods began to form, controlling the evolution of this new

creation from on high. Deities known as Gates and Jobs worked their mystical creation power behind the

curtains of reality, but their new creations were protozoan in nature. A step back from their massive

predecessors, these new single-cell machines were much less sophisticated and powerful, and teetered on the

edge of extinction almost as soon as they had appeared. However, these new creatures had become visible to

the unwashed masses, and began to elicit their attention. At first, few of the Untrained could afford to adopt

one as a pet, but their popularity grew, and soon many of these creations made their homes on desktops in

homes and businesses. The Art, still arcane in nature, had begun to emerge from its dark recesses, and several

of the Untrained began to delve into its mystical powers.

The Net, the once-dark netherworld populated solely by the wizards and masters of the Art, has now become a

tourist attraction, replete with amusement parks, rest stops, and gift shops. Rumors of new CPUs with speeds

in excess of 1,000 MHz are being whispered in the dark corners of cyber cafÈs and coffee shops. Thus, we

stand at the dawn of yet another New Age. As the sun breaks over the distant horizon, its golden, shimmering

rays cascading over the silicon juggernaut that stands before us, the prospects of the future are at once both

exciting and frightening.

Thus, our journey begins.

目录

CHAPTER 1—The Lure of Game Programming

The Dark Side of the Game Programming Industry

Difficult Learning Curve

Long Hours

Corporate Instability

The Light Side of the Game Programming Industry

Fun and Rewarding

Fame and Fortune

The People

Game Programming, In Delphi?

Delphi as a Games Development Platform

Opportunities

Untapped Markets

Types of Games

Real-Time Strategy

Turn-Based Strategy

First-Person Shooters

Adventure Games

Action Games

Puzzle Games

Sports Games

Board and Card Games

Simulations

Windows, Delphi, and Games

Summary

CHAPTER 2—The Anatomy of a Game

Game Dissection: The Vital Organs

Graphics

Sound

User Input

Real-Time Event-Driven Programming

Basic Game Architecture

Initialization

Introduction

Game Startup

The Game Loop

Game Ending

Shutdown and Exit

The Game Loop

Retrieve User Input

Perform Antagonist AI and Other Game Logic

Update Sprite Positions

Check for Collisions

Start Sound Effects

Start Music

Render the Next Frame

Check for Game End

Speed Delay

Game States

The Demo State

The Playing State

The Intermission State

The Paused State

The Game Over State

Case Study

Summary

CHAPTER 3—Basic Graphics Programming

The Graphical Device Interface

Graphical Elements

Pixels

Lines

Polygons

Bitmaps

Graphical Element Classifications

Video Mode Resolutions and Color Depth

Resolution

Color Depth

Video Board Memory

The Components of a Color

Palettized Modes

Non-palettized Modes

Graphics Output Techniques

The Device Context

Painting on the Canvas

Bitmap Essentials

Bitmap Types: DDB and DIB

The TBitmap Object

Raster Operations

Simulating Transparency

Palettes

Logical vs. System Palettes

Using a Palette

Further Adventures in Windows Programming

Summary

CHAPTER 4—An Introduction to DirectX

What is DirectX?

The Promise of DirectX

Benefits and Drawbacks of DirectX Programming

The DirectX Architecture

DirectX Components

DirectX and Delphi

The DirectX SDK

Project JEDI

Other Components and Headers

A DirectDraw Tutorial

Features

Functional Overview

COM Fundamentals

Surfaces

Page Flipping

Resolution, Color Depth, and Video Memory

Windowed Versus Full-Screen

Initializing DirectDraw

Rendering with GDI

Flipping the Surfaces

Displaying Bitmaps

Surface Memory Location

Loading and Displaying the Bitmap

Blitting Surfaces

Lost Surfaces

Retrieving DirectDraw Capabilities

The DirectX Baseline Application

DirectX Result Codes

Retrieving the DirectX Version

Summary

CHAPTER 5—Palettes

What is a Palette?

The IDirectDrawPalette Object

Creating the Palette Object

Defining Palette Colors

Using the Palette Object

Disconnecting Palettes

Palettes and GDI Functions

Palette Animation

Animating the Palette

Screen Transitions

Summary

CHAPTER 6—Sprite Techniques

The Illusion of Animation

Constructing the Animation Frames

Producing the Animation

The Illusion of Motion

Sprite Attributes

The Animation Cycle

Transparency Issues

Color Keying

Pixel Checking

Collision Detection

Bounding Boxes

Pixel Overlap Comparison

Animation Issues

Timing

Z-Order

Summary

CHAPTER 7—Input Techniques

Human/Computer Interaction

Input Devices

Input Considerations

DirectInput

Features

Functional Overview

Initializing DirectInput

Retrieving Input Data

Keyboard Input

Mouse Input

Game Controller Input

Summary

CHAPTER 8—Force Feedback

Features

Functional Overview

Basic Concepts

Kinetic Force

Condition

Magnitude

Coefficient

Duration

Sample Period

Gain

Axes

Direction

Envelope

Force Feedback Effects

Base Effect Structure

Creating Effects

Create and Acquire the DirectInput Device

Query for Force Feedback Support

Initialize a TDIEffect Structure and the Type-Specific Parameters Structure

Create the Effect Object

Download the Effect

Start the Effect

Stop the Effect

Case Study

Additional Effect Considerations

Retrieving Effect Status

Retrieving the Force Feedback System State

Sending Commands to the Force Feedback System

Modifying an Effect at Run Time

Envelopes

Summary

CHAPTER 9—Sound and Music

Sound Effects

Simplistic Sound Effects

DirectSound

Music

MCISendCommand

MIDI

CD Audio

Summary

CHAPTER 10—Optimization Techniques

Optimization Theory

Timing Code

Examining the Algorithm

Effective Optimization

Delphi-Specific Optimization Techniques

Automatic Compiler Optimizations

Additional Compiler Optimizations

Other Delphi-Specific Optimization Techniques

General Optimization Techniques

Loop Unrolling

Lookup Tables

Binary Bit Shifting

Additional Optimization Considerations

Summary

CHAPTER 11—Special Effects

Bitmap Manipulation

Bitmap Transformations

Scaling

Rotation

Lighting Tricks

Transition Effects

Simple Texture Mapping

Dynamic Images

Star Fields

Fire

Summary

CHAPTER 12—Artificial Intelligence Techniques

Movement

Random Movement

Aggression/Evasion

Patterned Movement

Finite State Machines

Probability Machines

Path Finding

Algorithms

Basic Implementation

Back Stepping

Case Study

Enhancements

Summary

CHAPTER 13—Putting It All Together

Delphi Blocks

General Game Architecture

Player Advancement

Game States

User Input

Sound and Music

Graphics

Enhancements

The Case Study Code

Summary

Appendix A

Glossary

Bibliography

Index

相关文章
|
人工智能 编解码 Windows
027_《Delphi Direct X 图形与游戏程序设计》
《Delphi Direct X 图形与游戏程序设计》 Delphi 教程 系列书籍 (027) 《Delphi Direct X 图形与游戏程序设计》 网友(邦)整理 EMail: shuaihj@163.
1425 0
|
开发者
107_《Delphi5程序设计与控件参考》
《Delphi5程序设计与控件参考》 Delphi 教程 系列书籍 (107) 《Delphi5程序设计与控件参考》 网友(邦)整理 EMail: shuaihj@163.com 下载地址: 下载 作者: 王小华 丛书名: 软件开发者丛书 出版社:电子工业出版社 ISBN:7505358022 上架时间:2002-1-28 出版日期:2000 年6月 页码:452 版次:1-2 内容简介 本书重点介绍了Delphi 5一百多个常用控件的属性、方法、事件,并对重点控件辅以例子说明。
1397 0
|
数据库 计算机视觉 Windows
054_《奇思异想编程序Delphi篇》
《奇思异想编程序Delphi篇》 Delphi 教程 系列书籍 (054) 《奇思异想编程序Delphi篇》 网友(邦)整理 EMail: shuaihj@163.
1282 0
|
缓存 数据可视化 开发工具
076_《OpenGL图形程序开发实务》
《OpenGL图形程序开发实务》 Delphi 教程 系列书籍 (076) 《OpenGL图形程序开发实务》 网友(邦)整理 EMail: shuaihj@163.com 下载地址: Pdf 作者: 薛惠锋 吴慧欣 解丹蕊 出版社:西北工业大学出版社 ISBN:7561219393 上架时间:2006-9-6 出版日期:2005 年8月 开本:16开 页码:293 版次:1-1 内容简介 OpenGL作为一种图形工业标准,在实际工作中应用广泛并占有非常重要的地位。
1533 0
|
SQL 数据库 开发工具
102_《Delphi5编程实例与技巧》
《Delphi5编程实例与技巧》 Delphi 教程 系列书籍 (102) 《Delphi5编程实例与技巧》 网友(邦)整理 EMail: shuaihj@163.com 下载地址: 下载 作者: 王华等 丛书名: 软件开发技术丛书 出版社:机械工业出版社 ISBN:7111078012 上架时间:2000-7-1 出版日期:2000 年2月 页码:432 版次:1-1 内容简介 Delphi是由Inprise公司推出的面向对象的可视化软件开发工具。
1597 0
|
BI 数据库 容器
065_《Delphi7组件编程参考手册》
《Delphi7组件编程参考手册》 Delphi 教程 系列书籍 (065) 《Delphi7组件编程参考手册》 网友(邦)整理 EMail: shuaihj@163.
1268 0
|
API Windows 程序员
084_《Windows网络编程之Delphi篇》
《Windows网络编程之Delphi篇》 Delphi 教程 系列书籍 (084) 《Windows网络编程之Delphi篇》 网友(邦)整理 EMail: shuaihj@163.com 下载地址: Part1 Part2 Part3 作者: 萧秋水 文娟 丛书名: 计算机编程系列丛书 出版社:清华大学出版社 ISBN:7900630945 上架时间:2001-2-27 出版日期:2001 年1月 页码:280 版次:1-1 内容简介 Internet技术无疑是当今计算机技术的最大热点。
2947 0
|
数据库 数据管理 SQL
112_《Delphi2高级程序设计指南》
《Delphi2高级程序设计指南》 Delphi 教程 系列书籍 (112) 《Delphi2高级程序设计指南》 网友(邦)整理 EMail: shuaihj@163.
1095 0
|
数据可视化 数据库 开发工具
048_《Delphi简明教程》
《Delphi简明教程》 Delphi 教程 系列书籍 (048) 《Delphi简明教程》 网友(邦)整理 EMail: shuaihj@163.com 下载地址: Pdf 郑 洪 编著 张 晋 审校 内容简介 Delphi 5 是由软件界的巨头人士、著名的Inprise 公司开发的新一代可视化程序开发工具,一直以来受到计算机编程爱好者和各机构专业认识的广泛青睐。
1166 0
|
BI 语音技术 数据库
068_《Delphi7控件实用程序设计100例》
《Delphi7控件实用程序设计100例》 Delphi 教程 系列书籍 (068) 《Delphi7控件实用程序设计100例》 网友(邦)整理 EMail: shuaihj@163.
1651 0