O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Panduan platform game dengan Construct 2

770 visualizações

Publicada em

Panduan platform game dengan Construct 2

Publicada em: Educação
  • Entre para ver os comentários

  • Seja a primeira pessoa a gostar disto

Panduan platform game dengan Construct 2

  1. 1. Contruct 2.52 Platform Game Wahyu Purnomo – wahyupur.wordpress.com
  2. 2. New Project
  3. 3. Insert New Object - background • Object > tiled background, file background, rename = bg • Atur position dan size
  4. 4. Insert New Object – player & ground • Insert > Sprite > file player: alienGreen_walk, rename: player • Insert > Tiled Backgroud > file : grass, rename: platform • Atur sbg dasar, memanjang, dan sebagian ditengah melayang
  5. 5. Insert New Object – coin • Insert > Sprite > coinGold, beri nama “coin” • Copy > paste, atur menjadi sbb :
  6. 6. Atur Behaviors • Player > + > Platform • Ground > + > Solid • Player > Double jump > Enabled • Coba jalankan, klik Run
  7. 7. Set Collision Poligon : Player • Agar player betul2 di atas tanah, Klik 2 x player, edit • Set Collision Poligon > klik kanan > Set to bounding box
  8. 8. Mengatur Event – mengambil coin • Buat papan nilai : • Insert Object > Coin, kemudian Text diberi nama ui_coin dan txt_coin • Properties Text diubah : 0, Arial 20, color putih, Center • Buat Event • Klik kanan di event_sheet, pilih Add Global var, number nCoin=0
  9. 9. Mengatur Event – mengambil coin • Add Event • Add Event > Pilih Player > On collision with another object > pilih Coin • Add Action > System > Add to > nCoin , Value = 1 • Add Action > Text > Set Text to > nCoin • Add Action > Coin > Destroy • Coba Run
  10. 10. Event – membuat rintangan & nyawa • Buat papan nilai : • Insert Object > Heart, kemudian Text diberi nama ui_life dan txt_life • Properties Text diubah : 3, Arial 20, color putih, Center • Insert Obect > Spike, resize height 70 • Buat Event • Global number nLife=3 • Add Event, Substract 1 dari nLive (berkurang) • Dan add sub event, system, compare nLive=0, Reset
  11. 11. Membuat Layar & Papan Nilai mengikuti player • Buat camera: • Insert Object > sprite > rectangle beri warna merah • Add Behaviors > Scroll To • Add Event > system > every tict, Add Action > Camera > Set Position = player.X, 240 • Coba, layar harus ikut player • Setelah jalan, letakkan di atas papan nilai, edit delete warna • Add Behaviors pada • Ui_coint dan ui_life > Anchors • txt_coint dan txt_life > Anchors
  12. 12. Menambahkan Sound • Import Sound: • Ada 3 sound, yaitu ketika ambil coin, kena paku/spike, backsound • Klik kanan di Project > Sound, import : coin.wav, Lazer Fire 1, MattOglseby - 2 • Insert Object > Audio • Add Action > Audio pada event • Player -> coin > play > coin • Player -> spike > play > Lazer Fire • Add Event > System > On Start of layout • Add Action > Audio > play > MattOglesby
  13. 13. Animasi Sprite : player • Player terkesan saat jalan dan lompat berbeda • Akan ada 3 animasi: standing, walk, jumping • Klik 2 kali object sprite, akan tampil jendela Animations dan Animatins Frame • Di animations, rename default: standing • Klik kanan Add animations: walk dan jumping • Pada walk • Animation frame 0, open file walk1, Add frame: open file walk2 • Properties walk : lopp, kemudian di animations klik preview • Pada jumping • Frame 0, open file : jump
  14. 14. • Untuk membuat efek animasi pada player saat jalan dan lompat, maka setelah membuat animasi, perlu menambah event • Event On landed, on moved, on jump, on stopped, set : standing, walk, jumping Event untuk animasi player Sub-event Klik kanan invert supaya X Supaya jalan ke kiri wajah ke kiri Supaya jalan ke kanan wajah ke kanan lagi Insert object > keyboard

×