Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Showcase / a neat melting effect
- By banister Date 2009-08-17 15:01 Edited 2009-08-17 15:03
using Gosu and TexPlay to create a nice melting effect for images:

Melting a rose
Melting a sab

Here's the code:
(only works with most recent version of TexPlay, 0.1.9+)

require 'gosu'
require 'texplay'

class W < Gosu::Window
    def initialize
        super(1024, 769, false, 20)
        @img = Gosu::Image.new(self, "maria.png")     
    end
   
    def draw 
        x = @img.width * rand   
        y = (@img.height/2+ 100) * rand   
        @img.splice @img, x, y + 1, :crop => [x, y, x + 200, y + 200]
        @img.draw 100, 50,1
    end   
end

w = W.new
w.show
- By Maverick Date 2009-08-18 00:02
NICE <- in all caps! That's a double plus!
- By jblovloss Date 2009-08-18 02:13
Very nice. Although it was sad watching the pretty girl melt. :D
- By banister Date 2009-08-18 02:51
hehe yes, that's why i selected a sad song... :)
- By ippa Date 2009-08-20 14:31
great work banister... so, when that's crossplatform gem comming? :)
- By lobo_tuerto Date 2009-08-20 14:56
Ahh it looks great!

Yeah, when do we have that gem coming? :)
- By banister Date 2009-08-20 16:28
hopefully within a week at most. I just have to bring some semblance of order to the source and write the polygon filler then im done. :)
- By banister Date 2009-08-20 16:38
on another note...isn't it extremely sad about _why? :(
- By disciplex Date 2009-08-20 20:03
Yeh, wander what happened? I know the whole identity thing, but surely that wasn't the cause? Hacked possibly?
- By lobo_tuerto Date 2009-08-21 00:40
Yeah it is sad. :(

I really liked that guy, he was truly the "mad scientist" type I'm very fond of.
Hope he is back one way or another...
Up Topic Gosu / Gosu Showcase / a neat melting effect

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill