From 2892a844d43d4c0e8209ad1efc0b135a957a4b8d Mon Sep 17 00:00:00 2001 From: faketruth Date: Sat, 24 Dec 2011 23:34:30 +0000 Subject: Chunks are generated in a separate thread allowing players to keep on playing and chatting while chunks are generated. This means, however, that cWorld::GetChunk() does not always return a chunk and is something you need to be aware of. I am not entirely sure if all this is completely stable, but I think so :O Chunks are now generated before the player is able to see them. This is done because after a chunks is done generating, some blocks might still need to be set (parts of trees from neighboring chunk), causing more bandwidth to be used (each changed block needs to be sent to clients again) and (fps) lagging the clients when changing a lot of blocks. Calculating ahead fixes these issues. Separated the placing of foliage (trees and stuff) when generated chunks into a new function GenerateFoliage() Cleaned up the VS2010 project, now using some VS2010 specific functions like dependencies on projects (no need for setting library dependencies manually). VS2010 project now compiles way faster in Release by using multi threading. git-svn-id: http://mc-server.googlecode.com/svn/trunk@103 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- VC2010/JsonCpp.vcxproj | 11 ++++++--- VC2010/MCServer.vcxproj | 46 ++++++++++++++++-------------------- VC2010/MCServer.vcxproj.filters | 9 +++++++ VC2010/WebServer.vcxproj | 12 ++++++---- VC2010/ZLib.vcxproj | 13 +++++----- VC2010/ZLib.vcxproj.filters | 6 ----- VC2010/clean.bat | 7 +++--- VC2010/lua-5.1.4.vcxproj | 12 ++++++---- VC2010/squirrel_3_0_1_stable.vcxproj | 15 ++++++++---- VC2010/tolua++-1.0.93.vcxproj | 10 ++++---- 10 files changed, 79 insertions(+), 62 deletions(-) (limited to 'VC2010') diff --git a/VC2010/JsonCpp.vcxproj b/VC2010/JsonCpp.vcxproj index 7e92d3e51..b467336f2 100644 --- a/VC2010/JsonCpp.vcxproj +++ b/VC2010/JsonCpp.vcxproj @@ -18,13 +18,11 @@ StaticLibrary true - MultiByte StaticLibrary false true - MultiByte @@ -36,12 +34,18 @@ - + + $(Configuration)\$(ProjectName)\ + + + $(Configuration)\$(ProjectName)\ + Level3 Disabled ..\jsoncpp-src-0.5.0\include;%(AdditionalIncludeDirectories) + true true @@ -56,6 +60,7 @@ ..\jsoncpp-src-0.5.0\include;%(AdditionalIncludeDirectories) MultiThreaded Speed + true true diff --git a/VC2010/MCServer.vcxproj b/VC2010/MCServer.vcxproj index e36f5eaa8..a7728ea4f 100644 --- a/VC2010/MCServer.vcxproj +++ b/VC2010/MCServer.vcxproj @@ -27,8 +27,7 @@ Application - NotSet - false + true Application @@ -37,7 +36,6 @@ Application - NotSet Application @@ -63,13 +61,13 @@ <_ProjectFileVersion>10.0.30319.1 $(SolutionDir)..\ $(SolutionDir)..\ - $(Configuration)\ + $(Configuration)\$(ProjectName)\ $(Configuration)\ true true $(SolutionDir)..\ $(SolutionDir)..\ - $(Configuration)\ + $(Configuration)\$(ProjectName)\ $(Configuration)\ false false @@ -80,21 +78,18 @@ Disabled ..\tolua++-1.0.93\include;..\lua-5.1.4\src;..\zlib-1.2.5;..\mysql-connector\include;..\source\;..\pdcurs34\;..\jsoncpp-src-0.5.0\include;..\squirrel_3_0_1_stable\include;..\squirrel_3_0_1_stable;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - false + true Sync EnableFastChecks MultiThreadedDebugDLL true - StreamingSIMDExtensions2 - Fast - - Level3 - ProgramDatabase + EditAndContinue + true /IGNORE:4078 %(AdditionalOptions) - winmm.lib;ws2_32.lib;Psapi.lib;ZLib.lib;tolua++-1.0.93.lib;lua-5.1.4.lib;WebServer.lib;JsonCpp.lib;squirrel_3_0_1_stable.lib;%(AdditionalDependencies) + winmm.lib;ws2_32.lib;Psapi.lib;%(AdditionalDependencies) ../$(ProjectName)_debug.exe VLD;./Debug/;%(AdditionalLibraryDirectories) %(IgnoreSpecificDefaultLibraries) @@ -159,10 +154,11 @@ true + true /IGNORE:4078 %(AdditionalOptions) - winmm.lib;ws2_32.lib;Psapi.lib;ZLib.lib;tolua++-1.0.93.lib;lua-5.1.4.lib;WebServer.lib;JsonCpp.lib;squirrel_3_0_1_stable.lib;LIBCMT.LIB;%(AdditionalDependencies) + winmm.lib;ws2_32.lib;Psapi.lib;LIBCMT.LIB;%(AdditionalDependencies) ../$(ProjectName).exe ./Release/;%(AdditionalLibraryDirectories) LIBCMT;%(IgnoreSpecificDefaultLibraries) @@ -170,8 +166,7 @@ Console false true - - + UseLinkTimeCodeGeneration false @@ -223,6 +218,7 @@ + @@ -360,6 +356,7 @@ + @@ -510,26 +507,25 @@ + + {adbf25b9-7192-4e54-b35e-8ec47ca5ef86} + {5e511191-6f1f-4d0d-940a-b850780963d2} - false + + + {4571ce2d-9e18-452f-90d6-94ae8e2406f4} {67b50249-6cec-444e-a87a-d476112590ed} - false + + + {2b4bd5c6-91c0-4a74-939f-b28737fb0dc6} {f6f43a78-816d-4c37-a07b-68bed529273a} - false - - - - - - - diff --git a/VC2010/MCServer.vcxproj.filters b/VC2010/MCServer.vcxproj.filters index d817d7679..a6e3af736 100644 --- a/VC2010/MCServer.vcxproj.filters +++ b/VC2010/MCServer.vcxproj.filters @@ -400,6 +400,9 @@ {fcc08e08-8dba-47b4-89b0-5dc255bb9b8a} + + {0d6f822b-71eb-406f-b17a-d188c4924283} + @@ -802,6 +805,9 @@ Packets\cPacket_ItemData + + cChunkGenerator + @@ -1239,6 +1245,9 @@ Packets\cPacket_ItemData + + cChunkGenerator + diff --git a/VC2010/WebServer.vcxproj b/VC2010/WebServer.vcxproj index 934c3803d..03c84d620 100644 --- a/VC2010/WebServer.vcxproj +++ b/VC2010/WebServer.vcxproj @@ -26,7 +26,6 @@ StaticLibrary true - MultiByte StaticLibrary @@ -37,7 +36,6 @@ StaticLibrary false true - MultiByte StaticLibrary @@ -61,11 +59,15 @@ - + + $(Configuration)\$(ProjectName)\ + $(SolutionDir) - + + $(Configuration)\$(ProjectName)\ + $(SolutionDir) @@ -73,6 +75,7 @@ Level3 Disabled + true true @@ -99,6 +102,7 @@ true MultiThreaded Speed + true true diff --git a/VC2010/ZLib.vcxproj b/VC2010/ZLib.vcxproj index fcc0538e1..f71a9eed5 100644 --- a/VC2010/ZLib.vcxproj +++ b/VC2010/ZLib.vcxproj @@ -25,7 +25,6 @@ StaticLibrary - MultiByte true @@ -35,7 +34,6 @@ StaticLibrary - MultiByte StaticLibrary @@ -63,6 +61,8 @@ $(Configuration)\ $(SolutionDir) $(Configuration)\ + $(Configuration)\$(ProjectName)\ + $(Configuration)\$(ProjectName)\ @@ -70,7 +70,9 @@ true EnableFastChecks MultiThreadedDebugDLL - Level3 + TurnOffAllWarnings + EditAndContinue + true @@ -92,8 +94,9 @@ true MultiThreaded true - Level3 + TurnOffAllWarnings Speed + true true @@ -114,7 +117,6 @@ - @@ -123,7 +125,6 @@ - diff --git a/VC2010/ZLib.vcxproj.filters b/VC2010/ZLib.vcxproj.filters index 7e5dc46b8..b79ce5cce 100644 --- a/VC2010/ZLib.vcxproj.filters +++ b/VC2010/ZLib.vcxproj.filters @@ -27,9 +27,6 @@ Source Files - - Source Files - Source Files @@ -54,9 +51,6 @@ Source Files - - Source Files - Source Files diff --git a/VC2010/clean.bat b/VC2010/clean.bat index c481e1d03..dfc7a6777 100644 --- a/VC2010/clean.bat +++ b/VC2010/clean.bat @@ -16,11 +16,10 @@ del release\*.* /Q del x64\*.* /Q del "My Inspector Results"\*.* /Q del ipch\*.* /Q -rd release /Q -rd debug /Q -rd ipch /Q +rd release /S /Q +rd debug /S /Q +rd ipch /S /Q rd x64 /Q rd "My Inspector Results" /Q -rd ipch /Q pause \ No newline at end of file diff --git a/VC2010/lua-5.1.4.vcxproj b/VC2010/lua-5.1.4.vcxproj index 503345c0e..d0aa832bf 100644 --- a/VC2010/lua-5.1.4.vcxproj +++ b/VC2010/lua-5.1.4.vcxproj @@ -25,7 +25,6 @@ StaticLibrary - MultiByte true @@ -35,7 +34,6 @@ StaticLibrary - MultiByte StaticLibrary @@ -63,15 +61,18 @@ $(Configuration)\ $(SolutionDir) $(Configuration)\ + $(Configuration)\$(ProjectName)\ + $(Configuration)\$(ProjectName)\ Disabled - true EnableFastChecks - Level3 + TurnOffAllWarnings EditAndContinue MultiThreadedDebugDLL + true + true @@ -93,9 +94,10 @@ true MultiThreaded true - Level3 + TurnOffAllWarnings ProgramDatabase Speed + true true diff --git a/VC2010/squirrel_3_0_1_stable.vcxproj b/VC2010/squirrel_3_0_1_stable.vcxproj index a9c919c03..92b9cc05b 100644 --- a/VC2010/squirrel_3_0_1_stable.vcxproj +++ b/VC2010/squirrel_3_0_1_stable.vcxproj @@ -18,13 +18,11 @@ StaticLibrary true - MultiByte StaticLibrary false true - MultiByte @@ -36,12 +34,18 @@ - + + $(Configuration)\$(ProjectName)\ + + + $(Configuration)\$(ProjectName)\ + - Level3 + TurnOffAllWarnings Disabled ../squirrel_3_0_1_stable/include + true true @@ -49,13 +53,14 @@ - Level3 + TurnOffAllWarnings MaxSpeed true true ../squirrel_3_0_1_stable/include Speed MultiThreaded + true true diff --git a/VC2010/tolua++-1.0.93.vcxproj b/VC2010/tolua++-1.0.93.vcxproj index 9fbec5d5d..3cac62db7 100644 --- a/VC2010/tolua++-1.0.93.vcxproj +++ b/VC2010/tolua++-1.0.93.vcxproj @@ -25,7 +25,6 @@ StaticLibrary - MultiByte true @@ -35,7 +34,6 @@ StaticLibrary - MultiByte StaticLibrary @@ -63,6 +61,8 @@ $(Configuration)\ $(SolutionDir) $(Configuration)\ + $(Configuration)\$(ProjectName)\ + $(Configuration)\$(ProjectName)\ @@ -71,8 +71,9 @@ true EnableFastChecks MultiThreadedDebugDLL - Level3 + TurnOffAllWarnings EditAndContinue + true @@ -96,9 +97,10 @@ ..\lua-5.1.4\src;..\tolua++-1.0.93\include;%(AdditionalIncludeDirectories) MultiThreaded true - Level3 + TurnOffAllWarnings ProgramDatabase Speed + true true -- cgit v1.2.3