-------- Original Message -------- Subject: Re: How to make GNU Guile more successful Local Time: 17 de febrero de 2017 9:18 PM UTC Time: 18 de febrero de 2017 2:18 From: thylak...@openmailbox.org To: sirgazil <lizag...@protonmail.com>
On 2017-02-17 5:04 pm, sirgazil wrote: >> sirgazil says: >> >>> When I started, my plan was to follow the course in Guile >> instead, >> >>> since the course is about the design method, and not the tools, >> but >> >>> I had to stop very early when I had to do some projects involving >> >>> graphics and animation. >> >>> >> >>> Personally, I don't feel the need for something like DrRacket, >> >>> but it would have been nice to be able to find a Guile "canvas" >> or a >> >>> 2D game library to play easily with basic graphics and >> animations. >> >> You might want to try these: >> >> https://dthompson.us/projects/chickadee.html >> >> https://dthompson.us/projects/sly.html > > Hi, Rodger. > > Yes, I know those. I tried Sly, but then realized it requires OpenGL, > which is broken in the system I use (nvidia seems incompatible with > free software). I haven't tried chickadee, but, if I remember > correctly, it has the same requirement. > > So I still need something that works without OpenGL, like Racket's > universe module or Pygame :) I'm not familiar with Racket's universe or Pygame, but I have a couple more suggestions that you might consider. There is Guile-Cairo if you just want a basic canvas. http://www.nongnu.org/guile-cairo/ See also: https://www.cairographics.org/ Maybe you can use Guile-SDL or Guile-SDL2, which is what Sly and Chickadee are built on, but like normal SDL, you can use it with or without OpenGL. And it will also provides more of the API needed for simple games. https://www.gnu.org/software/guile-sdl/ https://dthompson.us/projects/guile-sdl2.html See also: http://libsdl.org/ Well, I considered both when I started the course :) The problem is their level is not as high as I'd like. The course I'm following is for beginner programmers, so they use higher level libraries for drawing and animating. For example, you can write a checker pattern function like this: (define (checker-pattern color-a color-b) (above (beside (square 20 "solid" color-a) (square 20 "solid" color-b)) (beside (square 20 "solid" color-b) (square 20 "solid" color-a)))) The functions "above", "beside", and "square" come with a Racket's image library. Guile cairo's interface is lower level, it feels like reading the SVG specification, but without the geometric shapes. I think the situation with SDL is similar. Maybe when I finish the course I can start designing a very high level library using the existing guile-cairo and guile-sdl2 :)