Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Extending Gosu / Dynamic Starburst/Lighting/Laser Effects
- By cmiller Date 2009-01-14 14:46
I recently had a chance to do some playing around with the additive drawing feature in gosu.  I just wanted to show off some of the results as I work on it:

http://i156.photobucket.com/albums/t29/cmiller7/Picture8.png
http://i156.photobucket.com/albums/t29/cmiller7/Picture20.png
http://i156.photobucket.com/albums/t29/cmiller7/Picture16.png
http://i156.photobucket.com/albums/t29/cmiller7/Picture6.png
http://i156.photobucket.com/albums/t29/cmiller7/Picture2-2.png
http://i156.photobucket.com/albums/t29/cmiller7/Picture3-1.png
http://i156.photobucket.com/albums/t29/cmiller7/Picture4-1.png

These are all generated and scintillate/morph in real time.  I'm planning to use it for special effects in a game I'm working on.
- By cmiller Date 2009-01-14 23:06
And a youtube video:
http://www.youtube.com/watch?v=BBJ_-MaPmB8
- By Wintermute Date 2009-01-15 12:27
Looks great! :)
- By Basic Date 2009-01-15 16:59
this might sound like a dumb question

what does :additive do for the drawing functions?
- By jlnr (dev) Date 2009-01-15 17:24
It adds the pixel values of the image to those on the screen (instead of interpolating between them), maxing out at (255, 255, 255). I.e. if you want to draw fire particles, you would use :additive and the more particles would overlap, the brighter the color of the particle cloud would look like.
- By cmiller Date 2009-01-15 23:57
Shawn42 extended the Tutorial.rb game with my starburst/effects class, it looks pretty nifty :D

http://img.skitch.com/20090115-xb5hck41b8iw3a57tt7uj7dddk.png
- By HybridMind Date 2009-01-16 18:30
nice!  those images and vid look sweet.  Any chance anyone here could post some code examples of how this is done?  I had no idea gosu could do something like this.  Are you using some special libs or rmagick?  Anything you'd want to share would be MOST appreciated!  ;)  Heck, just code is fine with me-- don't need a formal tutorial or anything.  Just thought I'd ask.  Great work either way.
- By cmiller Date 2009-01-16 19:12
I've shared the source with a few people on the IRC channel, but give me a little more time to spruce things up before I make any official releases.  To answer your question though, this was done simply with gosu, entirely using the draw_line method of the window class.
- By HybridMind Date 2009-01-16 19:17
Thanks for the reply and information, I totally understand! In the meantime, if anyone else following this thread has some tiny example code of anything related I'd love to see it.  I will likely mess around anyway but code always helps.  Cool that this can be done in Gosu- I can't wait to try out some 'additive' effects in my games now.
Up Topic Gosu / Extending Gosu / Dynamic Starburst/Lighting/Laser Effects

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill