Here it is! I wrote up about building Terminal Phase, a space shooter which runs in your terminal, using the Racket programming language

Getting close to hitting the milestone for me to turn it into a full game:

@cwebber i love this!

i have been returning to "ascii" gaming recently and i think this is just fantastic. keep up the great work =)

@cwebber "When I wrote Racktris I really only had a couple of pieces of state to manage (the grid, where the falling piece was, etc) and it was fairly easy to do it using very basic functional programming constructs (really you're just creating a new version of these objects every time that a tick or input happens). As soon as I tried moving to a game with many independently operating objects doing their own thing, that approach fell apart."

yup, exactly what I encountered in my own adventures.

@cwebber Woooooo working Racket code I can look at to supplement my understanding of the docs!

(Looks like you've done exactly what I wanted to see, which is convenient for me!)

@cwebber (And your blog post provided me enough context I know what lines I don't really care about! Woo!)

Isn't handling a sane order of ticks fucking tricky?!

@cwebber I have two maybe simple questions but feel free to just ignore this post:

1) What's the ^ at the start of like (define ^starfield) meant to convey?

2) What's the "wh" at the start of whactormap in goblins' export stand for, if anything?

(The fact these are my questions should indicate how generally informative I'm finding this all!)

1) The ^ is what I call a "hard hat"... it represents that this is a constructor function for making an actor :)

2) wh stands for "weak hashtable"; that's the "core" actormap that you write out to. It's weak because we want actors that are no longer referenced to properly GC.

@cwebber Oh, good! I don't ever wanna take advantage of having a quick way to ask you questions, but you explain this shit in a way that I can understand /so/ much easier than reading other folk's writing about the same dang stuff.

@cwebber Both of these answers explain a lot! Thanks.

I think, even if I move from Racket at some point, "cram a lot more information into the names," is one thing I'm going to keep with me.

Skimming things over, it /looks/ like I could actually start using Goblins now, and probably force myself to write a lot better code than I would without, lol.

@emsenn Maybe that means it's time for me to write up docs.

I was planning on waiting until I had the distributed programming stuff in good order. Maybe I should work on them sooner?

@cwebber I can't believe I'm about to say this but I think you could wait: I find the code relatively self-explanatory, and I'm really new to reading Racket and ignorant of a lot of the theory behind it. (Not self-deprecating here, just self-aware.)

The one thing that I personally crave from anything is a dictionary of terms for quickly checking what something like a "vat" is; but I think mostly you could just chug on with the code.

@emsenn Wow, that's really nice to hear! I was afraid it wouldn't be understandable at all until I got the Goblins docs out!

@cwebber Thanks a lot for the blog post, especially the overview of the Racket game tools landscape. I must admit I was hit with the opaqueness of lux's naming just the other day after checking out the Terminal Phase code and landing at lux from raart. The docs require to infer the meaning of the names from the context, sort of. But I still find Racket very much exciting.

@setthemfree You aren't the only one who finds the names confusing. I, too, was confused, and honestly the "humorous pun on big-bang" really lead to what I consider the worst part of the library: remembering what means what.

The shortcut is basically to remap:
- word == game-world (both in terms of the core state and in terms of defining the behavior for every tick, input event, etc)
- chaos == I/O interface. Ie could be keypresses in + writing out text, gui events + drawing to a canvas...

Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!