Indlela yokunciphisa wonke amawindi ku-Windows 7

Uma ufuna ukwakha umdlalo wakho kukhompyutha, kuzomele ufunde ukuthi ungasebenza kanjani nezinhlelo ezikhethekile zokudala imidlalo. Izinhlelo ezinjalo zikuvumela ukuba udale izinhlamvu, udwebe izithombe bese uzibekela izenzo. Yiqiniso, lokhu akuwona wonke uhlu lwamathuba. Sizocabangela inqubo yokudala umdlalo kwenye yalezi zinhlelo - Umenzi weMidlalo.

Umenzi wegeyimu ungenye yezinhlelo ezilula futhi ezithandwayo kakhulu zokudala imidlalo ye-2D. Lapha ungadala imidlalo usebenzisa isikhombimsebenzisi se-drag'nidrop noma usebenzisa ulimi olwakhiwe ngo-GML (sizosebenza ngalo). Umenzi wegeyimu uyindlela engcono kunazo zonke kulabo abaqala ukuthuthukisa imidlalo.

Landa umenzi wegeyimu mahhala

Indlela yokufaka Umenzi Wegeyimu

1. Landela isixhumanisi esingenhla bese uya khona kuwebhusayithi esemthethweni yohlelo. Uzoyiswa ekhasini lokulanda lapho ungathola khona inguqulo yamahhala yohlelo - Ukulandwa kwamahhala.

2. Manje udinga ukubhalisa. Faka yonke idatha edingekayo bese uya ebhokisini lemeyili lapho incwadi yokuqinisekisa izofika khona. Landela isixhumanisi bese ungena ku-akhawunti yakho.

3. Manje ungalanda umdlalo.

4. Kodwa akusikho konke. Uhlelo esilandile, kuphela ukuyisebenzisa ludinga ilayisense. Singayithola mahhala izinyanga ezingu-2. Ukuze wenze lokhu, ekhasini elifanayo lapho ulayishe khona umdlalo, kwinto ethi "Engeza Ilayisense", thola ithebhu ye-Amazon bese uchofoza inkinobho ethi "Chofoza lapha" ehlukile.

5. Ewindini evulekayo, udinga ukungena ngemvume ku-akhawunti yakho ku-Amazon noma ukuyidala, bese ungena ngemvume.

6. Manje sinesihluthulelo ongasithola ngaphansi kwekhasi elifanayo. Kopisha it.

7. Sidlula inqubo evamile yokufaka.

8. Ngesikhathi esifanayo, umfakisi uzosinika ukufaka i-GameMaker: Umdlali. Faka it. Umdlali udinga ukuhlola imidlalo.

Lokhu kuqeda ukufakwa futhi siqhubeka nokusebenza nohlelo.

Indlela yokusebenzisa i-Game Maker

Qalisa uhlelo. Ekholini lesithathu sifaka ukhiye welayisensi esiwukopishe, futhi okwesibili sifaka ukungena ngemvume nephasiwedi. Manje qala kabusha uhlelo. Usebenza!

Yiya kuthebhu entsha bese udala iphrojekthi entsha.

Manje dala i-sprite. Chofoza ngakwesokudla kwento ye-Sprites, bese udala i-Sprite.

Mnike igama. Masibe ngumdlali bese uchofoze Hlela i-Sprite. Iwindi lizovuleka lapho singakwazi ukuguqula noma ukudala i-sprite. Dala i-sprite entsha, isayizi ngeke ishintshe.

Manje chofoza kabili ku-sprite entsha. Esikhathini somhleli ovulekile singadonsela i-sprite. Okwamanje sidonsela umdlali, futhi ikakhulukazi - itangi. Londoloza umdwebo wethu.

Ukuze wenze izithombe ze-tank yethu, kopisha bese unamathisela isithombe ngezingxube ze-Ctrl + C no-Ctrl + V, ngokulandelana, bese udweba indawo ehlukile yesibindi. Ungenza amakhophi amaningi njengoba uthanda. Izithombe ezengeziwe, ezithakazelisayo kakhulu izithombe.

Manje ungabeka uphawu ngaphambi kokubuka kuqala. Uzobona izithombe ezidaliwe futhi ungashintsha isilinganiso sefreyimu. Londoloza isithombe bese uyisibeka ngokusebenzisa inkinobho yesikhungo. Uhlamvu lwethu selulungile.

Ngendlela efanayo, sidinga ukudala amanye ama-sprites amathathu: isitha, udonga kanye ne-projectile. Asibize ngokuthi isitha, udonga kanye nenhlamvu ngokulandelana.

Manje udinga ukudala izinto. Kuthebhu yezinjongo, chofoza ngakwesokudla bese ukhetha Yakha into. Manje dala into ye-sprite ngayinye: ob_player, ob_enemy, ob_wall, ob_bullet.

Qaphela!
Uma udala into yedonga, hlola ibhokisi eduze kwe-Solid. Lokhu kuzokwenza udonga luqinile futhi amathangi ngeke akwazi ukudlula kuwo.

Yiya kunzima. Vula into ye-ob_player bese uya kuthebhu Yokulawula. Yakha umcimbi omusha nge inkinobho Yengezela Engeza bese ukhetha Yakha. Manje chofoza ngakwesokudla ku-Execute Code.

Ewindini evulekayo, udinga ukubhalisa ukuthi yiziphi izenzo tank lethu elizokwenza. Masibhale le migqa:

hp = 10;
dmg_time = 0;

Yakha umcimbi wesinyathelo ngendlela efanayo bese ubhala ikhodi yayo:

image_angle = i-point_direction (x, y, i-mouse_x, i-mouse_y);
uma i-keyboard_check (i-ord ('W')) {{y- = 3};
uma i-keyboard_check (i-oda ('S')) {{+} = 3};
uma i-keyboard_check (i-ord ('A')) {x- = 3};
uma i-keyboard_check (i-ord ('D')) {x + = 3};

uma i-keyboard_check_released (imiyalo ('W')) {{speed = 0;}
uma i-keyboard_check_released (i-ord ('S')) {{speed = 0;}
uma i-keyboard_check_released (imiyalo ('A')) {{speed = 0;}
uma i-keyboard_check_yihlisiwe (imiyalo ('D')) {{speed = 0;}

uma i-mouse_check_button_press (mb_left)
{
nge-instance_create (x, y, ob_bullet) {speed = 30; isiqondisi = i-point_direction (ob_player.x, ob_player.y, mouse_x, mouse_y);}
}

Engeza umcimbi wokuhlangana - ukushayisana nodonga. Ikhodi:

x = okucacile;
y = engacacile;

Futhi wengeze ukushayisana nesitha:

uma dmg_time <= 0
{
hp- = 1
dmg_time = 5;
}
dmg_time - = 1;

Dweba umcimbi:

draw_self ();
draw_text (50,10, string (hp));

Manje engeza Isinyathelo - Isinyathelo sokuphela:
uma hp <= 0
{
bonisa_message ('Game over')
ekamelweni_ukuhlala ();
};
uma i-instance_number (ob_enemy) = 0
{
bonisa_message ('ukunqoba!')
ekamelweni_ukuhlala ();
}

Manje njengoba senziwe nomdlali, iya ku-object ob_yisitha. Engeza Yakha umcimbi:

r = 50;
isiqondiso = khetha (0,90,180,270);
ijubane = 2;
hp = 60;

Manje ake sengeze Isinyathelo ekuhambeni:

uma ibanga_to_object (ob_player) <= 0
{
isiqondisi = i-point_direction (x, y, ob_player.x, ob_player.y)
ijubane = 2;
}
okunye
{
uma r <= 0
{
isiqondiso = khetha (0,90,180,270)
ijubane = 1;
r = 50;
}
}
image_angle = isiqondiso;
r- = 1;

Qeda Isinyathelo:

uma i-hp <= 0 i-instance_destroy ();

Yakha umcimbi wokubhubhisa, iya kuthebhu yokudweba nakwezinye izinto, chofoza isithonjana ngokuqhuma. Manje, lapho ubulala isitha, kuyoba khona izithombe zokuqhuma.

Ukungqubuzana - ukungqubuzana nodonga:

isiqondiso = - isiqondiso;

Ukungqubuzana - ukungqubuzana nge-projectile:

hp- = i-irandom_range (10.25)

Njengoba udonga lungenzi noma yikuphi izenzo, siyaqhubeka nento e-ob_bullet. Engeza ukungqubuzana kokushayisana nesitha:

isibonelo_destroy ();

Futhi ukuhlangana ngodonga:

isibonelo_destroy ();

Okokugcina, yakha iNqanaba 1. Sichofoza ngokuqondile Igumbi -> Yakha Igumbi. Yana ezintweni ithebhu bese udweba imephu yezinga usebenzisa into ye-Wall. Bese useza omunye umdlali nezitha eziningana. Izinga lilungele!

Ekugcineni singaqala umdlalo bese siwuvivinya. Uma ulandela imiyalo, khona-ke akufanele kube khona izimbungulu.

Yilokho kuphela. Sibheke indlela yokwakha umdlalo kukhompyutha yakho uqobo, futhi uthola umbono wesimiso onjengeMenzi weMidlalo. Qhubeka ukuthuthukisa futhi maduzane uzokwazi ukudala imidlalo eminingi ethakazelisayo nangaphezulu.

Inhlanhla!

Landa Umenzi Wegeyimu kusuka kusiza esisemthethweni

Bheka futhi: Ezinye isofthiwe yokudala imidlalo