Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: R-cade, a simple arcade game engine for Racket (github.com/massung)
205 points by massung on Jan 25, 2020 | hide | past | favorite | 24 comments


This looks awesome! I have a brother-in-law who is 15 (gosh he's getting so old) and who is frighteningly intelligent. He spends most of his free time hooking up relays to a raspberry pi to control an array of Christmas lights. I'll forward this repo to him; I've been trying to get him to start experimenting with Racket. This might just be the ticket.

I think Racket is a wonderful language for education, and this library will certainly help a lot more kids find interest in learning Racket. When I first started programming, I wrote a lot of games with ASCII art in Perl. They were not fast, but I learned a bunch! If I had had this, I would have picked up a LISP much sooner.


Is anyone familiar with the stand-alone executable export[1] for Racket?

I did a Ludum Dare and browsed a submission where a child had spent a lot of time and effort making a project in PyGame, but found it hard to distribute because he didn’t have the technical know how of converting it to something like a windows `.exe` file at the time. If this helps youngsters learn and explore programming the way the Commodore 64 had a nice BASIC->6502 ramp alongside distribution via floppy/cassette, I’d be super excited about this.

[1] https://docs.racket-lang.org/raco/exe.html


raco exe will give you an executable that's dynamically linked, so you also need to run raco distribute [0] to get a folder full of the libs you'll need for a "standalone" distribution. (Unless you can depend on Racket being installed).

I've used the two to make Linux and Windows (via Wine) distributions without any issues. It's fairly painless.

[0] https://docs.racket-lang.org/raco/exe-dist.html


For anyone else reading this, I found the Ludum Dare submission and wanted to link it here:

http://ludumdare.com/compo/ludum-dare-34/?action=preview&uid...


You can create an executable from the menu in DrRacket https://docs.racket-lang.org/drracket/create-exe.html I think that not all the options are available, but it is easier.


I think it is a lot easier now, particularly with the license change to MIT.


I am trying to run this and am running into some issues. I'm a newbie so please help me get going.

First, is this supposed to run from DrRacket? I installed the r-cade succesfully but when I run this, I get error:

ffi-lib: couldn't open "csfml-audio-2.dll" (The specified module could not be found.; errid=126)


You need to download and install the CSFML libraries yourself. For audio you also need OpenAL and libsndfile. Links to all are in the README.


Thanks. I am currently stuck at this step. I did the raco pkg install csfml and apparently it was installed but i get the same error. Also I tried downloading the csfml bindings but don't know what to do with it as the instructions assume prior knowledge or are too cryptic to me. I'm giving up for now. Maybe I'll try again maybe not.


By the way, this hurdles won't help with kids picking this up. Sadly..


I've updated the README to point to a DEPENDENCIES.md file that details installation instructions of 3rd party libraries needed for each of the platforms. It needs some love for Linux, though, if anyone is up to the task.


Very, very nice. I have been pondering getting into pico-8, and this might be a way to do something similar _and_ have fun with Racket.


This seems really cool.

The "no external asset" goal reminds me of another very cool game engine, still actively maintained, but unfortunately totally under the radar : amulet. There is even an online editor, you can check "defenders of the weeping quasar" it is quite impressive and totally retro : http://www.amulet.xyz/editor.html


For a non-Lisper that code is so clean and readable.

Seems like a fun project to dig into. Busy these days, but might have to give it a go.


I pasted the 'Hello, World' code after installing dependencies. It worked. Then I pasted the breakout example at https://github.com/massung/r-cade/blob/master/examples/break... and ... nothing. Just seems to hang in the terminal without opening an r-cade window. How can I debug this?


I love racket. Does anyone know of a Racket to Javascript compiler. Would love to be able to create Racket powered web games with this for educational purposes


I haven't used it (yet) but RacketScript is a thing https://github.com/vishesh/racketscript


Thank you! Exactly what I was looking for


Looks awesome! I’m currently teaching Racket in my undergraduate PL course and I was just looking for something graphical to show them. I’ll try this in a week or two!


What’s the general stance on putting gifs for the Readme into the repository, potentially bloating its size?


In this case I’m all for it. There are 3 gifs, they are not huge while also clearly shows what the system is capable of. A general stance seems quite dogmatic, it depends on utility...


Cool! Is there a way to dump the generated sound to wav / mp3 file? And thanks for building ;)


Take a look at music.rkt (the very end), there's an example of doing just that with the Tetris theme song. It's what I would use to test different sound waves, envelopes, note parsing, etc.

Edit: I was thinking of pulling the RIFF/WAV code out into its own package. Let me know if this is something you'd find useful.


at first i thought it would be a game engine built with R, which would truly be a crazy hack!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: