We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionGeneral Discussion,  Status › Processing for Games
Page Index Toggle Pages: 1
Processing for Games? (Read 6801 times)
Processing for Games?
Sep 29th, 2008, 12:32am
 
Is Processing suitable for the development of simple games? Maybe just basic games prototyping? I haven't seen much literature around on this. Any thoughts?
Re: Processing for Games?
Reply #1 - Sep 29th, 2008, 3:58am
 
A lot of people have created simple games using processing. It isn't a game library, but having the basic graphics loop and mouse/keyboard event capturing is a great start. You just need to start programming your own rules for how things behave within the loop and how they respond to user input.

Zach Gage and I made a version of space invaders last year using processing.
http://vimeo.com/912985
Re: Processing for Games?
Reply #2 - Sep 30th, 2008, 10:42am
 
hehe, thats cool Smiley
Re: Processing for Games?
Reply #3 - Sep 30th, 2008, 2:11pm
 
I've been comparing Processing against a couple of 2D gaming engines. I reimplemented the Gosu Ruby tutorial http://code.google.com/p/gosu/wiki/RubyTutorial using the Love engine http://love2d.org/ (in Lua ) and Processing.

It is more a demo than a game; you have a little spaceship that you drive around the screen and collide with stars.  The Love version has exploding stars using Love's particle system.  

I needed to implement a rotatable 2D sprite class http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Syntax;action=display;num=1222098638 to handle the spaceship and a refresh-rate smoothed animation class for the spinning stars.

Processing's sound libraries have sophisticated features like FFT analysis but don't handle looping background sounds very well.  Minim has a big audio pause between loops.  Ess causes draw() to stutter when you stop or pause a sound.  In the end, I used Ess and set the volume to zero to avoid the stutter.  I also had to play with the format of the sound files, Ess fails to load some combinations of codec/bitrate.

Processing stacks up pretty well.  Most of the coding was straight forward and any complaints I have are about Java, not Processing.  The sketch comes at just under 250 lines of code and runs nicely in the browser.  

I'd be happy to send you the sketch if you give me your email address in a private message.
Re: Processing for Games?
Reply #4 - Sep 30th, 2008, 2:13pm
 
BTW, you can find the Love version at http://love2d.org/forum/viewtopic.php?f=5&t=7&p=952&hilit=space+demo#p952.
Re: Processing for Games?
Reply #5 - Jun 7th, 2009, 12:41pm
 
Love is interesting, I think I had passed over it before because it hadn't yet gained an OSX version.

I started learning processing to try to get my feet wet in object oriented programming in the hopes of developing a 2d game. I'm finding that I'd really not like to reinvent the wheel for some of the stuff I need though- Sprite classes with collision gravity and some other basic physics, scrolling, the notion of a 'player'. And I'm wondering if there's a more game oriented environment out there for me that isn't just a 'game construction kit' that makes the same game over and over but with different graphics.

I'm not giving up my processing studies, but I might give Love a try if there's a user group already sharing those sorts of code bits.
Re: Processing for Games?
Reply #6 - Jun 9th, 2009, 11:39am
 
Wow. I couldn't even get Love to launch one of it's own examples on the Mac. Bad first experience. I guess I'll stick with processing.
Re: Processing for Games?
Reply #7 - Jun 23rd, 2009, 12:08am
 
cool !
Re: Processing for Games?
Reply #8 - Jun 25th, 2009, 1:00pm
 
Just came across this thread and I am also interested in games and have created a 2D sprite library that might suit weevil's needs. Although there is no gravity/physics it supports collision detection, image animation, velocity, acceleration, pixel level transparency...

In terms of OO it would be possible to inherit of the Sprite class to provide additional sprite functionality.

Might give you some ideas for a 2D game.  Smiley
http://www.lagers.org.uk/s4p/index.html
Re: Processing for Games?
Reply #9 - Jul 22nd, 2009, 6:31pm
 
Thank you, Quark!

That's awesome Smiley
Page Index Toggle Pages: 1