Games104 Introduction to Modern Game Engines - Lecture15 Game Engine Gameplay System Basics
1 Three Challenges of GamePlay
2 Gameplay event mechanism
Should be changed to event message mechanism
1 Publish-subscribe mode
event definition;
callback
1 Event Definition
2 callback
activate, trigger
3 Message distribution
This efficiency is very low, the memory is used a lot, and it becomes very slow
data-oriented programming
3 event queue
Issues with event queues:
3 game logic
Hot update hotfix.
Designer, with no programming training,
1 scripting language
Scripting language: will not crash the ontology.
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.
The engine calls the script, and the script expands the service.
2 hot update
Engineering Robustness.
The combination of the scripting system and the engine requires careful consideration.
JIT:
LUa: There is no built-in library, and many times you need to write it yourself.
Python: very heavy, requires virtual memory.
Lua saves memory, python requires a lot of memory, and c# is a balance point.
4 Visual Scipting
Visual Scripting: Blueprints
Non-Procedural Background: Programming is Difficult,
Variables Visualization:
Statements Visualization:
Controls:
Functions:
Class:
Engine is a production tool
debug:
Problems with Visual Programming Engineering:
Question 1:
Question 1:
graph: essentially a visual script
5 3C system
character, controls, camera
1 Character
1 character movement
A role is generally done with a state machine.
2 control
Adsorption function:
force feedback + light
Movie: passive
Game: active, the interaction between the game world and me.
Determine the feel of the game.
3 Camera
The spring force of the camera system,
the parameters of the camera, and
the subjective feeling of the person
The pupils will dilate when they are afraid.
subjective feeling.
The camera has a huge impact on the expressiveness of the game.
Essence: gameplay, everything, cannot define boundaries
Use events for information distribution.
Different types of games have their own frameworks.
6 questions
Visual scripting and scripting are not substitutes. The existing scripting system is doing visual scripting and supports both.
For game developers who want to be open,
some platforms prohibit hot
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.