[racket] W: A Game Written in Racket

1,646 views
Skip to first unread message

Thom Chiovoloni

unread,
Dec 20, 2011, 5:39:04 PM12/20/11
to us...@racket-lang.org
Hello Racket users!

As some of you might know, last weekend was Ludum Dare, a game development competition where the members attempt to write a game in either 48 or 72 hours (depending on the competition they are entering).

I entered the 72 hour competition, and wrote my entry in Racket.  I chose Racket for this because while it's not one of the traditional game development languages, it is a powerful language with a full-featured and robust gui toolkit, and also because development time of Racket code is very low (assuming I already know the contents of the documentation).

Enough about that! 

The game is named W, and is a puzzle/adventure type game.  It is quite short as of right now (only 5 rooms, a symptom of the design, code, art, and sound effects being created in 72 hours), but with any luck I will continue updating it this winter.

You can find the game and source on its entry page here (includes screenshots), or on its GitHub page here. (note that those two links do not point to identical versions of the game, the GitHub page is still in active development, the submitted version is available as the ldjam branch).

Anyway, I just thought some of you might think this was cool, so I hope you take a look!

-Thom (also known as yoklov, on the IRC channel)

Vincent St-Amour

unread,
Dec 20, 2011, 6:16:58 PM12/20/11
to Thom Chiovoloni, us...@racket-lang.org
Neat!

I can't figure out the fourth level, though. :)

Vincent


At Tue, 20 Dec 2011 17:39:04 -0500,
Thom Chiovoloni wrote:
>
> [1 <multipart/alternative (7bit)>]
> [1.1 <text/plain; ISO-8859-1 (7bit)>]


> Hello Racket users!
>
> As some of you might know, last weekend was Ludum

> Dare<http://www.ludumdare.com/compo/>,


> a game development competition where the members attempt to write a game in
> either 48 or 72 hours (depending on the competition they are entering).
>
> I entered the 72 hour competition, and wrote my entry in Racket. I chose
> Racket for this because while it's not one of the traditional game
> development languages, it is a powerful language with a full-featured and
> robust gui toolkit, and also because development time of Racket code is
> very low (assuming I already know the contents of the documentation).
>
> Enough about that!
>
> The game is named W, and is a puzzle/adventure type game. It is quite
> short as of right now (only 5 rooms, a symptom of the design, code, art,
> and sound effects being created in 72 hours), but with any luck I will
> continue updating it this winter.
>
> You can find the game and source on its entry page

> here<http://www.ludumdare.com/compo/ludum-dare-22/?action=preview&uid=7728>
> (includes
> screenshots), or on its GitHub page here <https://github.com/thomcc/W>.


> (note that those two links do not point to identical versions of the game,
> the GitHub page is still in active development, the submitted version is
> available as the ldjam branch).
>
> Anyway, I just thought some of you might think this was cool, so I hope you
> take a look!
>
> -Thom (also known as yoklov, on the IRC channel)

> [1.2 <text/html; ISO-8859-1 (quoted-printable)>]
>
> [2 <text/plain; us-ascii (7bit)>]
> _________________________________________________
> For list-related administrative tasks:
> http://lists.racket-lang.org/listinfo/users
_________________________________________________
For list-related administrative tasks:
http://lists.racket-lang.org/listinfo/users

Thom Chiovoloni

unread,
Dec 20, 2011, 7:47:20 PM12/20/11
to Vincent St-Amour, us...@racket-lang.org
Haha, the fourth is a hallway, so you probably mean the fifth, in which case you need to make all the floors the same.  

- Thom

Vincent St-Amour

unread,
Dec 20, 2011, 8:07:25 PM12/20/11
to Thom Chiovoloni, us...@racket-lang.org
At Tue, 20 Dec 2011 19:47:20 -0500,

Thom Chiovoloni wrote:
> Haha, the fourth is a hallway, so you probably mean the fifth, in which
> case you need to make all the floors the same.

Right. I thought these two were together.

I figured the floor puzzle, but can't go anywhere after that. Is that
the end of the game?

Vincent

Thom Chiovoloni

unread,
Dec 20, 2011, 9:00:54 PM12/20/11
to Vincent St-Amour, us...@racket-lang.org
Yes, thats the last level.  As I mentioned, it is a pretty short game right now haha.

-Thom

Stephen Chang

unread,
Dec 20, 2011, 9:07:50 PM12/20/11
to Thom Chiovoloni, us...@racket-lang.org
Cool game. I couldnt figure out what to do on the floor puzzle room either.

Thom Chiovoloni

unread,
Dec 21, 2011, 12:46:55 AM12/21/11
to Stephen Chang, us...@racket-lang.org
Thanks! You are not alone by any means (this has been my number 1 complaint, haha), and I think it may have been a stretch to begin with! I drew up some new art for that level to indicate "good value" versus "bad value" in an effort to clarify this, and changed them in the game.  I also added a final large empty room which says "TODO" to indicate that you've finished all the levels that exist. These changes are in the GitHub repo.

-Thom

Marijn

unread,
Dec 21, 2011, 4:29:04 AM12/21/11
to Thom Chiovoloni, us...@racket-lang.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Thom,

On 20-12-11 23:39, Thom Chiovoloni wrote:
> Hello Racket users!
>
> As some of you might know, last weekend was Ludum

> Dare<http://www.ludumdare.com/compo/>, a game development


> competition where the members attempt to write a game in either 48
> or 72 hours (depending on the competition they are entering).
>
> I entered the 72 hour competition, and wrote my entry in Racket. I
> chose Racket for this because while it's not one of the traditional
> game development languages, it is a powerful language with a
> full-featured and robust gui toolkit, and also because development
> time of Racket code is very low (assuming I already know the
> contents of the documentation).
>
> Enough about that!
>
> The game is named W, and is a puzzle/adventure type game. It is
> quite short as of right now (only 5 rooms, a symptom of the design,
> code, art, and sound effects being created in 72 hours), but with
> any luck I will continue updating it this winter.
>
> You can find the game and source on its entry page

> here<http://www.ludumdare.com/compo/ludum-dare-22/?action=preview&uid=7728>


>
>
(includes
> screenshots), or on its GitHub page here

> <https://github.com/thomcc/W>. (note that those two links do not


> point to identical versions of the game, the GitHub page is still
> in active development, the submitted version is available as the
> ldjam branch).
>
> Anyway, I just thought some of you might think this was cool, so I
> hope you take a look!

I did, nice work! I'll have to study the source later to see how you
did it.

Marijn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7xpuAACgkQp/VmCx0OL2wiegCeNO7ZOgoOsLUu7TcgwHmy63c1
EKoAn10166RIyWjEvn5Px7rM68m7BvWx
=UiiG
-----END PGP SIGNATURE-----

Thom Chiovoloni

unread,
Dec 21, 2011, 10:45:04 AM12/21/11
to Marijn, us...@racket-lang.org
Feel free!

I must warn you though, I've only been programming (both in general and in Scheme/Racket) for about 9 or 10 months now, so I can't say that I did this intelligently or correctly!  The game state has lots and lots of mutation, and I don't really have a great idea of how to avoid it!

Not to mention the fact that the GUI (and racket/class) documentation can be somewhat hard to follow some times, so most of this was figured out via a combination of trial and error in programs I've written over the last few months, and by looking at how the example programs provided with Racket do it, and trying to figure out why they do it that way.

So... if you see anything that looks silly in my code, it probably is!

-Thom

John Clements

unread,
Dec 21, 2011, 11:00:28 AM12/21/11
to Thom Chiovoloni, us...@racket-lang.org

Very cool!

Much appreciated.

Thanks,

John Clements

Matthias Felleisen

unread,
Dec 21, 2011, 11:08:16 AM12/21/11
to Thom Chiovoloni, us...@racket-lang.org

On Dec 21, 2011, at 10:45 AM, Thom Chiovoloni wrote:

> I must warn you though, I've only been programming (both in general and in Scheme/Racket) for about 9 or 10 months now,


I have read some of the code, and this is dang impressive. I will admit I started rewriting the code as soon as I saw it but only to eliminate some superfluous set-fo-bar!s. (I stopped because I decided that I should not procrastinate today)

Thom Chiovoloni

unread,
Dec 21, 2011, 1:46:41 PM12/21/11
to Matthias Felleisen, us...@racket-lang.org
Thank you, that means a lot :)!  Racket really has so much to offer someone learning to program, it has so many rich, interconnected components that the supply of things to learn about seems boundless!  I think that if I had spent my free time hacking some other language, I wouldn't have learned enough by now to do something like this.  So... Thanks!

-Thom
Reply all
Reply to author
Forward
0 new messages