Cara Membuat Game di Vb.net
Cara Membuat Game di Vb.net 2010 / 2008 - Sebenernya ini bukan disebut membuat game sih, tapi meng-add game yang telah ada, yaitu game flash. :D Tapi lumayan loh, buat kita belajar dan menambah wawasan. Kita bisa bermain game flash tanpa harus membuka link-link atau site yang bertaburan game flash, cukup disini kita meng-add game flash dalam project kita. Bagaimana caranya, ok langsung aja.
Berikut cara membuat Game di Vb.net 2010 / 2008
Bahan-bahan :
1 AxShockwaveFlash beri nama ShockwaveFlash
1 GroupBox
1 ComboBox
1 Button
1 Label
Langkah-langkahnya :
- Buka Microsoft Visual Studio 2008 / 2010
- Buat New Project lalu pilih Windows Form Applikasi
- Beri nama suka-suka kalian
- Setelah keluar 1 Form di project kita
- Add bahan-bahan component di toolbox seperti diatas
- Dan atur posisi suka-suka sobat kalau saya seperti gambar diatas
- Add Module dengan cara pilih Project -> Add Module -> Pilih Module beri nama "SetPlay.vb", Pastekan code berikut :
Public Class SetPlay
Public Enum Gamers As Integer
Raiden_X
Exofusion
Strikes_1945
Planetary_Wars
Prince_of_Persia
Americas_Army
End Enum
Public Sub SetPlayGame(ByVal Game As String, ByVal selectedGame As Gamers)
Dim RaidenX As String = "http://www.crazymonkeygames.com/Yt6Rfd/raidenx.swf"
Dim Exofusion As String = "http://www.crazymonkeygames.com/Yt6Rfd/exofusion2.swf"
Dim Strikes_1945 As String = "http://media.y8.com/games/content/strikers-1945-flash.swf"
Dim PlanetaryWars As String = "http://www8.agame.com/mirror/flash/p/PlanetaryWars/PlanetaryWarsGames_co_id.swf"
Dim PrinceofPersia As String = "http://www8.agame.com/mirror/flash/p/pop.swf"
Dim AmericasArmy As String = "http://www8.agame.com/mirror/flash/a/americasarmy.swf"
Select Case selectedGame
Case Gamers.Raiden_X 'game 1
Form1.ShockwaveFlash.Movie = RaidenX
Form1.Text = "Raiden-X | Flash Games"
Form1.GroupBox1.Text = "Sedang dimainkan Raiden-X"
Case Gamers.Exofusion 'game 2
Form1.ShockwaveFlash.Movie = Exofusion
Form1.Text = "Exofusion | Flash Games"
Form1.GroupBox1.Text = "Sedang dimainkan Exofusion"
Case Gamers.Strikes_1945 'game 3
Form1.ShockwaveFlash.Movie = Strikes_1945
Form1.Text = "Strikers 1945 | Flash Games"
Form1.GroupBox1.Text = "Sedang dimainkan Strikers 1945"
Case Gamers.Planetary_Wars 'game 4
Form1.ShockwaveFlash.Movie = PlanetaryWars
Form1.Text = "PlanetaryWars | Flash Games"
Form1.GroupBox1.Text = "Sedang dimainkan PlanetaryWars"
Case Gamers.Prince_of_Persia 'game 5
Form1.ShockwaveFlash.Movie = PrinceofPersia
Form1.Text = "Prince of Persia Clasic | Flash Games"
Form1.GroupBox1.Text = "Sedang dimainkan Prince of Persia Clasic"
Case Gamers.Americas_Army 'game 6
Form1.ShockwaveFlash.Movie = AmericasArmy
Form1.Text = "America's Army | Flash Games"
Form1.GroupBox1.Text = "Sedang dimainkan America's Army"
End Select
End Sub
End Class
- Kembali ke Form1, Klik kanan pada form project, lalu pilih "View code", lalu pastekan kode berikut :
Dim Nama_Gem As String
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ComboBox1.DataSource = System.Enum.GetNames(GetType(SetPlay.Gamers))
End Sub
- Lalu kembali ke Form1 project, klik dua kali pada Button1, dan pastekan code berikut :
Dim Gem As SetPlay = New SetPlay()
Gem.SetPlayGame(Nama_Gem, CType(System.Enum.Parse(GetType(SetPlay.Gamers), ComboBox1.Text), SetPlay.Gamers))
- Lalu save dan build atau play debuger.
- Dan kita coba Play.
Bagaimana sobat, udah pahamkan..?
Cukup mudah bukan sob, sekarang silahkan kreasikan suka-suka kalian.
Berikut Link / URL Flash Game : silahkan di coba ya gan ....!!!
- Junggle06 : http://www.GamesForWork.com/games/swf/jungle06.swf
- Start Drive : http://www8.agame.com/mirror/flash/m/motorradrennen2.swf
- Pacman : http://www.crazymonkeygames.com/Yt6Rfd/Pacman.swf
- MotoMadness : http://www8.agame.com/mirror/flash/m/MotoMadness/MotoMadness_games.co.id.swf
- Puzzle Boubble : http://files.agame.com/mirror/flash/p/puzzle_bobble.swf
- Dream Pet Link : http://files.agame.com/mirror/flash/p/puzzle_bobble.swf
- Wolverine Mrd Esc : http://www8.agame.com/mirror/flash/w/wolverine_mrd_escape.swf
- Poker Games : http://www8.agame.com/mirror/flash/g/governorofpoker/games.co.id/GOP.swf
- Shuriken Assault : http://www.flashninjaclan.com/games2/shurikenassault/assault.swf
- King of Fighters 98 : http://www8.agame.com/mirror/flash/k/king_of_fighters_wing.swf
Selamat mencoba, semoga bermanfaat.
Gem Kaga jelas Dari mana sih? Gak bisa tau!
BalasHapusjadi ini sebenernya game flash tapi di jalanin di vb ya
BalasHapus