UGC In Game : A Brief History and How We Bring It To Mobile | Zhuo Yue
1. UGC In Game:
A Brief History And
How We Bring It To Mobile
Name Zhuo Yue
Job Title Senior Engineer
Company Tencent
2. What does UGC mean in video games?
From wiki:
...Video games can have fan-made content in the form of mods, fan
patches, fan translations or server emulators. Some games come
with level editor programs to aid in their creation. A few massively
multiplayer online role-playing games ... have UGC systems integrated
into the game itself. A metaverse can be a user-generated world...
User-generated content
4. Doom
1981 : Castle
Wolfenstein
1993 :
Doom
Year: 1993
★First commercial game to
provide user-friendly modding
support/tools
★WAD files! (Media assets
separated from game engine)
Inspired by Wolfenstein 3D
(1992) mods
5. Doom : WAD file
1981 : Castle
Wolfenstein
1993 :
Doom
Where's All the Data?
Pros
• An important step to make modding easier!
• Level structures, Graphics, SFX, Music...
• IWAD(base) and PWAD(patch)
• Easy to share
• Open and extendable data lump structure (like data chunks)
• Lots of third-party editors!
Cons
• Only one IWAD & PWAD can be loaded at a time
• No behaviors...(had to patch game exe)
Media assets separated
from game engine
7. Quake
1981 : Castle
Wolfenstein
1993 :
Doom
• Year: 1996(Quake) / 1998(Quake II)
• Evolutionary 3D engine
• WAD / BSP / PAK files
• Quake Introduced QuakeC as scripting
language(which was replaced by DLL subsystem in Quake II)
• Level editors
• Console alias
• Built-in demo record functionality
1996 :
Quake
8. QuakeC Language & DLL Sub System
1981 : Castle
Wolfenstein
1993 :
Doom
1996 :
Quake
QuakeC
• Interpreted language based on C syntax
• Ability to control much of the game
logic
• Weapons
• Enemy AIs
• Triggers
• Game rules
• ...
• Officially released qcc compiler
(with source code)
DLL Sub System (Quake II)
• Pre-compiled C/C++ DLLs to be
loaded by the game
• Used by Quake II and later games
• Can do EVERYTHING
• Much faster
• Less secure
• Source code released in 2001
9. Demos & Machinima (“Quake Movies”)
1981 : Castle
Wolfenstein
1993 :
Doom
1996 :
Quake
• Doom introduced (simple) demo recording functionality, Quake inherited and
enhanced this feature.
• Demos could be shared to the community (in .DEM files)
• Speedruns
• Deathmatches
• In 1996, the Rangers released the first “quake movie” - Diary of a Camper
• Featuring not only deathmatch, but a simple story, with dialogs in form of chat text
• Greatly inspired the whole community
• The name Machinima was created in 1998, and gradually became well-known
UGC goes beyond mods
(Mechanical + Cinema)
10. Half-Life & Counter-Strike
• Year: 1998(Half-Life) / 1999(CS Mod) / 2000(Valve CS Release)
• Counter Strike first released as a mod of Half-Life, then became one
of the Valve games
• “Open Development” - Mods of mods
• Maps
• Bots
• Server Plugins
• Game Modes
• Based on a heavy-modified Quake engine.
• Half-Life SDK
• Team Fortress / Day of Defeat
1998 :
Half-Life
1981 : Castle
Wolfenstein
1993 :
Doom
1996 :
Quake
11. Modding made easy
• Has official support for mods
• Doom / Quake Series
• Fallout / Elder Scrolls Series
• Call of Duty Series
• StarCraft / WarCraft Series
• Has unofficial support for mods
• Grand Theft Auto Series
1981 : Castle
Wolfenstein
1993 :
Doom
1996 :
Quake
1998 :
Half-Life
12. Steam Workshop
• Year: 2003(Steam Official Release) / 2011 (Workshop)
• Steam all-in-one service for distributing videogame official
add-ons and user-generated content
• Favored by independent game creators, mod creators and
players
• Easy to share & subscribe
• Search, category, ranking and comment services
• Compatibility check
2011 :
Steam
Workshop
1981 : Castle
Wolfenstein
1993 :
Doom
1996 :
Quake
1998 :
Half-Life
13. Minecraft
• Year: 2011
• A new type of sandbox game
• The game itself is a mix of map editor experience and survial RPG
elements
• Redstone & Command Block -> Customizable game logic
• Very large UGC community
• Mods
• Custom servers
• Builder teams
• Game record / live streaming videos
• No offcial mod support at first
But Minecraft (Java edition) is easy to modify
2011 :
Minecraft
1981 : Castle
Wolfenstein
1993 :
Doom
1996 :
Quake
1998 :
Half-Life
• Forge API
• OptiFine
• Server Plugins
2011:
SteamWorkshop
14. Minecraft-like games
• Voxel-based (3D) or tile-based (2D)
• Procedurally generated worlds
• Free building as core gameplay element
• Highly customizable
• Fun to create
• Easy to be shared as snapshots or videos
2011 :
Minecraft
1981 : Castle
Wolfenstein
1993 :
Doom
1996 :
Quake
1998 :
Half-Life
2011:
SteamWorkshop
15. Game Creation Platform/Games
• Roblox / Super Mario Maker / Garry’s Mod
• Game = player + editor + official assets + sharing platform +
BBS
?
1981 : Castle
Wolfenstein
1993 :
Doom
1996 :
Quake
1998 :
Half-Life
2011:
SteamWorkshop
2011:
Minecraft
16. User-generated contents
?
1981 : Castle
Wolfenstein
1993 :
Doom
1996 :
Quake
1998 :
Half-Life
2011:
SteamWorkshop
2011:
Minecraft
Texture
3D Model
Sound
&
Music
Level
(Map)
Item
Data
Enemy
Data
PowerUp
Data
Skill
Data
Crafting
Recipe
Enemy
AI
Trigger
&
Event
Game
Rule Item
Behavior
Text
&
Dialog
Custom
UI
Logic
Machinima
Fan Arts Demos Story
Live
Streaming
Game Guide
&
Walkthrough
Visual
Effect
17. What game/engine can do to support UGCs
Easier to use
More extendable
Level/Map Editor
Asset Editor
Gameplay Data Editor
Trigger System
Script System
SDK
Open Source
Demo Record & EditVideo Record
Live Streaming
Editor Studio / IDE
In-game UGC sharing platform / marketShare-to-SNS
Requires Asset Pack and/or Add-on System
● Appearance
●Gameplay Data
●Logic
●Game experience
●Platform
18. What about mobile games?
• Modding:
• Most mobile games don’t come with official mod support
• Android APK could be easily modified by third-party
(not so easy on iOS)
• User-generated content
• Some strategy games features user-created levels (e.g. CoC)
• Voxel/tile based sandbox games (e.g. Minecraft/Terraria)
• Mobile edition of game creation platforms – play only(e.g. Roblox)
• Logic editing is difficult
• Game experience sharing is easy on all mobile games
19. UGC in LEGO®️CUBE
• Voxel-based sandbox game
• Full mobile-functional game creation platform
How did we do that?
Appearance customization
Gameplay data customization
Logic customization
Game experience sharing
UGC
20. First of all...a mod pack system
Internal (non-customizable)
Base (customizable)
Bricks Items Monsters Effects
Mod Pak 1
Bricks Items
Monsters
Mod Pak 2
Items Effects
... ...
Mod Pak 3
21. First of all...a mod pack system
Internal (non-customizable)
Base (customizable)
Bricks Items Monsters Effects
User Map 1
Bricks Items
Monsters
User Map 2
Items Effects
... ...
User Map 3
23. References between elements
Internal (non-customizable)
Base (customizable)
Bricks Items Monsters Effects
User Map 1
Bricks Items
Monsters
User Map 2
Items Effects
... ...
User Map 3
26. Customizable elements
Base Bricks
Brick 01
Mod Pak 1 Bricks
Brick 02 Brick 03
Brick 01 Brick 02 (Clone)
Override : same GUID
(‘Brick 01’ from Base
Bricks is hidden)
27. Customizable elements
Base Bricks
Brick 01
Mod Pak 1 Bricks
Brick 02 Brick 03
Brick 01 Brick 02 (Clone)
Clone : new GUID is
generated for newly
cloned element
Brick 02 & Brick 02
(Clone) both visible
29. Mod Pak Sharing Platform
Internal (non-customizable)
Base (customizable)
Bricks Items Monsters Effects
Mod Pak 1
Bricks Items
Monsters
Mod Pak 2
Items Effects
... ...
Mod Pak 3
Market
Server
• User Map (Mod Pak) is shared as a whole
• Compressed
• Identified by GUID
• References well reserved
• Simple version control
(update only)
• Author info
• Tags & descriptions
• Ranking & comments
Download
(Update)
30. Data edit framework
• One solution for editing multiple types of hierarchical structure data
(Map Config, Brick, Item, Monster ...)
• User friendly for mobile devices
• Program generated UI
• Tabbed or wizard style
• Dynamic hide or show UI elements
• Can handle references as well as instances
• Data validation
• Automatic serialization / deserialization
33. How to do that
• The solution is a bit like Unity’s inspector system
• Uses C# reflection
34. How to do that
• Different widget types
• No more UI work
Check button
Slider
Reference link
35. Voxel-based sandbox game
• Building (map editing) is part of the game
• Customizable random world generation
36. Performance problem on mobile devices
• Server simply can’t afford to run world generation for every player
(millions!)
• Clients are short in memory and CPU
• Want to support 20+ players in a single room for every one on every
device
• ... How to?
37. Distribute the load to every client
• Logic update
• Every active section of the map has an owner player designated
by server
• The owner do the logic updates (mostly monster AIs)
• Map update
• World generation is performed on every (according to view)
• Server only holds modified voxel data
• Combat & crafting
• For safety reasons, server controls the skill and item system
38. Enhance the building part
• Creative mode (infinite building materials)
• Section edit tools (copy, erase, move)
39. Game logic customization
DLL
Script
Code
• Can we create an interesting map without the use of PC?
• To control as many things as possible
Not supported
by mobile devices
Too difficult to type
on touch screen
40. What have we tried to bring to mobile...
Some node based scripting system
41. What have we tried to bring to mobile...
Some sequence circuit simulator
Input
A Button
B Button
Press Sensor
Output
And
OutIn #1
In #2
Door
Open
Close
42. Trigger System
• Event - Condition – Action simple enough!
When any player dies
If the player is in team #1
Respawn him on the spawn point
44. Function & Variable
• Functions are
folded/expanded vertically
• Maximize screen usage
• Hide unnecessary detail
• Parameter can be reference to variable or
position/area/monster placed in the world
45. Handle multiplayer games
• Like other logic, triggers are executed distributly
• One player only knows about what’s inside his view range
• When an event is triggered, only one player(client) is chosen to check all the
conditions (for example
• PlayerMoveEvent : the player who moved
• MonsterDieEvent : the owner of the monster
• TimerEvent : the room host
• Once all the conditions are satisfied, the chosen player(client) broadcasts the
event context to all players (himself included)
• Trigger actions are then executed on every client with the same input
46. Sharing game experiences
• Plugins are available to
• Share snapshots to QQ / WeChat
• Invite your friends from QQ / WeChat
• Video recording on Android / iOS
• Storytelling could be done with the help of Trigger System
Quake中的用户创造内容不仅在游戏玩法方面有惊人的突破,在其他方面也创造了历史。
Doom引入了游戏录像功能,这个功能允许玩家录制一局游戏的数据录像,这个录像会被保存成文件,并且可以分享给其他人观看。在那个年代,互联网文件传输速度还不足以支撑大容量视频文件的传输,而数据录像的占用的容量很小,可以很方便的分享到爱好者社区。
Quake继承了这个功能,并且做了一系列的改进,其中就包括支持以观察者的视角来观看录像。
起初这个特性经常被玩家或者战队用来录制游戏速通或者对战录像,直到某一天,the Rangers,一群爱好者组成的战队,发布了一段名为Diary of a Camper的demo,在社区上引起了轰动
这段demo特殊的地方在于,它不仅仅是普通的对战录像,而是包含了剧本和对话、经过导演的“小电影”。原来demo还可以这么玩——这个主意激发了爱好者社区的想象力,导致了大量带剧情的作品涌现,这些使用Quake的录像功能录制的爱好者电影作品逐渐被称为Quake Movies,这个现象也逐步地发展到其他游戏的爱好者社区中。
1998年,游戏电影(Machinima)这个词被首次提出,用来指代哪些使用游戏引擎功能(或第三方工具)录制的电影作品。
Machinima = Mechanical + Cinema,游戏电影
在1998年,Valve的经典游戏作品半条命发售,由于其极高的游戏性和吸引人的游戏剧情而大受欢迎。半条命使用的GoldSrc引擎是基于QuakeWorld引擎的深度改造版,在对MOD的支持和理念上也继承了Quake的优良传统——官方提供了Half-Life SDK,其中包含了Hammer Editor作为官方的地图制作工具,同时采用了类似Quake II的DLL系统来实现游戏逻辑的自定义,给mod制作者带来了很大的自由度和便利。
正如辛勤劳作能带来丰收,好的引擎支持总能带来好的UGC内容——1999年,大家所熟知的反恐精英(Counter-Strike)首次以半条命Mod的形式进入大家的视线。
反恐精英MOD的制作者完全自定义了游戏的模式与武器,而爱好者社区则提供了更多重要的东西,地图、机器人、服务器插件等等。作者称之为Open Development,即社区驱动了整个MOD的开发,并给其不断地添加新的功能。这展现了社区的力量,并且从技术上来说,我认为这与游戏引擎对游戏MOD的优秀支持是分不开的。
由于反恐精英MOD的成功,Valve收购了其IP,并于2000年作为官方游戏发售,而反恐精英成为了游戏爱好者通过创作游戏内容来实现自己创意并最终成功的最好例子。
The power of the community
Valve Software, the first major studio to regularly hire the best mod developers and the most talented level designers from the community to work on its official titles.
Mods of mods
Good Engine Support Brings Good UGCs
而另外一些游戏,则采用了更加激进的方案——游戏本身不包含或者只包含少量的第一方内容,而是提供了完整的游戏制作工具、游戏内容库和分享平台。这样的游戏被称为游戏创作平台,或者创作平台游戏。
Roblox、Super Mario Maker和Garry’s Mod就属于这一类的游戏。这类游戏与真正的游戏引擎工具相比,通常具有更低的上手难度,具有一定的制作趣味性,同时可能会提供非PC平台的制作工具。
我们选择的做法是将服务器的负载平均地分配到各个客户端上。
首先,服务器从一个负责所有更新和维护的角色,转变为负责部分更新和调度工作的角色。
服务器管理着每个玩家的视野,以视野为依据,将世界中各种逻辑更新交由特定的玩家来执行;而每一个玩家,则只需要关心自己视野内发生的事情,尽可能少地关注视野外发生的事件,以降低开销;
由客户端负责的执行结果经由服务器验证后,再依据视野广播给其他玩家。服务器执行世界生成算法,而是在每一个客户端上根据各自的视野来执行。服务器会缓存一局游戏内所有改变过的体素数据,以支持玩家中途加入游戏
对于一些关键的运算,例如战斗、道具等等,这些运算由服务器来负责以防止作弊;而客户端之间,当视野交叠的时候,也会进行交叉校验以防止作弊行为。
Clients can do cross-checks to avoid cheating