1. हम क्या बना रहे हैं
ज़्यादातर “Godot Vampire Survivors tutorial” सामग्री player, कुछ enemies और एक gun तक पहुँचकर रुक जाती है। यह गाइड आगे जाती है और Godot 4.6 के लिए एक पूरे survivors-like (bullet heaven), Pop Survivors PLUS, को उसकी असली GDScript files से कॉपी किए गए अंशों के साथ समझाती है। web के लिए सिर्फ tabs को spaces में बदला गया है।
गेम में ये हैं:
- तीन playable heroes, हर एक का अपना starting weapon और अलग HP, speed और pickup range;
- पाँच levels वाले auto-attack weapons: Star Wand (aimed bolts), Pop Nova (shockwave) और Orbit Buddies (चक्कर लगाते stars);
- XP gems, level-up cards और चार passive items;
- चमकते elite enemies जो treasure chests गिराते हैं, और weapon evolution जब max-level weapon अपने जोड़ीदार passive से मिलता है;
- हर दो मिनट में चार attack patterns वाला एक boss, MEGA GLOOP;
- 8 मिनट तक बचे रहने पर जीत;
- runs के बीच save होने वाले coins और छह permanent upgrades वाली एक shop;
- कोड में synthesize किए गए 21 sound effects, बिना किसी audio file और बिना sprites के।
आगे पढ़ने से पहले आप इसे itch.io पर अपने browser में खेल सकते हैं।
2. Project Structure: एक Manager, साधारण Nodes
main.gd पूरा game loop चलाता है। player.gd, enemy.gd, boss.gd, gem.gd, bolt.gd और chest.gd सिर्फ state रखते हैं और _draw() से खुद को draw करते हैं। hud.gd, fx.gd और sfx.gd UI, effects और sound संभालते हैं, और game_state.gd characters और saved progress रखता है।
मुख्य फ़ैसला enemy.gd के ऊपर वाले comment में है:
extends Node2D
## Enemy blobs. Movement/collision is driven by main.gd; this node just holds stats and draws.
कोई physics body नहीं है और कोई Area2D signals नहीं। main.gd साधारण arrays (enemies, gems, bolts, chests) रखता है और हर frame उन्हें एक तय क्रम में update करता है:
if not game_over:
time += delta
_spawning(delta)
_update_enemies(delta)
if not game_over:
_weapons(delta)
_update_bolts(delta)
_update_gems(delta)
_update_shots(delta)
_update_chests()
_cleanup()
Nodes को कभी loop के बीच में free नहीं किया जाता। जो भी मरता है वह बस dead, collected या life = 0 सेट करता है, और frame के अंत में _cleanup() queue_free() call करता है और arrays को फिर से बनाता है।
3. Player Movement और Damage
Movement एक ही Input.get_vector() call है। पहले Input Map में move_left, move_right, move_up और move_down जोड़ें:
elif not dead:
var dir := Input.get_vector("move_left", "move_right", "move_up", "move_down")
moving = dir.length() > 0.1
position += dir * speed * delta
if absf(dir.x) > 0.1:
facing = signf(dir.x)
get_vector() पहले से diagonals को normalize करता है और gamepad sticks support करता है। Damage एक ही function से होकर जाता है जो बताता है कि hit लगा या नहीं, ताकि callers सिर्फ असली hits पर ही स्क्रीन हिलाएँ या sound बजाएँ:
func take_damage(amount: float) -> bool:
if dead or invuln > 0.0:
return false
hp -= amount
invuln = 0.6
hurt_flash = 1.0
if hp <= 0.0:
hp = 0.0
dead = true
visible = false
died.emit()
return true
0.6 सेकंड की invuln window ही swarm को एक frame में आपका HP खत्म करने से रोकती है। hero के stats game_state.gd में चुने गए character से apply_character() के ज़रिए आते हैं।
4. Enemy Spawning और Swarm Waves
Spawning एक timer है जो run के आगे बढ़ने के साथ तेज़ होता जाता है और ज़्यादा enemies spawn करता है। इसके अलावा हर 40 सेकंड में ring के आकार की “SWARM!” waves और हर 45 सेकंड में एक elite आता है:
spawn_timer -= delta
if spawn_timer <= 0.0:
spawn_timer = maxf(0.18, 1.0 - time * 0.01) * (2.0 if boss != null else 1.0)
var n := 1 + int(time / 30.0)
for i in n:
spawn_enemy(_pick_kind())
if int(time / 40.0) > waves and boss == null and time < WIN_TIME:
waves += 1
fx.popup_text(player.position + Vector2(0, -60), "SWARM!", Color("ff4fd8"), 40)
for i in 20 + waves * 4:
var a := i * TAU / (20 + waves * 4)
spawn_enemy("bat" if waves % 2 == 0 else "blob", player.position + Vector2.from_angle(a) * 700.0)
elite_timer -= delta
if elite_timer <= 0.0:
elite_timer = 45.0
spawn_elite()
spawn interval 1 सेकंड से घटकर न्यूनतम 0.18 तक जाता है, और batch size हर 30 सेकंड में एक बढ़ता है। जब तक boss ज़िंदा है interval दोगुना रहता है, ताकि लड़ाई समझ में आती रहे। time < WIN_TIME check किसी wave को जीत वाले frame पर ही शुरू होने से रोकता है, यह build के दौरान पकड़े गए bugs में से एक था (नीचे देखें)।
_pick_kind() 20 सेकंड के बाद तेज़ bats और 50 के बाद मज़बूत horned blobs unlock करता है। हर kind enemy.gd के setup() में एक row है, और HP को बीते समय के हिसाब से e.setup(kind, 1.0 + time / 70.0) से scale किया जाता है:
"blob":
hp = 10; speed = 80; damage = 5; radius = 18; color = Color("ff5d8f"); xp_value = 1
"bat":
hp = 6; speed = 140; damage = 4; radius = 14; color = Color("9b5de5"); xp_value = 1
"big":
hp = 80; speed = 55; damage = 12; radius = 32; color = Color("ff9f1c"); xp_value = 5
"elite":
hp = 420; speed = 72; damage = 16; radius = 40; color = Color("ffc300"); xp_value = 15
नए enemies player से 720–820 pixels दूर, 1280×720 view के ठीक बाहर दिखते हैं, और spawn_enemy() MAX_ENEMIES := 320 से आगे जाने से मना कर देता है (elites इससे मुक्त हैं)।
5. Spatial Hash से Swarm को Move करना
हर enemy को हर दूसरे enemy से जाँचना O(n²) है: 320 enemies के साथ यह प्रति frame लगभग 100,000 जोड़े हैं। इसके बजाय हर frame main.gd enemies को 64-pixel grid cells में बाँटता है, और हर query सिर्फ किसी point के आसपास के 3×3 cells देखती है:
func _cell(p: Vector2) -> Vector2i:
return Vector2i(floori(p.x / CELL), floori(p.y / CELL))
func _neighbors(p: Vector2) -> Array:
var out: Array = []
var c := _cell(p)
for ox in range(-1, 2):
for oy in range(-1, 2):
var k := c + Vector2i(ox, oy)
if grid.has(k):
out.append_array(grid[k])
return out
हर enemy player का पीछा करता है, overlap करते पड़ोसियों से दूर हटता है और अपना knockback जोड़ता है, जो जल्दी खत्म हो जाता है:
var sep := Vector2.ZERO
for o in _neighbors(e.position):
if o == e:
continue
var diff: Vector2 = e.position - o.position
var dl := diff.length()
var minr: float = e.radius + o.radius
if dl < minr and dl > 0.01:
sep += diff / dl * (minr - dl)
var chase: Vector2 = dir * e.speed if not game_over else -dir * 40.0
e.position += (chase + e.knock) * delta + sep.limit_length(4.0) * 0.5
e.knock = e.knock.move_toward(Vector2.ZERO, 1100.0 * delta)
limit_length(4.0) separation को नरम रखता है, ताकि भीड़ बिखरने के बजाय एक blob में सिकुड़ जाए। जब player को hit लगता है, तो पास के non-elite enemies को उससे दूर 420 का knockback मिलता है, जिससे आपको निकलने की जगह मिलती है। 1300 pixels से ज़्यादा दूर के enemies को random दिशा में 760 pixels पर वापस ले आया जाता है, ताकि off-screen से पीछा करने में कुछ बर्बाद न हो। वही _neighbors() query bolt hits और orbit hits के लिए भी दोबारा इस्तेमाल होती है।
6. Levels वाले Auto-Firing Weapons
सभी items, weapons और passives, एक ही dictionary में data हैं। हर weapon अपने जोड़ीदार passive और अपने evolution का नाम बताता है:
const ITEMS := {
"wand": {"title": "Star Wand", "type": "weapon", "color": "ffb703", "pair": "charm", "evo": "galaxy",
"new": "Auto-aimed star bolts", "up": "More bolts, damage, pierce"},
...
"charm": {"title": "Spark Charm", "type": "passive", "color": "fb5607", "pair": "wand",
"new": "+12% damage for all weapons", "up": "+12% damage for all weapons"},
player की inventory बस levels: Dictionary (item id → level) और evolved है। _weapons(delta) हर frame चलता है और हर weapon का अपना timer है। evolution से पहले Star Wand यह है:
elif bolt_timer <= 0.0:
var target = _nearest_enemy(620.0)
if target == null:
bolt_timer = 0.1
else:
bolt_timer = 0.85 * pow(0.88, wl - 1)
var count := 1 + int(wl >= 2) + int(wl >= 4)
var pierce := int(wl >= 3) + int(wl >= 5)
var base: float = (target.position - player.position).angle()
for i in count:
_fire_bolt(base + (i - (count - 1) / 2.0) * 0.22, 560.0, 10.0 * (1.0 + 0.3 * (wl - 1)) * m, pierce)
हर level कुछ ऐसा करता है जो आपको दिखता है: level 2 दूसरा bolt जोड़ता है, level 3 pierce, level 4 तीसरा bolt, level 5 और pierce, और हर level 12% तेज़ fire करता है और 30% ज़्यादा ज़ोर से मारता है। range में कोई target न हो तो shot बर्बाद करने के बजाय यह 0.1 सेकंड में फिर से जाँचता है। m Spark Charm passive और shop के Might upgrade से आने वाला global damage multiplier है:
func dmg_mult() -> float:
return (1.0 + 0.12 * lv("charm")) * (1.0 + Game.bonus("might"))
Piercing bolts याद रखती हैं कि उन्होंने किसे मारा (b.hit)। Orbit Buddies में कोई projectile नहीं है: star positions एक angle से आती हैं, और हर enemy के लिए 0.3 सेकंड का orbit_cd है। Pop Nova हर 3.0 सेकंड (level 5 पर 1.8 तक) एक radius के अंदर सब कुछ hit करता है।
7. XP Gems और Level-Up Cards
मारे गए enemies अपने xp_value के बराबर एक gem गिराते हैं। player.magnet pixels के अंदर के gems attracted हो जाते हैं और आपकी ओर तेज़ी से बढ़ते हैं। इन्हें इकट्ठा करने से XP मिलता है, और level-up loop एक साथ मिले कई levels को संभालता है:
while xp >= xp_next:
xp -= xp_next
level += 1
xp_next = roundf(xp_next * 1.22 + 3.0)
pending_levels += 1
if pending_levels > 0 and not get_tree().paused:
_open_level_up()
_open_level_up() tree को pause करता है और HUD से तीन cards दिखाने को कहता है। pause के दौरान भी HUD का CanvasLayer चलता रहता है। cards हर उस item से चुने जाते हैं जो maxed या evolved नहीं है, साथ में घायल होने पर एक heal card:
func _roll_choices() -> Array:
var pool: Array = []
for id in ITEMS:
if lv(id) >= MAX_LV or evolved.has(id):
continue
pool.append(_card_for(id))
if player.hp < player.max_hp * 0.7 or pool.size() < 3:
pool.append({"id": "heal", "title": "Snack Time", "desc": "Heal 50% of max HP", "color": "ff9f1c", "tag": "HEAL"})
pool.shuffle()
return pool.slice(0, 3)
_card_for() हर card पर “NEW!” या “Lv 2 > 3” label लगाता है, साथ में “Evolves with Spark Charm” जैसा hint, जो evolution की जोड़ियाँ सिखाता है। card चुनने पर pending_levels घटता है और अगला set दिखता है या pause हटता है। एक छोटी-सी बारीकी: तेज़ chain में हर gem के साथ gem pickup की pitch बढ़ती है (1.0 + gem_chain * 0.035), इसलिए ढेर समेटना एक चढ़ते सुर जैसा लगता है।
8. Passives, Elite Chests और Weapon Evolution
चारों passives _level_item() में सीधे stats बदलते हैं: Big Heart 20 max HP जोड़ता है और heal करता है, Bouncy Boots speed को 1.1 से गुणा करता है, Gem Magnet pickup range को 1.4 से गुणा करता है, और Spark Charm dmg_mult() को बढ़ाता है।
Elites सुनहरे, crown वाले enemies हैं जिनका base HP 420 है और knockback सिर्फ 15%। जब कोई elite मरता है, तो एक chest गिराता है:
if e.kind == "elite":
spawn_chest(e.position)
hitstop(0.12)
chest को छूने पर गेम pause होता है, और reward एक तय क्रम में चुना जाता है: पहले evolution अगर कोई तैयार हो, फिर किसी owned item का random level-up, और fallback के रूप में heal:
for id in ["wand", "nova", "orbit"]:
var it: Dictionary = ITEMS[id]
if lv(id) >= MAX_LV and lv(it["pair"]) > 0 and not evolved.has(id):
var ev: Dictionary = EVOS[it["evo"]]
return {"type": "evo", "id": id, "from": it["title"], "with": ITEMS[it["pair"]]["title"],
"title": ev["title"], "desc": ev["desc"], "color": ev["color"]}
तो नियम वही क्लासिक है: max-level weapon और उसके जोड़ीदार passive का कम से कम एक level। यह सही होने पर inventory HUD weapon को ready mark करता है, ताकि आपको पता रहे कि अगली chest अहम है। Evolve करना बस evolved[id] = true सेट करता है। फिर हर weapon branch उस flag को जाँचती है:
var evo := evolved.has("orbit")
var count := 8 if evo else ol + 1
var radius := (135.0 + sin(time * 2.2) * 35.0) if evo else 95.0
var dmg := (28.0 if evo else 8.0 + 2.0 * (ol - 1)) * m
Galaxy Scepter हर 0.28 सेकंड में तीन rainbow bolts और हर 1.3 सेकंड में 14 bolts की एक ring fire करता है। Heart Quake 290 radius की एक nova है जो हर hit हुए enemy के लिए आपको heal करती है, अधिकतम 8 HP तक। Evolution को HUD पेश करता है: chest एक सेकंड तक खड़खड़ाती है, फिर evolve jingle के साथ “EVOLUTION!” दिखाती है। इसे बंद करने पर _evolution_fx() rainbow rings छोड़ता है और 520 pixels के अंदर हर enemy को 60 damage (damage multiplier से गुणा) देता है।
9. Boss और उसके Attack Patterns
हर 120 सेकंड (BOSS_EVERY) में MEGA GLOOP spawn होता है। boss.gd enemy.gd को extend करता है, इसलिए वह उन्हीं arrays, damage और death code से होकर जाता है। उसका HP हर बार आने पर बढ़ता है: hp = 2400.0 * (1.0 + 0.7 * (t - 1))। उसका व्यवहार एक छोटी state machine है जो चार patterns के बीच घूमती है, और main.gd think(delta) call करके उसे आगे बढ़ाता है:
const PATTERNS := ["bloom", "slam", "spiral", "summon"]
- Bubble Bloom: bullets की
2 + tierrings, हर दूसरी ring आधे step से खिसकी हुई; - Belly Slam: झुकता है, वहाँ कूदता है जहाँ आप थे, shockwave के साथ उतरता है और blobs spawn करता है;
- Spiral Spit: धीरे-धीरे आपकी ओर बढ़ते हुए bullets के घूमते arms;
- Bat Call:
5 + tierbats की एक ring।
patterns के बीच वह "chase" में रहता है। slam दिखाता है कि attack को fair कैसे बनाएँ: पहले landing spot mark होता है, और jump एक lerp है जिसमें ऊँचाई के लिए sine arc जोड़ा गया है:
if fired == 0:
jump_from = position
jump_to = pp
main.fx.warn(jump_to, 160.0, 1.0)
fired = 1
if st < 0.55:
height = 0.0
elif st < 1.05:
var k := (st - 0.55) / 0.5
position = jump_from.lerp(jump_to, k)
height = sin(k * PI) * 160.0
boss player को सिर्फ तब छूता है जब height < 20.0 हो, और हवा में रहते हुए उसकी परछाई छोटी हो जाती है। Boss bullets nodes बिल्कुल नहीं हैं, बस main.gd के shots array में dictionaries हैं, जिन्हें हर frame move करके player के विरुद्ध जाँचा जाता है और fx.gd draw करता है। 420 pixels से ज़्यादा दूर होने पर boss तिगुनी speed से पीछा करता है, और pattern तभी शुरू करता है जब पास हो, इसलिए वह कभी off-screen से attack नहीं करता। उसे मारने पर एक chest, 16 gems और 12 coins गिरते हैं, 0.25 सेकंड के hit-stop के साथ।
10. 8 मिनट की जीत
जीत एक ही constant है, WIN_TIME := 480.0, जिसे _process() में जाँचा जाता है:
if not game_over and time >= WIN_TIME:
_win()
_win() स्क्रीन पर हर enemy को pop करता है, rainbow rings चलाता है, 50 coins का bonus जोड़ता है, coins bank करता है और victory screen दिखाता है। HUD हमेशा अगला लक्ष्य दिखाता है: “Boss in 1:42”, फिर “SURVIVE 0:59!”।
11. Saved Coins और Permanent-Upgrade Shop
Meta progression game_state.gd में रहता है, एक RefCounted script जिसका कभी instance नहीं बनता। इसे const Game := preload("res://scripts/game_state.gd") के ज़रिए इस्तेमाल किया जाता है, और इसके static variables बिना autoload के scene बदलने पर भी बने रहते हैं:
static var selected: int = 0
static var open_select: bool = false # skip the title page when returning from a run
static var coins: int = 0
static var shop_levels: Dictionary = {}
static var _loaded: bool = false
shop एक data table है (Might, Vitality, Swiftness, Magnetism, Growth, Greed), हर एक में पाँच levels और cost * (level + 1) की कीमत। खरीदना और लागू करना दोनों बहुत छोटे हैं:
static func try_buy(id: String) -> bool:
var it := shop_item(id)
if shop_level(id) >= int(it["max"]) or coins < next_cost(id):
return false
coins -= next_cost(id)
shop_levels[id] = shop_level(id) + 1
save()
return true
## Total bonus from a permanent upgrade (level * per-level amount).
static func bonus(id: String) -> float:
var it := shop_item(id)
return shop_level(id) * float(it.get("per", 0.0))
save() coins, shop levels और चुने गए hero को ConfigFile से user://save.cfg में लिखता है, और ensure_loaded() उसे एक बार पढ़ता है। run की शुरुआत में main.gd character के stats के ऊपर bonuses लागू करता है:
player.max_hp += Game.bonus("vitality")
player.hp = player.max_hp
player.speed *= 1.0 + Game.bonus("swift")
player.magnet *= 1.0 + Game.bonus("magnet")
Coins सामान्य enemies से कभी-कभार (8%), elites से हमेशा (8 coins) और bosses से भरपूर गिरते हैं। Game.bank() मौत और जीत दोनों पर चलता है, इसलिए हारने वाला run भी आपको आगे बढ़ाता है।
12. कोड में Synthesize किए गए Sound Effects
प्रोजेक्ट में कोई .wav या .ogg file नहीं है। sfx.gd startup पर हर sound बनाता है। एक _tone() helper एक voice को PackedFloat32Array में render करता है: एक frequency glide, एक waveform (sine, square, tri, saw या noise) और एक decay envelope। _mix() voices को परतों में मिलाता है। फिर _wav() samples को एक असली AudioStreamWAV में बदलता है:
static func _wav(samples: PackedFloat32Array) -> AudioStreamWAV:
var data := PackedByteArray()
data.resize(samples.size() * 2)
for i in samples.size():
data.encode_s16(i * 2, int(clampf(samples[i], -1.0, 1.0) * 32000.0))
var w := AudioStreamWAV.new()
w.format = AudioStreamWAV.FORMAT_16_BITS
w.mix_rate = RATE
w.stereo = false
w.data = data
return w
इसके बाद sound design हर effect के लिए एक line बन जाता है। shot एक छोटी चढ़ती square chirp है, और boss slam गिरती sine के ऊपर परत चढ़ाया गया noise है:
s["shoot"] = _tone(1100, 1700, 0.07, "square", 0.12, 0.002, 2.5)
s["slam"] = _mix([[0.0, _tone(1, 1, 0.45, "noise", 0.4, 0.002, 2.5)], [0.0, _tone(140, 35, 0.55, "sine", 0.8, 0.002, 1.2)]])
Playback 24 AudioStreamPlayer nodes के pool, हर play पर थोड़ी random pitch, और एक MIN_GAP table (उदाहरण के लिए "shoot" के लिए 70 ms, "hit" के लिए 45 ms) का इस्तेमाल करता है, ताकि एक साथ मरते 300 enemies शोर में न बदल जाएँ। Gameplay code कहीं से भी static Sfx.play("pop") call करता है, और node PROCESS_MODE_ALWAYS सेट करता है ताकि tree pause होने पर भी level-up और chest sounds बजते रहें।
13. Game Feel: Hit-Stop, Squash, Flash, Camera Lead
Hit-stop. Elite kills, boss kills और मौत गेम को एक पल के लिए रोक देते हैं। timer को time scale को अनदेखा करना होता है, वरना वह माँगे गए समय से 20 गुना ज़्यादा लेगा:
func hitstop(dur: float) -> void:
Engine.time_scale = 0.05
await get_tree().create_timer(dur, true, false, true).timeout
Engine.time_scale = 1.0
_exit_tree() भी Engine.time_scale को reset करता है, अगर आप freeze के बीच में restart करें।
Squash and stretch. damage_enemy() e.hitpop = 1.0 और e.flash = 1.0 सेट करता है। enemy दोनों values को घटाता है और अपना scale दबाता है, जबकि _draw() flash के हिसाब से उसके रंग को सफ़ेद की ओर lerp करता है:
hitpop = maxf(0.0, hitpop - delta * 7.0)
var amt := 0.07 if kind == "boss" else 0.28
scale = base_scale * Vector2(1.0 + amt * hitpop, 1.0 - amt * 0.6 * hitpop)
Hurt flash. जब player को hit लगता है, तो उसकी body सफ़ेद चमकती है (body_color.lerp(Color.WHITE, hurt_flash)) और invuln रहने तक लाल blink करती है। boss hits पर hud.flash() एक full-screen ColorRect को भी लाल से transparent तक tween करता है।
Screen shake और camera lead. एक ही shake value hits से बढ़ती है और हर frame घटती है। camera भी उस ओर खिसकता है जिधर आप जा रहे हैं, ताकि आप जिससे टकराने वाले हैं उसका ज़्यादा हिस्सा देख सकें:
shake = move_toward(shake, 0.0, 40.0 * delta)
camera.offset = Vector2(randf_range(-1, 1), randf_range(-1, 1)) * shake
# camera leads a little in the direction you move
var mv := Input.get_vector("move_left", "move_right", "move_up", "move_down") if not game_over else Vector2.ZERO
camera.position = camera.position.lerp(mv * 70.0, minf(1.0, 3.0 * delta))
damage numbers और हर pop पर एक burst जोड़ें, और गेम बिना एक भी sprite के जीवंत लगता है।
14. AI से बनाना
इस कोड की एक भी line किसी इंसान ने type नहीं की। इसे Godot MCP Pro के ज़रिए Godot editor से जुड़े Claude Code ने बनाया। core loop (player, enemies, auto-aim, gems, level-ups) एक prompt से लगभग 9 मिनट में बना। चार और prompts ने लगभग 24 मिनट और में इसे ऊपर वाले गेम में बदल दिया, कुल 33 मिनट। prompts मूल अंग्रेज़ी में:
क्योंकि AI MCP के ज़रिए गेम चला सकता था, input भेज सकता था, errors पढ़ सकता था और screenshots ले सकता था, उसने अपने काम को खुद play-test किया और रास्ते में ये bugs ठीक किए:
- एक टूटा हुआ autoload जिससे editor compile errors दिखा रहा था;
- character select पर कटा हुआ text और गलत card sizes;
- पूरे circle के रूप में draw हुआ chest का ढक्कन जिसने chest को छिपा दिया;
- boss का off-screen रहते हुए ही attacks करना;
- जीत वाले frame पर ही एक swarm wave का चल पड़ना;
- victory screen पर hero की टोपी का “WIN” अक्षरों को ढक देना।
इनमें से दो के बचाव आप ऊपर के अंशों में देख सकते हैं: swarm waves पर time < WIN_TIME check और boss का “पहले पास आओ, फिर attack करो” नियम। game_state.gd को भी autoload के बजाय preloaded script के रूप में इस्तेमाल किया गया है। _unhandled_input() में छोड़ी गई debug keys (F2 एक elite spawn करती है, F3 एक weapon और उसके passive को max करती है, F4 boss बुलाती है, F5 आखिरी सेकंडों पर पहुँचा देती है) testing के दौरान आपको late-game states तक सेकंडों में पहुँचने देती हैं। ये सिर्फ debug builds में काम करती हैं।
build को YouTube पर देखें, Pop Survivors PLUS showcase page पर विवरण पढ़ें, या itch.io पर build खेलें। अगर bullet patterns आपकी पसंद हैं, तो Godot 4 bullet hell ट्यूटोरियल उस पहलू पर और गहराई में जाता है।
15. अक्सर पूछे जाने वाले प्रश्न (FAQ)
Godot 4 survivors-like में सैकड़ों enemies को कैसे संभालें?
इस गेम में enemies साधारण Node2D nodes हैं जो सिर्फ stats रखते हैं और खुद को draw करते हैं। एक manager script उन सबको move करती है, और एक spatial hash (64-pixel grid cells की एक Dictionary) की वजह से हर enemy, bolt और orbiting star हर दूसरे enemy की जगह सिर्फ अपने आसपास के नौ cells जाँचता है। enemies की संख्या 320 पर सीमित है, और जो enemies 1300 pixels से ज़्यादा पीछे छूट जाते हैं उन्हें वापस player के सामने ले आया जाता है।
Weapon evolution कैसे काम करता है?
हर weapon एक passive item के साथ जोड़ा गया है। जब weapon अपने max level (5) पर पहुँचता है और आपके पास जोड़ीदार passive का कम से कम एक level होता है, तो अगली खोली गई treasure chest random level-up देने के बजाय उसे evolve कर देती है। Chests elite enemies से गिरती हैं, जो हर 45 सेकंड में spawn होते हैं, और हर boss से भी।
Runs के बीच coins और permanent upgrades कैसे save करें?
गेम meta progression को static variables वाली एक RefCounted script में रखता है, जो scene बदलने पर भी बने रहते हैं। Coins और shop levels run खत्म होने पर और हर खरीद के बाद ConfigFile से user://save.cfg में लिखे जाते हैं, और startup पर एक बार load होते हैं। हर upgrade level गुणा प्रति-level मात्रा जोड़ता है, उदाहरण के लिए Might के हर level पर +8% damage।
क्या मैं Godot में बिना audio files के sound effects बना सकता हूँ?
हाँ। गेम startup पर 21 sound effects बनाता है: pitch glides और decay envelopes के साथ sine, square, triangle, saw और noise waves के samples compute करके, उन्हें 16-bit PCM के रूप में एक PackedByteArray में encode करके, और उसे एक AudioStreamWAV को assign करके। 24 AudioStreamPlayer nodes का एक pool उन्हें बजाता है, हर sound के लिए न्यूनतम gap के साथ ताकि बड़ी लड़ाइयाँ शोर में न बदलें।
AI को अपना Godot गेम बनाने और Play-Test करने दें
Godot MCP Pro, Claude Code, Cursor, Cline और दूसरे AI assistants को 190 tools के साथ Godot 4 editor से जोड़ता है: scenes बनाएँ, scripts लिखें, गेम चलाएँ, input simulate करें और जो टूटे उसे ठीक करें।
create_script
play_scene
simulate_key
get_game_screenshot
get_editor_errors
एक बार की खरीद · आजीवन अपडेट · pricing की पूरी जानकारी देखें