www.gmindo.web.id/forum
Forum ini sudah tidak dipakai lagi. Silakan ke forum baru di www.gmindo.web.id/forum Very Happy

Terima kasih

Join the forum, it's quick and easy

www.gmindo.web.id/forum
Forum ini sudah tidak dipakai lagi. Silakan ke forum baru di www.gmindo.web.id/forum Very Happy

Terima kasih
www.gmindo.web.id/forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Membuat Game Online Sederhana Dengan Game Maker 8.0

+6
Rizky Wahyu
glupfruxx
indrakhucuy
sealovers
Kevin Blaze Coolerz
KirA
10 posters

Go down

Membuat Game Online Sederhana Dengan Game Maker 8.0 Empty Membuat Game Online Sederhana Dengan Game Maker 8.0

Post by KirA Mon 07 Jan 2013, 19:37

Cool
halo sobat-sobat Game Maker User.


post pertama kali aku isi dengan tutorial membuat game dengan Game Maker 8.0 Pro.
untuk yg belum punya GM8.0Pro download di google... hehehe
semak ya....

1. buat Sprite untuk Player. dan namai dengan "player" tampa tanda kutip.
2. masukan scripts untuk membuat koneksinya dengan cara filenya di drag ke Game Maker. ([You must be registered and logged in to see this link.])
3. buat Object beri nama "control" tanpa kutip. Add Event > Create. dan masukan Action Script:
Code:
//Script ini untuk bergabung/menyambungkan koneksi ke game
mplay_init_tcpip(get_string("Enter ip to connect to:","127.0.0.1"));//memulai keneksi ke game dengan IP
if !mplay_connect_status()=2 //koneksi sukses
{
  show_message("Failed to connect");//jika tidak sukses akan keluar pesan seperti disamping
  game_end();//dan game akan close otomatis
  exit;
}
if show_question("Host?")//bertanya, apa kamu menjadi HOST/SERVER
{
  global.host=true;
  global.playerlist="|";
  mplay_session_create("ses1",0,"server");
}
else
{
  global.host=false;
  if mplay_session_find()>0
  {
    mplay_session_join(0,get_string("Enter your name:","Dave")); //pesan pemberian nama player di game
  }
  else
  {
  show_message("No session found.");//jika SERVER/HOST tidak ada(belum dibuat/keluar/tidak terhubung) maka akan keluar pesan itu.
  game_end();//dan game keluar otomatis
  exit;
  }
}
global.players=1;

Add Event>Step. Masukan Action Script:

Code:
 if global.host//if we are the host
{
  if mplay_message_receive(0)//check for messages
  {
    if mplay_message_id()=1//if client asks to join
    {
      if mplay_message_value()=1//no reason for this, really...
      {
        //add player
        global.players+=1;//add 1 to the number of players
        inst=instance_create(10,10,other_player);//create the player
        inst.my_id=global.players;//give this player its id
        mplay_message_send_guaranteed(mplay_message_player() ,1,string(global.players)+global.playerlist);//send client its id, and info on other players
        global.playerlist+=string(global.players)+"|";//add this player to the player list
      }
    }
    if mplay_message_id()=2
    {
      //remove player
      v=mplay_message_value();//v = id of player to remove
      with other_player //check all instances of other_player
      {                //for the one with the right id
        if my_id=other.v//if it has the right id
        {
          instance_destroy();//fragmentate it
          global.playerlist=string_replace(global.playerlist,"|"+string(my_id)+"|","|");//remove from player list
          //note, we don't -1 from the global.players, as this is used to set ids, so would cause serious errors.
        }
      }
    }
    if mplay_message_id()=4//create bullet
    {
      explode_script(mplay_message_value(),"|");//make like a banana string
      inst=instance_create(x,y,ghost_bullet);//create ghost bullet
      inst.x=real(explode[0]);//start x of bullet
      inst.y=real(explode[1]);//start y of bullet
      inst.direction=real(explode[2]);//direction of bullet
      inst.speed=real(explode[3]);//bullet speed
      inst.my_id=real(explode[4]);//id of creator
    }
  }
}


Add Event>Begin Step. Masukan Action Script:

Code:
 if !global.host//if not the host
{
  if mplay_message_receive(0)//if we get a message
  {
    if mplay_message_id()=1//server is sending us our id (and data on other players)
    {
      make_players(mplay_message_value());//use the player data to make them
      mplay_message_send_guaranteed(0,3,player.my_id);//tell other users that im here
    }
    if mplay_message_id()=2//a player is leaving
    {
      v=mplay_message_value();//which one?
      with other_player//check all
      {
        if my_id=other.v instance_destroy();//this one! destroy...
      }
    }
    if mplay_message_id()=3//a player is joining
    {
      inst=instance_create(10,10,other_player);//create him (or her)
      inst.my_id=mplay_message_value();//give its ghost object the id
    }
    if mplay_message_id()=4//create bullet
    {
      explode_script(mplay_message_value(),"|");//make like a banana string
      inst=instance_create(x,y,ghost_bullet);//create ghost bullet
      inst.x=real(explode[0]);//start x of bullet
      inst.y=real(explode[1]);//start y of bullet
      inst.direction=real(explode[2]);//direction of bullet
      inst.speed=real(explode[3]);//bullet speed
      inst.my_id=real(explode[4]);//id of creator
    }

    if mplay_message_id()=5//host quit
    {
      show_message("Host has left the game. Goodbye.");
      game_end(); //haha kicked out
      exit;
    }
  }
}

Add Event>Game End. Masukan Action Script:

Code:
 if !global.host//if we are not the host, tell everyone we are leaving. otherwise, kick them all out!
{
  mplay_message_send_guaranteed(0,2,player.my_id);
}
else
{
  mplay_message_send_guaranteed(0,5,1);
}

4.buat Object dengan nama "player" tanpa kutip. masukan Event berikut:
Add Event>Create dan masukan Action Script:
Code:
my_speed=5;//player mempunyai speed 5
if !global.host
{
  mplay_player_find();
  p=mplay_player_name(1);
  mplay_message_send_guaranteed(p,1,1);
  my_id=-1;
}
else my_id=1;
Add event>Step dan masukan Action Script:
Code:
mplay_data_write(my_id,string(x)+"|"+string(y)+"|"+string(image_angle)+"|");
if keyboard_check(vk_up)
{
y-=5
image_angle=90
direction=90
}
if keyboard_check(vk_down)
{
y+=5
image_angle=270
direction=270
}
if keyboard_check(vk_left)
{
x-=5
image_angle=180
direction=180
}
if keyboard_check(vk_right)
{
x+=5
image_angle=0
direction=0
}

5. Buat Sprite dengan nama "other_player" tanpa kutip.
6. Buat Object dengan nama "other_player" tanpa kutip.
Add Event>Step. masukan Action Script:

Code:

data=mplay_data_read(my_id);//read data of player you are ghosting for
explode_script(data,"|");//split the data into something you can read
x=real(explode[0]);//go to position
y=real(explode[1]);//go to position
image_angle=real(explode[2]);//set image_angle


dan ok...
5. buat room..
6. taruh Object control dulu lalu Object player.
jadi deh,, dan test...
Games

ini file contoh GMK ([You must be registered and logged in to see this link.])


//Kamu harus jadi host jika ingin teman-temanmu terkoneksi ke game kamu...
dan alamat IP harus punya kamu. beri temanmu alamat IP kamu, dan main deh,,,,

kalo bisa sertakan credits Request

bila ada masalah / kurang jelas bisa komentar.. ^^ Selamat


Terakhir diubah oleh ~ F_Kz ~ tanggal Tue 08 Jan 2013, 15:48, total 2 kali diubah (Reason for editing : Update Tutorial)
KirA
KirA
Admin
Admin

100%
Jumlah posting : 144
Points : 182
Join date : 07.01.13
Age : 26
Lokasi : Mojokerto

http://f-kz22.blogspot.com

Kembali Ke Atas Go down

Membuat Game Online Sederhana Dengan Game Maker 8.0 Empty Re: Membuat Game Online Sederhana Dengan Game Maker 8.0

Post by KirA Mon 07 Jan 2013, 19:39

sorry nie kalo ga ke'LINK. pale
cz aku member baru. jadi gabisa nge'LINK kalo gak menetap disini selama 7 hari Mewek
KirA
KirA
Admin
Admin

100%
Jumlah posting : 144
Points : 182
Join date : 07.01.13
Age : 26
Lokasi : Mojokerto

http://f-kz22.blogspot.com

Kembali Ke Atas Go down

Membuat Game Online Sederhana Dengan Game Maker 8.0 Empty Re: Membuat Game Online Sederhana Dengan Game Maker 8.0

Post by Kevin Blaze Coolerz Mon 07 Jan 2013, 19:50

jangan post link ny kalo bsa di copas kesini. aku aja gk promosi blog walau ak admin ny
Kevin Blaze Coolerz
Kevin Blaze Coolerz
Admin
Admin

100%
Jumlah posting : 3323
Points : 3795
Join date : 06.01.13
Age : 28
Lokasi : Palembang

http://kevin-blaze-coolerz.blogspot.com/

Kembali Ke Atas Go down

Membuat Game Online Sederhana Dengan Game Maker 8.0 Empty Re: Membuat Game Online Sederhana Dengan Game Maker 8.0

Post by KirA Mon 07 Jan 2013, 20:22

Kevin Blaze Coolerz wrote:jangan post link ny kalo bsa di copas kesini. aku aja gk promosi blog walau ak admin ny

sorry Mewek
ga tau aku..
thanks uda di edit Jempol2
KirA
KirA
Admin
Admin

100%
Jumlah posting : 144
Points : 182
Join date : 07.01.13
Age : 26
Lokasi : Mojokerto

http://f-kz22.blogspot.com

Kembali Ke Atas Go down

Membuat Game Online Sederhana Dengan Game Maker 8.0 Empty Re: Membuat Game Online Sederhana Dengan Game Maker 8.0

Post by Kevin Blaze Coolerz Mon 07 Jan 2013, 22:41

~ F_Kz ~ wrote:
Kevin Blaze Coolerz wrote:jangan post link ny kalo bsa di copas kesini. aku aja gk promosi blog walau ak admin ny

sorry Mewek
ga tau aku..
thanks uda di edit Jempol2

ok gpp Very Happy

seep, sama" Jempol1
Kevin Blaze Coolerz
Kevin Blaze Coolerz
Admin
Admin

100%
Jumlah posting : 3323
Points : 3795
Join date : 06.01.13
Age : 28
Lokasi : Palembang

http://kevin-blaze-coolerz.blogspot.com/

Kembali Ke Atas Go down

Membuat Game Online Sederhana Dengan Game Maker 8.0 Empty Re: Membuat Game Online Sederhana Dengan Game Maker 8.0

Post by sealovers Fri 18 Jan 2013, 10:10

kk kalo supaya server bisa melihat akun client gimana tuh???? Bingung
sealovers
sealovers
Newbie
Newbie

100%
Jumlah posting : 82
Points : 86
Join date : 17.01.13
Lokasi : Garut

Kembali Ke Atas Go down

Membuat Game Online Sederhana Dengan Game Maker 8.0 Empty Re: Membuat Game Online Sederhana Dengan Game Maker 8.0

Post by indrakhucuy Thu 31 Jan 2013, 19:58


kira" bisa ga gan di gunakan di GM 8.1..???

Confused Confused Mellow Mellow
indrakhucuy
indrakhucuy
Newbie
Newbie

100%
Jumlah posting : 8
Points : 7
Join date : 29.01.13
Age : 29
Lokasi : Jl.Harapan RT05/03

http://clackclik.blogspot.com

Kembali Ke Atas Go down

Membuat Game Online Sederhana Dengan Game Maker 8.0 Empty Re: Membuat Game Online Sederhana Dengan Game Maker 8.0

Post by Kevin Blaze Coolerz Thu 31 Jan 2013, 20:11

indrakhucuy wrote:
kira" bisa ga gan di gunakan di GM 8.1..???

Confused Confused Mellow Mellow

jelas bisa Very Happy
Kevin Blaze Coolerz
Kevin Blaze Coolerz
Admin
Admin

100%
Jumlah posting : 3323
Points : 3795
Join date : 06.01.13
Age : 28
Lokasi : Palembang

http://kevin-blaze-coolerz.blogspot.com/

Kembali Ke Atas Go down

Membuat Game Online Sederhana Dengan Game Maker 8.0 Empty Re: Membuat Game Online Sederhana Dengan Game Maker 8.0

Post by indrakhucuy Sat 02 Feb 2013, 11:51

Tapi ane coba gan,,
di "step" ad yg error di line 33 Sad Sad
di "Begin step" yg error Sad Sad

kira" kenapa ya gan,,?? Sad Sad
mohon bantuannya.. cheers cheers
indrakhucuy
indrakhucuy
Newbie
Newbie

100%
Jumlah posting : 8
Points : 7
Join date : 29.01.13
Age : 29
Lokasi : Jl.Harapan RT05/03

http://clackclik.blogspot.com

Kembali Ke Atas Go down

Membuat Game Online Sederhana Dengan Game Maker 8.0 Empty Re: Membuat Game Online Sederhana Dengan Game Maker 8.0

Post by glupfruxx Wed 06 Feb 2013, 20:26

@indrakhucuy : errornya kaya gimana??
glupfruxx
glupfruxx
GM Beginner
GM Beginner

100%
Jumlah posting : 262
Points : 261
Join date : 07.01.13
Age : 29
Lokasi : Depok

https://glup-fruxx.tk

Kembali Ke Atas Go down

Membuat Game Online Sederhana Dengan Game Maker 8.0 Empty Error

Post by indrakhucuy Wed 13 Feb 2013, 11:46

glupfruxx wrote:@indrakhucuy : errornya kaya gimana??

waktu di copas,, scriptnya ada yg error gtu,,
indrakhucuy
indrakhucuy
Newbie
Newbie

100%
Jumlah posting : 8
Points : 7
Join date : 29.01.13
Age : 29
Lokasi : Jl.Harapan RT05/03

http://clackclik.blogspot.com

Kembali Ke Atas Go down

Membuat Game Online Sederhana Dengan Game Maker 8.0 Empty Re: Membuat Game Online Sederhana Dengan Game Maker 8.0

Post by Tamu Mon 04 Mar 2013, 20:19

wih ......... ini nih yg lagi ku cari dari hari itu gak dapat dapat , thx ... Jempol2

Tamu
Tamu


Kembali Ke Atas Go down

Membuat Game Online Sederhana Dengan Game Maker 8.0 Empty Re: Membuat Game Online Sederhana Dengan Game Maker 8.0

Post by Rizky Wahyu Fri 05 Jul 2013, 12:34

Mau tanyak nih harus pake dll gak?
Rizky Wahyu
Rizky Wahyu
Newbie
Newbie

100%
Jumlah posting : 28
Points : 37
Join date : 22.06.13
Age : 20
Lokasi : Jawa Tengah

Kembali Ke Atas Go down

Membuat Game Online Sederhana Dengan Game Maker 8.0 Empty Re: Membuat Game Online Sederhana Dengan Game Maker 8.0

Post by Kevin Blaze Coolerz Fri 05 Jul 2013, 12:52

^
gk pke dll Very Happy
Kevin Blaze Coolerz
Kevin Blaze Coolerz
Admin
Admin

100%
Jumlah posting : 3323
Points : 3795
Join date : 06.01.13
Age : 28
Lokasi : Palembang

http://kevin-blaze-coolerz.blogspot.com/

Kembali Ke Atas Go down

Membuat Game Online Sederhana Dengan Game Maker 8.0 Empty Re: Membuat Game Online Sederhana Dengan Game Maker 8.0

Post by meliaz99 Fri 05 Jul 2013, 22:40

gan, sekarang function mplay_ udah obsolete di GM:S. Ada gak cara lain? Apakah harus pake dll untuk di GM:S??

Dan apakah multiplayer di GM:S itu work di semua platform? (Karna ane butuhnya di Android.)
meliaz99
meliaz99
GM Beginner
GM Beginner

100%
Jumlah posting : 318
Points : 386
Join date : 11.05.13
Age : 24
Lokasi : Batam, Kepri, Indonesia

http://roychanmeliaz.wordpress.com

Kembali Ke Atas Go down

Membuat Game Online Sederhana Dengan Game Maker 8.0 Empty Re: Membuat Game Online Sederhana Dengan Game Maker 8.0

Post by Kevin Blaze Coolerz Sat 06 Jul 2013, 09:35

meliaz:
GMS kan udah punya bnyk cara utk konek ke internet, cz itu kan emg sangat di butuhkan utk platform seperti iOs dan android Very Happy
tpi ak jarang pke GMS, ak baru" ini berahli ke GMS, jdi kurang tau pke fungsi & dll apa Very Happy
Kevin Blaze Coolerz
Kevin Blaze Coolerz
Admin
Admin

100%
Jumlah posting : 3323
Points : 3795
Join date : 06.01.13
Age : 28
Lokasi : Palembang

http://kevin-blaze-coolerz.blogspot.com/

Kembali Ke Atas Go down

Membuat Game Online Sederhana Dengan Game Maker 8.0 Empty Re: Membuat Game Online Sederhana Dengan Game Maker 8.0

Post by fazryy.fathonirahmat Sat 13 Jul 2013, 05:43

kalo di GM 8 bikin Server Client ama sistem chatingan gimana?? Bisa gk di GML ?? ato biasanya pake 39dll?? Kalo misalkan bisa di GML tolong kasih tau gan:bingung: 
fazryy.fathonirahmat
fazryy.fathonirahmat
Newbie
Newbie

100%
Jumlah posting : 40
Points : 39
Join date : 09.04.13
Age : 25
Lokasi : Bandung , Jawabarat

Kembali Ke Atas Go down

Membuat Game Online Sederhana Dengan Game Maker 8.0 Empty Re: Membuat Game Online Sederhana Dengan Game Maker 8.0

Post by Asuna Sat 13 Jul 2013, 09:58

^
mplay_message_send(player,id,val)
mplay_message_receive(player)
Asuna
Asuna
Global Moderator
Global Moderator

100%
Jumlah posting : 1711
Points : 1901
Join date : 10.01.13

Kembali Ke Atas Go down

Membuat Game Online Sederhana Dengan Game Maker 8.0 Empty Re: Membuat Game Online Sederhana Dengan Game Maker 8.0

Post by Game Maker Newbie Sun 14 Jul 2013, 03:44

@Asuna: id, ama valnya Diisi Apa ??
Game Maker Newbie
Game Maker Newbie
GM Beginner
GM Beginner

100%
Jumlah posting : 278
Points : 281
Join date : 03.02.13
Age : 20
Lokasi : Sidoarjo

http://ydahlimu.blogspot.com

Kembali Ke Atas Go down

Membuat Game Online Sederhana Dengan Game Maker 8.0 Empty Re: Membuat Game Online Sederhana Dengan Game Maker 8.0

Post by Asuna Sun 14 Jul 2013, 10:06

^
mplay_message_send(player,id,val)
sends a message to the indicated player (either an identifier or a name; use 0 to send the message to all players). id is an integer message identifier and val is the value (either a real or a string). The message is sent in non-guaranteed mode. If val contains a string the maximal string length allowed is 30000 characters.

mplay_message_receive(player)
receives the next message from the message queue that came from the indicated player (either an identifier or a name). Use 0 for messages from any player. The routine returns whether there was indeed a new message.
dan jangan malas baca ya Razz
Asuna
Asuna
Global Moderator
Global Moderator

100%
Jumlah posting : 1711
Points : 1901
Join date : 10.01.13

Kembali Ke Atas Go down

Membuat Game Online Sederhana Dengan Game Maker 8.0 Empty Re: Membuat Game Online Sederhana Dengan Game Maker 8.0

Post by Sponsored content


Sponsored content


Kembali Ke Atas Go down

Kembali Ke Atas

- Similar topics

 
Permissions in this forum:
Anda tidak dapat menjawab topik