Browser में open world बनाना, भाग 3: वे साधारण spikes जिन्होंने हमें बचाया
लेखक Oleg Sidorkin, Cinevva के CTO और सह-संस्थापक
यहां नए हैं? series guide का इस्तेमाल करें। यह बताती है कि spike क्या होता है और सभी भागों को जोड़ती है।
इस भाग में चमकदार screenshots कम हैं और architecture का बीमा ज़्यादा।
Spike 1 और 2 के बाद, हमने तीन risk checks किए जो छोटे लगते थे लेकिन उनका असर product के स्तर पर था।
पहला था Durable Objects के साथ broadcast fan out। हमने game जैसी tick rates पर multi client position distribution को टेस्ट किया और latency distribution, हर tick पर CPU, और delivery integrity को ट्रैक किया। अगर यह fail होता, तो हम single island ownership के बजाय जल्दी sharding की तरफ चले जाते।
दूसरा था mobile constraint validation। ये कोई desktop preset को mobile नाम देकर रखना नहीं था, बल्कि उसी baseline terrain से बना एक साफ़ low-cost profile था।
mobile profile को नए tab में खोलें ↗ · source देखें
हमने segment density, object count, render resolution का दबाव, और fog range को घटाया। सवाल आसान था। क्या यह world mobile जैसी सीमाओं पर पढ़ने लायक और responsive रह सकता है, बिना पूरे renderer को दोबारा लिखे।
तीसरा था creator workflows के लिए behavior generation की विश्वसनीयता। हमने valid JSON rate, अपेक्षित primitives के मुकाबले semantic सटीकता, और response latency का आकलन किया। अगर यह fail होता, तो हम strict form आधारित behavior authoring की तरफ चले जाते।
इस अध्याय की मुख्य सीख यह है कि इन साधारण spikes ने architecture को visual spikes से भी तेज़ बदला। इन्होंने network topology, mobile के वादों, और tool UX पर पक्की सीमाएं तय कर दीं।
भाग 4 में हम दिखने वाले terrain के काम पर लौटते हैं और सिर्फ़ static loading screenshots नहीं, बल्कि movement-time streaming behavior को टेस्ट करते हैं।
इस अध्याय में जिन technologies का ज़िक्र हुआ
Cloudflare Durable Objects. Edge पर deploy होने वाले stateful serverless instances जिनमें built-in persistence और WebSocket support होता है। हर Durable Object एक world shard (या chunk) के लिए authoritative state रखता है। Players WebSocket के ज़रिए जुड़ते हैं और उसी shard के दूसरे players से position broadcasts पाते हैं। जब player किसी adjacent chunk में जाता है, तो वह उस chunk के Durable Object से जुड़ जाता है। Durable Objects state को अपने आप disk पर persist करते हैं और हज़ारों concurrent instances तक scale करते हैं। देखें Cloudflare Durable Objects docs और हमारी multiplayer networking पर browser 3D tech guide।
Spatial sharding. World को geographic region के हिसाब से server instances पर बांटना। हर shard, world grid के एक rectangular इलाके का मालिक होता है। जैसे-जैसे player density बदलती है, shards बंट सकते हैं या जुड़ सकते हैं। किसी shard boundary के पास के players cross-shard visibility queries के ज़रिए दोनों shards का content देखते हैं। इसी तरह EVE Online एक ही universe में हज़ारों players को संभालता है।
WebSocket broadcast fan-out. एक server से कई जुड़े हुए clients तक real-time position updates पहुंचाना। हर client का downstream bandwidth उस भीड़ के साथ linearly बढ़ता है जो आप देख सकते हैं:
game जैसी tick rates (20-30 Hz) पर हर player करीब
Mobile rendering की सीमाएं. Mobile GPUs में desktop GPUs के मुकाबले 1/5 से 1/10 throughput होती है, करीब 1 GB memory की सीमा (desktop पर 2-4 GB के मुकाबले), और लगातार load पर thermal throttling होती है। एक mobile quality profile segment density, object count, render resolution, draw distance, और shadow quality को घटाता है। मकसद desktop की बराबरी नहीं, बल्कि पढ़ने लायक और responsive बने रहना है। असली GPU benchmarks के लिए browser 3D performance numbers देखें।
12 में से भाग 3.
पिछला: भाग 2 - Worker physics और input lag का डर
अगला: भाग 4 - Fancy terrain से पहले streaming
Series guide: /blog/2026-02-25-open-world-browser-series-guide