Games104 Introduction to Modern Game Engines - Lecture15 Game Engine Gameplay System Basics

insert image description here

1 Three Challenges of GamePlay

insert image description here
insert image description here
insert image description here

2 Gameplay event mechanism

insert image description here
Should be changed to event message mechanism
insert image description here

1 Publish-subscribe mode

insert image description here
event definition;
callback

insert image description here

1 Event Definition

insert image description here
insert image description here
insert image description here

2 callback

activate, trigger
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

3 Message distribution

insert image description here
This efficiency is very low, the memory is used a lot, and it becomes very slow
insert image description here
insert image description here

insert image description here
data-oriented programming

3 event queue

insert image description here
insert image description here
insert image description here
insert image description here

Issues with event queues:
insert image description here
insert image description here

3 game logic

Hot update hotfix.
insert image description hereinsert image description here
Designer, with no programming training,

insert image description here

1 scripting language

Scripting language: will not crash the ontology.
insert image description here

insert image description here
insert image description here
Unity belongs to this architecture!

Between the scripting language and the engine, the most difficult thing is object management.
C++ is prone to memory leaks.

GC system of scripting language, the algorithm will be very slow. How to optimize GC, don't take up a lot of resources.
Who is in charge of the object.
insert image description here

The engine calls the script, and the script expands the service.
insert image description here

2 hot update

Engineering Robustness.
The combination of the scripting system and the engine requires careful consideration.
insert image description here

JIT:
insert image description here
insert image description here

LUa: There is no built-in library, and many times you need to write it yourself.
Python: very heavy, requires virtual memory.
insert image description here
Lua saves memory, python requires a lot of memory, and c# is a balance point.
insert image description here

4 Visual Scipting

Visual Scripting: Blueprints
Non-Procedural Background: Programming is Difficult,
insert image description here
insert image description here
insert image description here
Variables Visualization:
insert image description here
Statements Visualization:
insert image description here
insert image description here
Controls:
insert image description here
insert image description here
Functions:
insert image description here

insert image description here

Class:
insert image description here
Engine is a production tool

debug:
insert image description here

Problems with Visual Programming Engineering:

Question 1:
insert image description here

Question 1:
insert image description here
graph: essentially a visual script

insert image description here

5 3C system

character, controls, camera
insert image description here

1 Character

insert image description here

1 character movement

insert image description here
insert image description here
insert image description here
insert image description here
A role is generally done with a state machine.

insert image description here

2 control

insert image description here
2
insert image description here
Adsorption function:
insert image description here
insert image description here
force feedback + light
Movie: passive
Game: active, the interaction between the game world and me.
insert image description here
insert image description here
Determine the feel of the game.

3 Camera

insert image description here
insert image description here
insert image description here
The spring force of the camera system,
insert image description here
the parameters of the camera, and
the subjective feeling of the person
The pupils will dilate when they are afraid.

insert image description here
insert image description here
insert image description here

subjective feeling.
insert image description here
insert image description here
The camera has a huge impact on the expressiveness of the game.
insert image description here
Essence: gameplay, everything, cannot define boundaries
Use events for information distribution.
Different types of games have their own frameworks.

6 questions

insert image description here
Visual scripting and scripting are not substitutes. The existing scripting system is doing visual scripting and supports both.
insert image description here
For game developers who want to be open,
some platforms prohibit hot
insert image description here
updates and the logic is very open.
For modern games, logic and performance are becoming more and more intensive. Character detail requirements are getting higher and higher.
In the future of PC gaming, gameplay and performance are increasingly difficult to separate.

Guess you like

Origin blog.csdn.net/qq_41286360/article/details/126007552
Recommended