Per 2016, RMID pindah ke RMID Discord (Invite link dihapus untuk mencegah spambot -Theo @ 2019). Posting sudah tidak bisa dilakukan lagi.
Mohon maaf atas ketidaknyamanannya dan mohon kerjasamanya.

Share | 
 

 [VX]Minigame Susun Gambar

Topik sebelumnya Topik selanjutnya Go down 
Pilih halaman : 1, 2  Next
[VX]Minigame Susun Gambar Empty2011-04-09, 09:49
Post[VX]Minigame Susun Gambar
#1
hart 
Senior
Senior
avatar

Level 5
Posts : 805
Thanked : 38
Engine : Other
Skill : Very Beginner
Type : Developer

[VX]Minigame Susun Gambar Vide
Minigame Susun Gambar
Versi: Gaje
Tipe: Gaje


Pengenalan

Iseng aja.


Fitur


  • Bernostalgia pada masa kecil.



Screenshots

[VX]Minigame Susun Gambar Susung10


Demo

takada


Scripts

Code:

#===============================================================================
# * Minigame Susun Gambar
#-------------------------------------------------------------------------------
# Cara Pakai:
# - Copy script ini ke script editor, di atas Main
# - Panggil melalui event script:
#  $scene = Scene_SusunGambar.new(num_of_columns, num_of_rows, filename[, time])
#  num_of_columns = jumlah kolom yang diinginkan
#  num_of_rows    = jumlah baris yang diinginkan
#  filename      = nama file yang akan dijadikan gambar dari puzzle
#                    (file boleh berukuran bebas, tapi sebaiknya jangan melebihi
#                    544 x 416, karena kacau ntar XD. Dan file gambar harus
#                    disimpan di folder Graphics/Pictures)
#  time          = batas waktu dalam detik. Kosongkan bila tidak ingin
#                    memiliki waktu
# - Setelah permainan selesai, switch yang telah diset di bawah akan menjadi
#  ON bila menang, dan OFF bila kalah, kemudian variabel yg telah diset di bawah
#  akan berisi sisa waktu ketika menyelesaikan permainan.
#-------------------------------------------------------------------------------
# Term Of Use:
# - Terserah anda script ini mau diapain, dan tidak credit juga tidak apa-apa,
#  asalkan anda sopan dan menghargai sesama manusia
#-------------------------------------------------------------------------------
module SusunGambar
#-------------------------------------------------------------------------------
# RESULT_SWITCH_ID = ID switch untuk menyimpan hasil permainan
# REMAINING_TIME_ID = ID variabel untuk menyimpan sisa waktu ketika selesai
#-------------------------------------------------------------------------------
RESULT_SWITCH_ID = 1
REMAINING_TIME_ID = 1
#-------------------------------------------------------------------------------
# BLANK_COLOR = Warna kotak kosong
#-------------------------------------------------------------------------------
BLANK_COLOR1 = Color.new(255, 255, 255)
BLANK_COLOR2 = Color.new(0, 0, 0)
VERTICAL_GRADIENT = false
#-------------------------------------------------------------------------------
end
#===============================================================================

class Scene_SusunGambar < Scene_Base
  def initialize(num_of_columns, num_of_rows, filename, time = -1)
    @num_of_columns = num_of_columns
    @num_of_rows = num_of_rows
    @image = Cache.picture(filename)
    @image_pieces = []
    @num_of_cells = @num_of_columns * @num_of_rows
    @removed_cell = rand(@num_of_cells)
    @time = time
    @framecount = 0
    @timesprite = Sprite.new
    @timesprite.x = 0
    @timesprite.y = 0
    @timesprite.z = 50
    @timesprite.bitmap = Bitmap.new(544, 12)
    @timesprite.bitmap.font = Font.new("Arial", 12)
  end
 
  def start
    for i in 0 ... @num_of_cells
      @image_pieces[i] = Sprite_ImagePieces.new(i)
      @image_pieces[i].bitmap = Bitmap.new(@image.width / @num_of_columns,
                                              @image.height / @num_of_rows)
      @image_pieces[i].bitmap.blt(0, 0, @image,
                                  Rect.new((i % @num_of_columns) * @image.width / @num_of_columns,
                                  (i / @num_of_columns) * @image.height / @num_of_rows,
                                  @image.width / @num_of_columns,
                                  @image.height / @num_of_rows))
    end
   
   
    @image_pieces[@removed_cell].bitmap.gradient_fill_rect(0, 0,
      @image_pieces[@removed_cell].bitmap.width, @image_pieces[@removed_cell].bitmap.height,
      SusunGambar::BLANK_COLOR1, SusunGambar::BLANK_COLOR2, SusunGambar::VERTICAL_GRADIENT)
    @image_pieces[@removed_cell].removed = true
   
    randomize_position()
  end
 
  def randomize_position
    tmp = []
    for i in 0 ... @num_of_cells
      tmp.push(i)
    end
   
    for i in @image_pieces
      tmp2 = rand(tmp.size)
      i.pos = tmp[tmp2]
      tmp.delete_at(tmp2)
      tmp.sort!
    end
  end
 
  def terminate
    for i in @image_pieces
      i.dispose
    end
    @timesprite.dispose
  end
 
  def update
    @framecount += 1 if @time >= 0
    if @framecount >= 60
      @time -= 1 if @time > 0
      @framecount = 0
    end
    @timesprite.bitmap.clear
    @timesprite.bitmap.draw_text(0, 0, 544, 12, "Time: " + @time.to_s) if @time >= 0
    for i in @image_pieces
      i.x = (i.pos % @num_of_columns) * @image.width / @num_of_columns
      i.y = (i.pos / @num_of_columns) * @image.height / @num_of_rows
    end
   
    if Input.trigger?(Input::UP)
      if @image_pieces[@removed_cell].pos + @num_of_columns < @num_of_cells
        swap(@image_pieces[@removed_cell], get_piece_from_pos(@image_pieces[@removed_cell].pos + @num_of_columns))
      end
    elsif Input.trigger?(Input::DOWN)
      if @image_pieces[@removed_cell].pos - @num_of_columns >= 0
        swap(@image_pieces[@removed_cell], get_piece_from_pos(@image_pieces[@removed_cell].pos - @num_of_columns))
      end
    elsif Input.trigger?(Input::RIGHT)
      if @image_pieces[@removed_cell].pos % @num_of_columns != 0
        swap(@image_pieces[@removed_cell], get_piece_from_pos(@image_pieces[@removed_cell].pos - 1))
      end
    elsif Input.trigger?(Input::LEFT)
      if (@image_pieces[@removed_cell].pos + 1) % @num_of_columns != 0
        swap(@image_pieces[@removed_cell], get_piece_from_pos(@image_pieces[@removed_cell].pos + 1))
      end
    end
   
    if completed?
      $game_switches[SusunGambar::RESULT_SWITCH_ID] = true
      $game_variables[SusunGambar::REMAINING_TIME_ID] = @time
      $game_system.battle_end_me.play
      $scene = Scene_Map.new
    elsif @time == 0
      $game_switches[SusunGambar::RESULT_SWITCH_ID] = false
      $game_variables[SusunGambar::REMAINING_TIME_ID] = 0
      $scene = Scene_Map.new
    end
  end
 
  def swap(a, b)
    tmp = a.pos
    a.pos = b.pos
    b.pos = tmp
  end
 
  def completed?
    for i in @image_pieces
      return false if i.pos != i.right_pos
    end
     
    return true
  end
 
  def get_piece_from_pos(pos)
    for i in @image_pieces
      if i.pos == pos
        return i
      end
    end
  end
end

class Sprite_ImagePieces < Sprite
  attr_reader :right_pos
  attr_accessor :removed
  attr_accessor :pos
 
  def initialize(right_pos)
    super()
    @right_pos = right_pos
    @removed = false
    @pos = right_pos
  end
end


Credits

Tidak perlu credit bila tidak mau. Asalkan anda sopan dan menghargai sesama manusia
[VX]Minigame Susun Gambar Empty2011-04-09, 10:43
PostRe: [VX]Minigame Susun Gambar
#2
shikami 
Member 1000 Konsep
avatar

Level 5
Posts : 3744
Thanked : 31
Engine : Multi-Engine User
Skill : Beginner
Type : Developer
Awards:


[VX]Minigame Susun Gambar Vide
weh manteb ini :D mayanlah buat minigame kuis tebak wajah gtu :D
[VX]Minigame Susun Gambar Empty2011-04-09, 11:26
PostRe: [VX]Minigame Susun Gambar
#3
bungatepijalan 
Moe Princess
bungatepijalan

Level 5
Posts : 1487
Thanked : 30
Engine : Multi-Engine User
Skill : Intermediate
Type : Developer
Awards:
[VX]Minigame Susun Gambar Vide
Hehe.. meski minigamenya uda lazim, tp menarik juga nih :D
Kl bisa, coba dibikin unik, biar tambah menarik :D
[VX]Minigame Susun Gambar Empty2011-04-09, 11:27
PostRe: [VX]Minigame Susun Gambar
#4
Jihad Bagas 
Novice
Novice
Jihad Bagas

Level 5
Posts : 259
Thanked : 3
Engine : Multi-Engine User
Skill : Skilled
Type : Writer

[VX]Minigame Susun Gambar Vide
Waduh! Kamu bikin rgss2 susun gambar? Pasti ni maknyus!
[VX]Minigame Susun Gambar Empty2011-04-09, 13:22
PostRe: [VX]Minigame Susun Gambar
#5
richter_h 
Salto Master
Hancip RMID
richter_h

Kosong
Posts : 1705
Thanked : 30
Engine : Other
Skill : Skilled
Type : Developer
Awards:

[VX]Minigame Susun Gambar Vide
gambar ngga muncul... koneksi lemot gila :swt:

tapi bau-baunya udah maknyus nih... :hmm:
iseng-iseng berhadiah :hammer:
[VX]Minigame Susun Gambar Empty2011-04-09, 14:26
PostRe: [VX]Minigame Susun Gambar
#6
KID_VX 
Senior
Senior
KID_VX

Level 5
Posts : 959
Thanked : 24
Engine : Multi-Engine User
Skill : Very Beginner
Type : Developer

[VX]Minigame Susun Gambar Vide
Wah menarik nih :)
minigame yang cukup menarikperhatian :)
sederhana tapi cukup mengasykan :)

Di tunggu minigame selanjutnya :)
Enjoy 8)
[VX]Minigame Susun Gambar Empty2011-04-09, 17:32
PostRe: [VX]Minigame Susun Gambar
#7
vadis 
Novice
Novice
vadis

Level 5
Posts : 131
Thanked : 1
Engine : RMVX
Skill : Intermediate
Type : Writer

[VX]Minigame Susun Gambar Vide
sip sip sip simple dan enak, lumayan buat mainan ringan. kudownload yah.
kalau nanti saya masukkan mini-game ini dalam proyek game2ku, saya pasti akan memberi kredit buat kamu.
[VX]Minigame Susun Gambar Empty2011-05-22, 16:36
PostRe: [VX]Minigame Susun Gambar
#8
cradth+helverd 
Newbie
Newbie
cradth+helverd

Level 5
Posts : 83
Thanked : 0
Engine : RMVX
Skill : Intermediate
Type : Jack of All Trades

[VX]Minigame Susun Gambar Vide
Script udah di co-pas, image dah di taro di Graphics/Pictures, dg nama file "Pic1"
dah bikin Event > Script "$scene = Scene_SusunGambar.new(5, 5, Pic1[, 60])
tapi tetep error, "unitialized constant Game_Interpreter::Pic1"

salah dimana ya? w bikin new project pdhl, jd gak mungkin crash sama script lain.
pls help. thank you..^^
[VX]Minigame Susun Gambar Empty2011-05-22, 16:51
PostRe: [VX]Minigame Susun Gambar
#9
Yaden 
Legendary
Legendary
Yaden

Level 5
Posts : 2056
Thanked : 17
Engine : RMVX
Skill : Very Beginner
Type : Artist

[VX]Minigame Susun Gambar Vide
Minigame yang bikin nostalgia.. mantep2.. :thumbup:

jadi inget salah satu widget di Windows :hammer:
[VX]Minigame Susun Gambar Empty2011-05-22, 17:03
PostRe: [VX]Minigame Susun Gambar
Kuro Ethernite 
The Creator
Kuro Ethernite

Level 5
Posts : 1631
Thanked : 24
Engine : RMVX Ace
Skill : Masterful
Type : Jack of All Trades
Awards:

[VX]Minigame Susun Gambar Vide
@cradth+helverd
:swt: nama file ny musti di dalam kutip pas manggil nya :swt: itu kan string :swt:
right ??? :hmm:
It should look like this....
Code:
$scene = Scene_SusunGambar.new(5, 5, "Pic1"[, 60])
[VX]Minigame Susun Gambar Empty2011-05-22, 22:44
PostRe: [VX]Minigame Susun Gambar
Demon033 
Novice
Novice
Demon033

Level 4
Posts : 258
Thanked : 2
Engine : Other
Skill : Beginner
Type : Writer

[VX]Minigame Susun Gambar Vide
wah bagus jg nih.
nice inpoh!
lumayan buat event2 game ane kelak..
#klo jadi,, kekeke#
[VX]Minigame Susun Gambar Empty2011-05-23, 02:39
PostRe: [VX]Minigame Susun Gambar
cradth+helverd 
Newbie
Newbie
cradth+helverd

Level 5
Posts : 83
Thanked : 0
Engine : RMVX
Skill : Intermediate
Type : Jack of All Trades

[VX]Minigame Susun Gambar Vide
@kuro creator
ohiya itu string XD sering lost kalau soal script. :D
tpi udah di coba..$scene = Scene_SusunGambar.new(5, 5, "Pic1"[, 60]) skrg jadi syntax error.. ada yg udah pernah coba test script ini dn berhasil??? :jedug
[VX]Minigame Susun Gambar Empty2011-05-23, 06:51
PostRe: [VX]Minigame Susun Gambar
hart 
Senior
Senior
avatar

Level 5
Posts : 805
Thanked : 38
Engine : Other
Skill : Very Beginner
Type : Developer

[VX]Minigame Susun Gambar Vide
@atas: tanda [ dan ] dihilangkan donk.. =)) itu kan maksudnya opsional.. Dan ekstensi gambarnya perlu ditulis.. Jadi
Code:

$scene =
  Scene_SusunGambar.new(5, 5, "Pic1.png", 60)
Sori di scriptnya kurang jelas :kabur:
[VX]Minigame Susun Gambar Empty2011-05-23, 09:41
PostRe: [VX]Minigame Susun Gambar
LiTTleDRAgo 
Senior
Senior
LiTTleDRAgo

Level 5
Posts : 712
Thanked : 27
Engine : RMXP
Skill : Skilled
Type : Scripter
Awards:
[VX]Minigame Susun Gambar Vide
wah skrip keren nih O.o
bisa dipake di XP ga kk? :?
[VX]Minigame Susun Gambar Empty2011-05-23, 10:31
PostRe: [VX]Minigame Susun Gambar
fredy 
Senior
Senior
fredy

Level 5
Posts : 612
Thanked : 4
Engine : RMVX

[VX]Minigame Susun Gambar Vide
Nice Script bagus buat mini game
Kalau dai kode nya ini gak harus sama kan
maksudnya kita bisa bikin ukuran 8 * 10 kan?
[VX]Minigame Susun Gambar Empty2011-05-23, 13:37
PostRe: [VX]Minigame Susun Gambar
hart 
Senior
Senior
avatar

Level 5
Posts : 805
Thanked : 38
Engine : Other
Skill : Very Beginner
Type : Developer

[VX]Minigame Susun Gambar Vide
@om drago: gk tau, coba aja, mana tau bisa :hammer:
@om fredy: iya.
[VX]Minigame Susun Gambar Empty2011-05-23, 15:52
PostRe: [VX]Minigame Susun Gambar
hyperkudit 
Pahlawan Super
hyperkudit

Level 5
Posts : 2288
Thanked : 30
Engine : RMXP
Skill : Very Beginner
Type : Artist
Awards:

[VX]Minigame Susun Gambar Vide
@hart : bikin versi yg xp donk..
Soalnya yg ini vx bukan xp...
Dan saya pake xp bukan vx..
[VX]Minigame Susun Gambar Empty2011-05-23, 20:08
PostRe: [VX]Minigame Susun Gambar
r15n4d1 
Veteran
Veteran
r15n4d1

Level 4
Posts : 1048
Thanked : 4
Engine : RM2k3
Skill : Skilled
Type : Event Designer

[VX]Minigame Susun Gambar Vide
aduhh... inet lemot, :jedug
gambar lama bgt keluar...

serasa main game hp puzzle
di nexian :hammer:
kerenlah... :thumbup:
kenapa saya bilang keren? karena saya gak bisa bikin :hammer:
[VX]Minigame Susun Gambar Empty2011-05-23, 20:22
PostRe: [VX]Minigame Susun Gambar
FUAD 
Advance
Advance
FUAD

Level 5
Posts : 358
Thanked : 3
Engine : Multi-Engine User
Skill : Beginner
Type : Artist

[VX]Minigame Susun Gambar Vide
mini game ya....daku pernah mainin ni game bukan gambar tapi angka... :swt: dan seru maininya tapi kalo ga' sesuai urutan kebanting tuh papan :D..semakin banyak jumlah kotak semakin tinggi tingkat kesulitan..(CMIIMW) :swt: ... klo g' salah di Resident Evil juga ada puzzle macem kayak gini anyway script yg bagus :thumbup: ...


well done and good luck buat @ Hurt Hart yg cuantik :P
[VX]Minigame Susun Gambar Empty2011-05-23, 20:43
PostRe: [VX]Minigame Susun Gambar
Kabutopsu 
Advance
Advance
Kabutopsu

Level 5
Posts : 348
Thanked : 3
Engine : Multi-Engine User
Skill : Skilled
Type : Event Designer

[VX]Minigame Susun Gambar Vide
Waw lumayan keren sih gan aku bisa bikin tapi pake event :hammer: ini gambar awalnya ditunjukin dulu gak? itu juga penting kan
[VX]Minigame Susun Gambar Empty2011-05-24, 18:45
PostRe: [VX]Minigame Susun Gambar
LiTTleDRAgo 
Senior
Senior
LiTTleDRAgo

Level 5
Posts : 712
Thanked : 27
Engine : RMXP
Skill : Skilled
Type : Scripter
Awards:
[VX]Minigame Susun Gambar Vide
hart wrote:
@om drago: gk tau, coba aja, mana tau bisa :hammer:
@om fredy: iya.

ah, gw uda bikin versi xp nya ^^
kalo ga salah sih cross engine juga XD
[VX]Minigame Susun Gambar Empty2011-05-24, 23:39
PostRe: [VX]Minigame Susun Gambar
cradth+helverd 
Newbie
Newbie
cradth+helverd

Level 5
Posts : 83
Thanked : 0
Engine : RMVX
Skill : Intermediate
Type : Jack of All Trades

[VX]Minigame Susun Gambar Vide
@hart : X_X buta soal script XD thx,akhirnya bs juga..^^
[VX]Minigame Susun Gambar Empty2011-05-25, 09:38
PostRe: [VX]Minigame Susun Gambar
hart 
Senior
Senior
avatar

Level 5
Posts : 805
Thanked : 38
Engine : Other
Skill : Very Beginner
Type : Developer

[VX]Minigame Susun Gambar Vide
Quote :
@hart : bikin versi yg xp donk..
Soalnya yg ini vx bukan xp...
Dan saya pake xp bukan vx..
dan saya pake VX bukan XP, dan saya tidak punya RMXP :(
BTW udah dicoba di RMXP beneran gk bisa jalan? :(
tuh om drago udah bikin XPnya, tinggal minta aja :(

@mbak risna dan om fuad: makasih :(

Quote :
aku bisa bikin tapi pake event
ngg.. emangnya di event ada command untuk memotong gambar? :( Jangan - jangan anda potong gambarnya di Photoshop trus anda masukin semua potongan2annya ke game lalu tinggal main show picture? Kalau begitu, size game anda ntar bengkak gan... :(

Quote :
ini gambar awalnya ditunjukin dulu gak? itu juga penting kan
tidak :(

Quote :
ah, gw uda bikin versi xp nya ^^
oh begitu :(

Quote :
kalo ga salah sih cross engine juga XD
what is cross engine again? :(

@om cradth: sama2 :(
[VX]Minigame Susun Gambar Empty2011-05-27, 09:25
PostRe: [VX]Minigame Susun Gambar
LiTTleDRAgo 
Senior
Senior
LiTTleDRAgo

Level 5
Posts : 712
Thanked : 27
Engine : RMXP
Skill : Skilled
Type : Scripter
Awards:
[VX]Minigame Susun Gambar Vide
hart wrote:

what is cross engine again? :(

VX bisa XP pun bisa :D
[VX]Minigame Susun Gambar Empty2011-06-06, 07:37
PostRe: [VX]Minigame Susun Gambar
frame12 
Newbie
Newbie
frame12

Level 5
Posts : 12
Thanked : 0
Engine : RMVX
Skill : Beginner
Type : Event Designer

[VX]Minigame Susun Gambar Vide
maksud nya gmn neh?? contohin,,, aku mash pemulah neh... pleaasseee
:( :(
[VX]Minigame Susun Gambar Empty
PostRe: [VX]Minigame Susun Gambar
Sponsored content 




[VX]Minigame Susun Gambar Vide
 

[VX]Minigame Susun Gambar

Topik sebelumnya Topik selanjutnya Kembali Ke Atas 

Similar topics

+
Halaman 1 dari 2Pilih halaman : 1, 2  Next

Permissions in this forum:Anda tidak dapat menjawab topik
RPGMakerID :: Scripts & Event Systems :: RMVX Scripts-