Multi-thread game logic
#6
I started to move chunk generator and found some problems.
In your parallel version method cWorld::GetChunk returns 0 if there is not chunk and it start to generate it. Returning NULL is not correct because there is no result verification in some functions. Some other functions work incorrect with NULL. GetChunk is safety only with chunk generator in it.
I think that the solution of this problem is generating chunks in other place. Notch server generate 100 chunks near players. MCServer can do the same. On each Tick server will check all chunks near players and add tasks to ChunkGenerator if chunks don't exist.
If I'm right that the main problem is returnin NULL then generating immediate chunks will solve problem.
Did you find other bugs in your parallel ChunkGenerator? I didn't find anything bad.
Reply
Thanks given by:


Messages In This Thread
Multi-thread game logic - by geser - 01-24-2012, 06:29 PM
RE: Multi-thread game logic - by mtilden - 01-24-2012, 08:09 PM
RE: Multi-thread game logic - by FakeTruth - 01-24-2012, 10:58 PM
RE: Multi-thread game logic - by geser - 01-25-2012, 12:44 AM
RE: Multi-thread game logic - by FakeTruth - 01-25-2012, 02:25 AM
RE: Multi-thread game logic - by geser - 01-27-2012, 08:35 PM
RE: Multi-thread game logic - by FakeTruth - 01-27-2012, 09:22 PM



Users browsing this thread: 1 Guest(s)