Friday, 7 September 2012


what is web conferencing rapid opiate detox stock spread trading debt settlement strategy colocation servers NB shoes liquor liability carpet cleaning specials amex merchant motorcycle accident Residential Alarm System new york attorney laser printers security system canada basic hosting attendance system renaissance vinoy ameriquest loans pc intrusion detection voip pbx system marketing mortgage program drug recall best interest rates on savings www t mobile co uk international travel health insurance technical schools in new jersey mortgage applications web content management project management solutions equafax berber carpet cleaning medical malpractice new haven canadian secured credit card home equity conversion mortgage kansas lasik talent management systems incorporate in new york low cost call customer relationship secretarial schools Revitalizing Toner lsat preparation banner insurance life consolidation debt loan payday banner life insurance multifunction laser printers payroll processing secured credit canada debt settlement uk mortgage best mortgage loans Adult Hosting project management degrees business telephone service Cheap Domain Host prospecting leads domain registers aa personal loans interior design courses online lifeforce international Bankruptcy Lawyers parkway insurance online interior design courses Card Credit Debt reseller business financial times magazine medical quotes Consumer Credit cheap web hosting services hosting in uk network security systems filterless air purifiers chase mortgage rates self directed iras flowers to russia dentist santa clara de markoff santa clara dentist manslaughter defense tampa mortgage company loans for poor credit spysweeper software personnel Investment Fraud personnel software easy project management investing in mutual funds houston landscape lighting personalized creations voip handset offshore banking accounts Plastic Carrying Cases starting a llc immediate annuity united debt solutions Bachelor Degree broadband austads golf residential addiction treatment minolta color laser printers Blue Blue Cross Insurance Shield culinary arts education classes pharmacy technician new jersey web hosting uk mailing lists project management software for mac auto insurance claim business to business sales lead online conference defensive driving houston texas seraphim angels notary test mortgage approval marketing search engine san diego home mortgage uk business savings line business phone business phone line web design and hosting search engine optimization service mbna credit card application montana debt consolidation bad credit mobile home loan kentucky mortgage loans sales lead database crm system wisconsin mortgage credit card for students cheap one way tickets advertising click pay per site The Lasik Center reuge music box santa monica executive suites sony vaio desktop computers substance abuse rehab what are current mortgage rates investing in stock market get your credit score cd duplication cheap my debt Domain Name Check management software web online fax fax online Cardservice International Charter Corporate Jet dental radiology equity business loans Mortgage Lead florida home financing home financing florida lead mortgage Fax Services fleet management gps portfolio project management software saturn auto frisco home frisco home person to person auto loans credit matters reverse equity alaska credit card what is whole life insurance pay per click advertising highest ira cd rates qwest long distance ohio criminal defense lawyer invoice processing web hosting uk Cheap Insurance northern tools and equipment credit card to apply anritsu test equipment employee attendance software Accredited Online Degree Programs ntfs data recovery personal injury insurance settlements cheapest web conferencing Counseling Credit low cost domain Credit Counseling loan Domain Name Lookup Credit Reports direct mail list Christian Debt Free medical alarm advertising affiliate marketing program teachers home loans stock trading firms loans auto search engine optimization web marketing auto loans mortgage new york debt and credit Credit and Debt types life insurance success factors domain name optin email marketing

Tips Membuat Game Sederhana Dengan C++

Tips Membuat Game Sederhana Dengan C++. Salam Bloggers. Sekarang saya akan sedikit berbagi tentang Tips Membuat Game Sederhana Dengan C++. Game sepertinya kata yang sangat sederhana ditelinga Bloggers semua, bahkan mungkin dalam sehari pasti ada waktu dimana kita memainkan game kesayangan kita. Bagai hidup kurang gairah jika belum bermain game, itu menurut saya. Sekarang mari kita coba iseng untuk sedikit membuat game sederhana dengan salah satu bahasa pemrograman yaitu C++. Bukan hal yang sulit kok. sebelumnya mungkin silahkan sediakan cemilan dan kudapan plus rokok jangan lupa.

Seperti judul yang saya buat saya akan mengenalkan bahasa pemrograman C++ yang dapat membuat game sederhana, dari sinilah game-game saat ini muncul yaitu mulai dari bahasa sederhana yang digunakan hingga sekompleks saat ini.

marilah kita belajar cara pembuatan game bagian 1 ini, yang pertama kita lakukan adalah men-download compiler C++ saya sarankan borland C++ agar dapat dengan mudah mengikuti tutorial ini lalu install pada komputer anda.
Pada bagian 1 ini saya akan memberitahu bagaimana game sederhana layaknya pencocokan gambar yang sama dengan menebak gambar pada posisi tertutup yang saya beri judul Permainan Tebak Angka

    bukalah borland C++ yang telah anda download
    pilih menu file->New->edit text untuk membuka halaman
    masukkan kode berikut

    #include <stdio.h>
    #include <conio.h>

    void check(int b[4][4],int a[4][4]);

    void inisial();

    void tampil(int b[4][4]);

    void play(int b[4][4],int a[4][4]);

    void check(int b[4][4],int a[4][4]);

    /*=============FUNGSI UTAMA================*/
    void main(){
    inisial(); //pemanggilan fungsi inisial
    getch();
    }

    /*=============FUNGSI INISIALISASI ARRAY a DAN b================*/
    void inisial(){
    int a[4][4]={{1,1,2,2},{3,3,4,4},{5,5,6,6},{7,7,8,8}};
    int b[4][4]={{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}};
    play(b,a);//pemanggilan fungsi play dengan parameter array a dan b
    }

    /*=============FUNGSI TAMPILAN PERMAINAN================*/
    void tampil(int b[4][4]){
 printf("==========================================================================\n\n");
    printf("\t\t\tPermainan Tebak Angka\n");
 printf("==========================================================================\n\n");
    printf("*********************************\n*\t*\t*\t*\t*\n");
    printf("* %d * %d * %d * %d *\n*\t*\t*\t*\t*\n",b[0][0],b[0][1],b[0][2],b[0][3]);
    printf("*********************************\n*\t*\t*\t*\t*\n");
    printf("* %d * %d * %d * %d *\n*\t*\t*\t*\t*\n",b[1][0],b[1][1],b[1][2],b[1][3]);
    printf("*********************************\n*\t*\t*\t*\t*\n");
    printf("* %d * %d * %d * %d *\n*\t*\t*\t*\t*\n",b[2][0],b[2][1],b[2][2],b[2][3]);
    printf("*********************************\n*\t*\t*\t*\t*\n");
    printf("* %d * %d * %d * %d *\n*\t*\t*\t*\t*\n",b[3][0],b[3][1],b[3][2],b[3][3]);
    printf("*********************************\n");
    }

    /*=============FUNGSI PERMAINAN DIMULAI================*/
    void play(int b[4][4],int a[4][4]){
    int kolom1,baris1,kolom2,baris2;
    clrscr();
    tampil(b);//pemanggilan fungsi tampil dengan parameter array b
    printf("Masukkan baris dan kolom, Tebak Angka 1\n");
    printf("baris : ");
    scanf("%d",&baris1);
    printf("kolom : ");
    scanf("%d",&kolom1);
    b[baris1-1][kolom1-1]=a[baris1-1][kolom1-1];
    tampil(b);
    clrscr();
    tampil(b);
    printf("Masukkan baris dan kolom, Tebak Angka 2\n");
    printf("baris : ");
    scanf("%d",&baris2);
    printf("kolom : ");
    scanf("%d",&kolom2);
    b[baris2-1][kolom2-1]=a[baris2-1][kolom2-1];
    if(b[baris1-1][kolom1-1]==b[baris2-1][kolom2-1]){
    clrscr();
    tampil(b);
    }else{b[baris2-1][kolom2-1]=0;
    b[baris1-1][kolom1-1]=0;
    clrscr();
    tampil(b);
    }
    check(b,a);//pemanggilan fungsi check
    }

    /*=============FUNGSI PROSES PENGECEKKAN================*/
    void check(int b[4][4],int a[4][4]){
 if((b[0][0]==a[0][0])&&(b[0][1]==a[0][1])&&( b[0][2]==a[0][2])&&(b[0][3]==a[0][3])&&(b[1 ][0]==a[1][0])&&(b[1][1]==a[1][1])&&(b[1][2 ]==a[1][2])&&(b[1][3]==a[1][3])&&(b[2][0]== a[2][0])&&(b[2][1]==a[2][1])&&(b[2][2]==a[2 ][2])&&(b[2][3]==a[2][3])&&(b[3][0]==a[3][0 ])&&(b[3][1]==a[3][1])&&(b[3][2]==a[3][2])&&(b[3][3]==a[3][3]))
    {
    printf("SELAMAT ANDA MENANG!!!\n\n");

    printf("Ingin mencoba lagi tekan y");

    if(getch()=='y'||getch()=='Y')inisial();//kembali memberikan nilai nol pada array b
    else getch();//keluar
    }
    else play(b,a);
    }

    Setelah menulis kode diatas pilih menu project->compile
    Setelah itu pilih menu script->run
    mainkan program tersebut dengan memasukkan baris dan kolom untuk mencari angka yang sama jika salah memilih angka kedua maka angka pertama ikut berubah menjadi 0 kembali


1 comments: