

















1



























Download and install some version of Microsoft Visual Studio (as of writing, MSVS Community 2017) with C++ support, install Python 3 for all users and install CMake. You also need to install Rust.
Start CMake and select the source code folder (where DDNet resides, the directory with CMakeLists.txt). Additionally select a build folder, e.g. create a build subdirectory in the source code directory. Click "Configure" and select the Visual Studio generator (it should be pre-selected, so pressing "Finish" will suffice). After configuration finishes and the "Generate" reactivates, click it. When that finishes, click "Open Project". Visual Studio should open. You can compile the DDNet client by right-clicking the DDNet project (not the solution) and select "Select as StartUp project". Now you should be able to compile DDNet by clicking the green, triangular "Run" button.
turns into
Download and install some version of Microsoft Visual Studio (as of writing, Visual Studio Community 2022) with C++ support and install Python 3 for all users. You also need to install Rust.
Open Visual Studio and open DDNet's CMakeLists.txt by going to "File" -> "Open" -> "CMake...". Once CMake is finished generating, select whichever target you'd like to compile by choosing it in the debug targets combo box. To debug the target, click the region of the debug targets combo box which doesn't have a dropdown arrow. You should be able to compile and run without debugging by pressing the green, triangular "Run" button. (edited)













Debug?
It's kinda funny, once you use it somewhere it almost spreads like a virus to other types xdd (edited)

































































cl_map_download_low_speed_limit 0 but not sure if that only applies to http download







































pacman -Syuu then pacman -S pactoys then use pacboy to install the dependencies
pacboy?

pacboy? 

pacboy -S cmake:x

:u at the end and that's it no need to remember the triplet or google stuff



pacman -S base-devel mingw-w64-ucrt-x86_64-toolchain mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-curl mingw-w64-ucrt-x86_64-ffmpeg mingw-w64-ucrt-x86_64-freetype git mingw-w64-ucrt-x86_64-glew mingw-w64-ucrt-x86_64-glslang mingw-
w64-ucrt-x86_64-libpng mingw-w64-ucrt-x86_64-opusfile mingw-w64-ucrt-x86_64-python3 mingw-w64-ucrt-x86_64-rust mingw-w64-ucrt-x86_64-SDL2 mingw-w64-ucrt-x86_64-spirv-tools mingw-w64-ucrt-x86_64-sqlite mingw-w64-ucrt-x86_64-vulkan-headers mingw-w64-ucrt-x86_64-vulkan-loader
mingw-w64-ucrt-x86_64-wavpack mingw-w64-ucrt-x86_64-x264 --noconfirm
git clone https://github.com/ddnet/ddnet
cd ./ddnet
cmake -B build -S .
cmake --build build --config Release --parallel
ddnet will be in ddnet/build/DDNet.exe

























pacman -S base-devel mingw-w64-ucrt-x86_64-toolchain mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-curl mingw-w64-ucrt-x86_64-ffmpeg mingw-w64-ucrt-x86_64-freetype git mingw-w64-ucrt-x86_64-glew mingw-w64-ucrt-x86_64-glslang mingw-
w64-ucrt-x86_64-libpng mingw-w64-ucrt-x86_64-opusfile mingw-w64-ucrt-x86_64-python3 mingw-w64-ucrt-x86_64-rust mingw-w64-ucrt-x86_64-SDL2 mingw-w64-ucrt-x86_64-spirv-tools mingw-w64-ucrt-x86_64-sqlite mingw-w64-ucrt-x86_64-vulkan-headers mingw-w64-ucrt-x86_64-vulkan-loader
mingw-w64-ucrt-x86_64-wavpack mingw-w64-ucrt-x86_64-x264 --noconfirm
git clone https://github.com/ddnet/ddnet
cd ./ddnet
cmake -B build -S .
cmake --build build --config Release --parallel
ddnet will be in ddnet/build/DDNet.exe 








pacman -S base-devel mingw-w64-ucrt-x86_64-toolchain mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-curl mingw-w64-ucrt-x86_64-ffmpeg mingw-w64-ucrt-x86_64-freetype git mingw-w64-ucrt-x86_64-glew mingw-w64-ucrt-x86_64-glslang mingw-
w64-ucrt-x86_64-libpng mingw-w64-ucrt-x86_64-opusfile mingw-w64-ucrt-x86_64-python3 mingw-w64-ucrt-x86_64-rust mingw-w64-ucrt-x86_64-SDL2 mingw-w64-ucrt-x86_64-spirv-tools mingw-w64-ucrt-x86_64-sqlite mingw-w64-ucrt-x86_64-vulkan-headers mingw-w64-ucrt-x86_64-vulkan-loader
mingw-w64-ucrt-x86_64-wavpack mingw-w64-ucrt-x86_64-x264 --noconfirm
git clone https://github.com/ddnet/ddnet
cd ./ddnet
cmake -B build -S .
cmake --build build --config Release --parallel
ddnet will be in ddnet/build/DDNet.exe 












































































make_windows.bat or make_unix.sh








































pacman -S base-devel mingw-w64-ucrt-x86_64-toolchain mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-curl mingw-w64-ucrt-x86_64-ffmpeg mingw-w64-ucrt-x86_64-freetype git mingw-w64-ucrt-x86_64-glew mingw-w64-ucrt-x86_64-glslang mingw-
w64-ucrt-x86_64-libpng mingw-w64-ucrt-x86_64-opusfile mingw-w64-ucrt-x86_64-python3 mingw-w64-ucrt-x86_64-rust mingw-w64-ucrt-x86_64-SDL2 mingw-w64-ucrt-x86_64-spirv-tools mingw-w64-ucrt-x86_64-sqlite mingw-w64-ucrt-x86_64-vulkan-headers mingw-w64-ucrt-x86_64-vulkan-loader
mingw-w64-ucrt-x86_64-wavpack mingw-w64-ucrt-x86_64-x264 --noconfirm
git clone https://github.com/ddnet/ddnet
cd ./ddnet
cmake -B build -S .
cmake --build build --config Release --parallel
ddnet will be in ddnet/build/DDNet.exe 



cmake -B build -S .





cargo build















































cmake -B build suffices btw)






git clone --recursive https://github.com/ddnet/ddnet instead


























git submodule update --init --recursive 











explorer . in the shell in that folder, which should open Windows Explorer in that folder






2






































/rainbow





IGraphics::CTextureHandle LogoTexture = Graphics()->LoadTexture("gui_logo.png", IStorage::TYPE_ALL, CImageInfo::FORMAT_RGBA);
if (LogoTexture.IsValid())
{
Graphics()->TextureSet(LogoTexture);
Graphics()->BlendNormal();
Graphics()->QuadsBegin();
IGraphics::CQuadItem QuadItem(StALogo.x, StALogo.y, StALogo.w, StALogo.h);
Graphics()->QuadsDrawTL(&QuadItem, 1);
Graphics()->QuadsEnd();
}
crash happens either after a good 5 seconds, or after trying to screenshot it - lol
any idea what i did wrong ?
the logo is 512x147 pixel's, 80kb, lol (edited)



IGraphics::CTextureHandle LogoTexture = Graphics()->LoadTexture("gui_logo.png", IStorage::TYPE_ALL, CImageInfo::FORMAT_RGBA);
if (LogoTexture.IsValid())
{
Graphics()->TextureSet(LogoTexture);
Graphics()->BlendNormal();
Graphics()->QuadsBegin();
IGraphics::CQuadItem QuadItem(StALogo.x, StALogo.y, StALogo.w, StALogo.h);
Graphics()->QuadsDrawTL(&QuadItem, 1);
Graphics()->QuadsEnd();
}
crash happens either after a good 5 seconds, or after trying to screenshot it - lol
any idea what i did wrong ?
the logo is 512x147 pixel's, 80kb, lol (edited)

IGraphics::CTextureHandle LogoTexture = Graphics()->LoadTexture("gui_logo.png", IStorage::TYPE_ALL, CImageInfo::FORMAT_RGBA);
if (LogoTexture.IsValid())
{
Graphics()->TextureSet(LogoTexture);
Graphics()->BlendNormal();
Graphics()->QuadsBegin();
IGraphics::CQuadItem QuadItem(StALogo.x, StALogo.y, StALogo.w, StALogo.h);
Graphics()->QuadsDrawTL(&QuadItem, 1);
Graphics()->QuadsEnd();
}
crash happens either after a good 5 seconds, or after trying to screenshot it - lol
any idea what i did wrong ?
the logo is 512x147 pixel's, 80kb, lol (edited)


IGraphics::CTextureHandle LogoTexture = Graphics()->LoadTexture("gui_logo.png", IStorage::TYPE_ALL, CImageInfo::FORMAT_RGBA);
if (LogoTexture.IsValid())
{
Graphics()->TextureSet(LogoTexture);
Graphics()->BlendNormal();
Graphics()->QuadsBegin();
IGraphics::CQuadItem QuadItem(StALogo.x, StALogo.y, StALogo.w, StALogo.h);
Graphics()->QuadsDrawTL(&QuadItem, 1);
Graphics()->QuadsEnd();
}
crash happens either after a good 5 seconds, or after trying to screenshot it - lol
any idea what i did wrong ?
the logo is 512x147 pixel's, 80kb, lol (edited)






IGraphics::CTextureHandle LogoTexture = Graphics()->LoadTexture("gui_logo.png", IStorage::TYPE_ALL, CImageInfo::FORMAT_RGBA);
if (LogoTexture.IsValid())
{
Graphics()->TextureSet(LogoTexture);
Graphics()->BlendNormal();
Graphics()->QuadsBegin();
IGraphics::CQuadItem QuadItem(StALogo.x, StALogo.y, StALogo.w, StALogo.h);
Graphics()->QuadsDrawTL(&QuadItem, 1);
Graphics()->QuadsEnd();
}
crash happens either after a good 5 seconds, or after trying to screenshot it - lol
any idea what i did wrong ?
the logo is 512x147 pixel's, 80kb, lol (edited)LoadTexture every frame? That would explain it :D Use Graphics()->TextureSet(g_pData->m_aImages[IMAGE_BANNER].m_Id); instead.

LoadTexture every frame? That would explain it :D Use Graphics()->TextureSet(g_pData->m_aImages[IMAGE_BANNER].m_Id); instead. 



IGraphics::CTextureHandle RAII?



Implementing a rcon command? I've been waiting so long for the next part of your series






































src/game/client/prediction
(edited)

static bool IsTextureLoaded = false;
static IGraphics::CTextureHandle LogoTexture;
if (!IsTextureLoaded)
{
dbg_msg("DDStats", "Rendering Logo");
LogoTexture = Graphics()->LoadTexture("gui_logo.png", IStorageTW::TYPE_ALL, CImageInfo::FORMAT_RGBA);
IsTextureLoaded = LogoTexture.IsValid();
}
if (IsTextureLoaded)
{
Graphics()->TextureSet(LogoTexture);
Graphics()->BlendNormal();
Graphics()->QuadsBegin();
IGraphics::CQuadItem QuadItem(StALogo.x, StALogo.y, StALogo.w, StALogo.h);
Graphics()->QuadsDrawTL(&QuadItem, 1);
Graphics()->QuadsEnd();
}
maybe



static

static can be good for performance 






std::latch std::barrier std::atomic::wait()









std::binary_semaphore
std::atomic::wait is missing from rust(?)





std::atomic::wait is missing from rust(?) 
EnterCriticalSection works completely differently afaik


super <id> maybe?
user ptr





user ptr 















CHttpRequest::Block() I just need to block until it's done




CHttpRequest::Block() I just need to block until it's done 


CHttpRequest::Block() I just need to block until it's done 








ssh root@myip and select yes he can join to the server

ssh root@myip and select yes he can join to the server 

ssh root@myip and select yes he can join to the server 



















































































(edited)

(edited)

(edited)






















net_init and net_uninit (the latter still needs to be added)? CNetworkLifecycle, CNetworkRAII, CNetworkSetup

net_init and net_uninit (the latter still needs to be added)? CNetworkLifecycle, CNetworkRAII, CNetworkSetup CNetworkBase or CNetBase?
system.h and not to network.h thoughCNetBase init is also weird






























WSAStartup in net_init. According to the documentation we should call WSACleanup once for every previous successful call to WSAStartup.
For this purpose, the function net_uninit is added to call WSACleanup on Windows. The usage of the net_init and net_uninit functions is simplified by adding a RAII wrapper for them. The network initialization in client/server is moved fr...






























<li><a href="/players/Lukov/">Lukov</a></li>* 





































- :white_check_mark:Auto login on specific DDNet and KoG Servers (GER10 for DDNet | GER3 for KoG)



