Game Scripting Mastery
Published: 2024-02-19 03:36:22

百分之九十的3D游戏都是先开发一个游戏引擎，然后用脚本语言实现引擎接口在虚拟机上，actual game logic is more important。
this book is talking about compiler theory,virtual machines, and multithreading。
By the end of the book you’ll be able to write a compiler and a virtual machine

the true challenge will be immersing players in settings and worlds that exert a genuine sense of atmosphere and organic life

A game should have compellingly animated detail and believable responsiveness

The point is to figure out why.
# Part One Scripting Fundamentals

The majority of this material won't do you much
good if you don't know what scripting is or why it's important. Like I said, you can follow
this book whether or not you've even heard of scripting. The introduction provides
enough background information to get you up to speed quick

## Charpter 1 An Introduction To Scripting

■ An overview of what scripting is and how it works.
■ Discussion on the fundamental types of scripting systems.
■ Brief coverage of existing scripting systems.

### What is Scripting？

Firstly introduce RPG and cover the basic tasks involved in its production.
The first thing we need is the game engine（Details in the book）.Next up we are going to need garphics.Then
music and sound.

### STRUCTURED GAME CONTENT-A SIMPLE APPROACH
Firstly coding all data into the engine.

Think about it this way—coding game content directly into your engine is a little like wearing a
tuxedo every day of your life

# Part Two Command-Based Scripting

Developing a complete, high-level scripting system
for a procedural language is a complex task. A very complex task. So, we start off by setting our sights a bit lower and implementing what I like to call a "command-based language." As you'll see, command-based languages are dead simple to implement and
capable of performing rather interesting tasks

# Part Three Introduction to Procedural Scripting Languages

Part 3 is where things start to heat up, as we get our feet wet with real world, high-level scripting. Also covered in this section are complete tutorials on using the Lua, Python and Tcl languages, as well as integrating their associated runtime environments with a host application

# Part Four Designing and Implementing a Low-Level Langauge

At the bottom of our scripting system will lie an assembly language and corresponding machine code (or bytecode). The design and implementation of this low-level environment will provide a vital foundation for the later chapters

# Part Five Designing and Implementing a Virtual Machine

Scripts—even compiled ones—don't matter much if you don't have a way to run them. This section of the book
covers the design and implementation of a feature-packed virtual machine that's ready to be dropped into a game engine

# Part Six Compiling High-Level Code

The belly of the beast itself. Executing compiled
bytecode is one thing, but being able to compile and ultimately run a high-level, procedural language of your own design is what real scripting is all about

# Part Seven Completing Your Training

Once you've earned your stripes, it's time to direct that knowledge somewhere. This final section aims to clear up any questions you may have in regards to furthering your study. You'll also see how the scripting system designed throughout the course of the book was applied to a complete game.