Gotris - A classic tetris game written in Go

391 views
Skip to first unread message

nsf

unread,
Jun 21, 2010, 3:06:36 PM6/21/10
to golan...@googlegroups.com
Link:
http://github.com/nsf/gotris

Deps:
Go-SDL, Go-OpenGL and my opengl_util package (is in the repo).

Notes:

1. Make sure you have 'master' branch of Go-SDL. Gotris uses one
function that isn't available in 'release' branch. It is safe to remove
that function usage from gotris.go and compile gotris with 'release'
Go-SDL branch. But it is better to use 'master' branch. This function
turns vsync mode on.

2. Unfortunately many of you will not be able to build Go-SDL and
Go-OpenGL. Because a lot of people keep telling me that they have
error messages while building these libraries. The best thing to do is
figure out the problem and contact the author (keep in mind - every
developer like patches, they are telling much more than a bug itself
obviously).

3. You can use one of those variants:
WASD, IJKL, Arrows. Additionally a space bar drops a figure too.

4. It will be good to hear if you've actually succeeded in compiling
and running this game. Because I hear mostly problem reports with
compilation.

5. A flag (-level) available to specify initial level (affects speed).
Levels varies in range 1..9, the last one is pretty playable.

6. Tetris draws everything using glBegin/glEnd calls. So, there are a
lot of cgo calls. Probably can be used to see how a big amount of cgo
calls works in an application.

Joseph Poirier

unread,
Jun 21, 2010, 4:42:25 PM6/21/10
to nsf, golan...@googlegroups.com
On Mon, Jun 21, 2010 at 2:06 PM, nsf <no.smi...@gmail.com> wrote:

2. Unfortunately many of you will not be able to build Go-SDL and
Go-OpenGL. Because a lot of people keep telling me that they have
error messages while building these libraries. The best thing to do is
figure out the problem and contact the author (keep in mind - every
developer like patches, they are telling much more than a bug itself
obviously).


Some notes (below) I took-they may be incomplete-for getting Go-SDL and Go-OpenGL compiled (this past April) on OS X.
I can pass along the make files I changed, or the package folders, if anyone's interested.

-joe

- had to download and build GLEW.
- the GLEW make file couldn't figure out the platform so I set SYSTEM=darwin in the top level make file
- run "make" then "sudo make install"
- now build Go-OpenGL

misc:
- smpeg was the incorrect architecture
- download smpeg
- open the xcode project and build the release version for 64-bit platform
- put the framework build, smpeg.framework, in /Library/Frameworks

building Go-SDL:
- had to install the latest SDL, SDL_image, SDL_ttf, and SDL_mixer images to /Library/Frameworks folder
- Changed the header file for SDL_image, SDL_ttf, and SDL_mixer so the SDL included headers are prefixed with "SDL/"
- in the GO-SDL files set the proper include path for SDL_image, SDL_ttf, and SDL_mixer, e.g. in ttf.go set 
     #include <SDL_ttf/SDL_ttf.h>

- change the make files so they use the frameworks on darwin  
Reply all
Reply to author
Forward
0 new messages