cuốn sách gpt4 ai đã làm

客户端-服务器游戏算法

In lại Tác giả: Taklimakan Thời gian cập nhật: 2023-11-03 02:20:20 27 4
mua khóa gpt4 Nike

对于单机游戏,基本的游戏循环是(来源:维基百科)

while( user doesn't exit )
check for user input
run AI
move enemies
resolve collisions
draw graphics
play sounds
end while

但如果我开发类似客户端-服务器的游戏,如 Quake、Ragnarock、Trackmania 等,会怎样

游戏的客户端和服务器部分的循环/算法是什么?

câu trả lời hay nhất

应该是这样的

客户:

while( user does not exit )
check for user input
send commands to the server
receive updates about the game from the server
draw graphics
play sounds
end

服务器:

while( true )
check for client commands
run AI
move all entities
resolve collisions
send updates about the game to the clients
end

关于客户端-服务器游戏算法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/811906/

27 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress