Multi threaded game - updating, rendering, and how to split them

后端 未结 7 1725
故里飘歌
故里飘歌 2021-02-10 10:54

So, I\'m working on a game engine, and I\'ve made pretty good progress. However, my engine is single-threaded, and the advantages of splitting updating and rendering into separa

7条回答
  •  没有蜡笔的小新
    2021-02-10 11:00

    I would suggest going pipeline with this architecture, meaning that the render stage will render all the elements updated on the previous frame, it would go like this:

    Update 0

    Update 1 Render 0

    Update 2 Render 1

    Update 3 Render 2

    ....

    it would mean that your game will use more memory and all the objects will have to have per frame states / data

    if you introduce more layers in this pipeline your game will suffer from input lag (meaning the user will see his action on the screen later then normal), so I suggest to using just this 2 stage pipeline

提交回复
热议问题