When I want to bit fiddle and have the result be an image, I normally
use netpbm.

Now cairo also supports drawing to a surface and then saving that
surface as a jpg/png file -- however I don't know if shoes gives you
access to that api or not. And I couldn't find a ruby binding for
netpbm just now (horrors!)

Rmagick maybe? ;)

On Jan 26, 2008 3:51 AM, Marnix Kok <[EMAIL PROTECTED]> wrote:
> Hey guys,
>
> I have implemented a very basic "move ship around screen" thing myself.
> As a demonstration of what Shoes could do for me. You can find it here:
>
> http://nedlinux.nl/~marnix/shoes/test.rb
>
> And a screenshot here: http://home.nedlinux.nl/~marnix/shoes1.jpg
>
> As you can see, I am not a pixel artist by profession.
>
> I was thinking about implementing some "array to image" functionality,
> but before I do this perhaps it is wise to ask here if it has already
> been implemented. You see, I've been implementing some simple heightmap
> algorithm for terrain generation. To display the result I have created a
> screen with 128 x 128 rectangles. When the screen is cleared, it takes
> forever until it segfaults. As a solution I was thinking to put the
> heightmap results (a 2d array) in an image, which would result in only
> one object needing removal.
>
> Are there perhaps better ways to go around drawing many objects?
>
> Cheers,
>
> Marnix
>
> p.s.: preliminary screenshot of application here:
> http://home.nedlinux.nl/~marnix/shoes2.jpg
>
>
>
> On Fri, 2008-01-25 at 19:56 -0500, Tieg Zaharia wrote:
> > I was thinking of that myself! I wish I had the time to do it though.
> > Have you guys seen that 3d shooter (I don't think you shoot anything
> > though) that someone wrote with SVG and javascript? You could probably
> > model it off that if you don't know where to start.
> >
> >
> > -tieg
> >
> > On Jan 25, 2008 6:39 PM, Jesse Thompson <[EMAIL PROTECTED]> wrote:
> >         Hmm everything you describe here sounds striaghtforward;
> >         following the
> >         mouse and rotating the sprite for example (I had some very
> >         promising
> >         results in the rotating things department! yay ;)
> >
> >         but when you fire a bullet, the bullet "hitting" the object
> >         might be
> >         challenging for non-rectangular targets without my hit
> >         detection
> >         suggestion available.
> >
> >         As an implementational suggestion: Somewhere shoes is testing
> >         the
> >         point under the mouse for hit detection while testing for
> >         clicks, and
> >         hover over and the like right? Perhaps exposing part of that
> >         interface
> >         to the ruby code would do the job; such that you pass in the
> >         x/y you
> >         want to test, and internally what gets passed in is the
> >         mouse's x/y.
> >         :)   Just a guess based on how the code *might* already be
> >         implemented! ;)
> >
> >         Thx!
> >
> >         - - Jesse
> >
> >
> >         On Jan 25, 2008 2:30 PM, Timothy McDowell
> >         <[EMAIL PROTECTED]> wrote:
> >         > My definition of 'gellin' would be for shoes to be able to
> >         create a
> >         > simple, 360 degree 2d shooter! How would shoes handle this
> >         and any
> >         > tips on how I'd go about it?
> >         >
> >         > More of an example: Player moves mouse around (cursor object
> >         follows
> >         > it, like a crosshair) and the 2d image/sprite rotates to
> >         face the
> >         > mouse.
> >         >
> >         > --
> >         > --TIMOTHY
> >         >
> >
> >
>
>

Reply via email to