Developer knowledge network · moderated exchange

Супольнасць UnreliableCode

Супольнасць распрацоўшчыкаў даследаванняў, зваротнага праектавання і кадавання

Knowledge indexжыць
4Categories
919Threads
2.8KПаведамленні
Release

Visualizing Ore Nodes (Sulfur, Metal, Stone) with world distance labels

imgui_artisan
UI Designer
MEMBER
прадстаўнік: 202
Дата далучэння: Apr 2019
Паведамленні: 54
Дзякуй: 28
1 месяцаў таму · Jul 16, 2026 6:55 PM
#1

In BaseNetworkable, match prefab name strings for resource nodes:

  • ore_sulfur -> Gold / Yellow label: [SULFUR ORE]
  • ore_metal -> Silver / Cyan label: [METAL ORE]
  • ore_stone -> Gray label: [STONE ORE]
CPP
Vector2 screenPos;
if (WorldToScreen(nodePos, screenPos, viewMatrix, screenW, screenH)) {
    float dist = (nodePos - localPlayerPos).Length();
    if (dist < 300.0f) {
        ImGui::GetWindowDrawList()->AddText(ImVec2(screenPos.x, screenPos.y), 
            IM_COL32(255, 215, 0, 255), 
            Format("Sulfur Ore [%.0fm]", dist).c_str());
    }
}
rust_recoil_king
Member
MEMBER
прадстаўнік: 190
Дата далучэння: May 2022
Паведамленні: 5
Дзякуй: 48
1 месяцаў таму · Jul 17, 2026 12:30 AM
#2

Finding sulfur nodes in snow biomes takes 2 minutes with this. Color-coded labels look great.

matrix_math_guy
Math Specialist
MEMBER
прадстаўнік: 105
Дата далучэння: Aug 2018
Паведамленні: 52
Дзякуй: 41
1 месяцаў таму · Jul 17, 2026 12:46 PM
#3

Added distance filtering slider in menu (50m to 500m) to keep screen clutter minimal.