Announce: GRUESCRIPT

Not unless you created Javascript, the web, and computers, it isn’t…

(I get it, though. Gruescript uses JQuery, which I can just copy and paste in, but I couldn’t face mucking about with node to install CodeMirror. It’s not about it being “just me” – it’s not – but it’s just a web page doing some clientside stuff. That’s why I wrote my own syntax highlighting editor, which turned out to be a lot harder than I’d thought through.)

1 Like

I think you’re being too harsh here. Are you saying doing things from scratch requires making things from the very beginning? I mean, I have designed my own customized language running on my own built VM, but does that even count? How about mining copper just to build a computer?

This reminds me of some unnamed person who claimed that I need to plant my own grain, just to be able to say “cook pizza from scratch”. Quite an uncommon interpretation.

Create computer? Lady Ada didn’t have access to a working computer. Does it mean that she’s not a computer programmer? You’re entitled to your opinion, but … sigh.

No, the opposite. I’m saying having dependencies on existing things doesn’t make your own work any less valid.

2 Likes

I wasn’t saying it’s less valid, I was just saying I agree with the mindset of not relying on dependancies.

Like I’ve seen people use jquery just because they don’t like writing document.getElementById(). They don’t use any of its other features. They just include a whole library because they prefer to write $(). Stuff like that is overkill.

I just like having full control of what goes into my code, so that means as few dependencies as possible. It also prevents code from inexplicably breaking when someone tries to use older code with newer versions of dependencies.

That all being said, there’s definitely a balance. Like when I was writing my fighting game thingy in python, you better believe I immediately jumped on pygame. There’s no way I was going to do all of that graphic stuff from scratch. There’s a point at which reinventing the wheel just to maintain 100% ownership of your code is just stupid.

2 Likes

Well, OK. I can agree to that.

However, less dependencies is desirable in some circumstances. I still remember the difficulties and frustrations I had in installing ScottKit due to Raspberry Pi not having the full standard library installed.

1 Like

Especially when you can do:

var $ = document.querySelectorAll

:joy:

You’re right, I’ve seen it, people using whole libraries for things they could replicate with a single line of code.

2 Likes

I’m enjoying playing with this a lot so far! I haven’t properly worked on my own IF for months, and I’m having a lot of fun making something quick and silly with Gruescript, even though I haven’t got as far as writing instructions and commands yet. Thanks for making this!

I’ve found a couple of things which are either bugs or things I’m doing wrong. Certain keywords listed in the documentation don’t seem to work for me, even when I copy the examples directly. I’m using the most recent version (2021-08-19), downloaded to a local file and run through Opera 78.0.4093.147. I’ve also checked in Chrome 92.0.4515.159 and I’ve tried the online version run from itch.io.

The “prop” keyword doesn’t work for me. This game with a room property copied from the documentation fails to build with the error message “error on line 9: didn’t understand “prop” in room declaration”:

game Testing
id TEST
author rabbit
version 1
person 2
examine on

room test_chamber You are in a test chamber.
prop wall_colour red

Custom directions build, but they don’t appear in the list of exits so you can’t use them. This game (copied from the documentation) builds successfully, but “turnwise” and “widdershins” don’t appear. If I use “north” and “south” instead, those exits appear even though the rooms they lead to don’t exist, so I think the problem is with the directions themselves?

game Testing
id TEST
author rabbit
version 1
person 2
examine on

room brass_bridge You’re on the Brass Bridge.
dir widdershins patricians_palace
dir turnwise broad_way
1 Like

I flagged this problem on GitHub and Robin has fixed it in the latest build.

4 Likes

It was working for things, but not rooms. Fixed now!

As JJ said, he also spotted the problem with made-up directions - that’s also fixed.

Really glad you’re enjoying it!

4 Likes

Great, thank you!

I guess if you’re taking the easy way out. Real cooks engineer their own wheat from vats of amino acids and RNA nucleotides. It’s the only way to be sure that you’re getting exactly what you want.

6 Likes

I mean, if you’re serious about pizza, the crust grains need to be grown in soil you built yourself from loam that you selected and mixed granular matter into and grew an ecosystem from scratch in by introducing well-selected worms and bacteria and mosses and algae and insects. Only amateurs take the land as they find it instead of controlling all of the variables. Don’t even get me started about how you need to build your own device for transferring the mechanical energy from the wind to the grindstone you shaped by hand via axles derived from trees you grew yourself in your own handbuilt artisinal soil.

I had a photography teacher in high school who strongly believed that real photographers mix their own darkroom chemicals and roll their own film onto 35mm spools from bulk rolls, too. I think he’d have had us spreading photographic emulsion onto rolls of acetate base in pure darkness if the 50-minute class periods would have made that plausible and/or he could have kept the janitors out of the darkroom after hours while the emulsion dried.

5 Likes

Pat, do you realize that I’m actually living in greater Naples ?

no one can be more serious about Pizza than a Neapolitan…

Best regards from Ercolano, Naples, Italy.

6 Likes

I just set the initial conditions for the creation of a universe and hope that a pizza-loving lifeform eventually emerges from the spectrum of primordial density fluctuations.

Anyway…

4 Likes

This is just the sort of thing I was looking for, and I’m having a lot of fun playing around with it.

I think a few key items are not yet color-customizable: The “instructions” button that appears by default doesn’t seem to be controlled by any of the colour-area properties, and only the most-recent text in the main area can be customized, I think. Old text goes to a default slightly grayed out color scheme.

4 Likes

Thanks. These are now customisable as instructions_button and main_text_old. There’s also main_text_prompt and main_text_prompt_old for the mock command prompt echoes, which were also missing.

1 Like

I’ve translated my game The Party Line into Gruescript, and it’s now available as one of the examples from the menus.

To see what an exported Gruescript game looks like, you can play The Party Line minus the editor at https://versificator.itch.io/the-party-line, which is made from the Gruescript export with a bit of custom css to set the font.

6 Likes

Thanks! The TV room was just what I needed - some Gruescript code with procedurally generated text!

However, I must protest. Barbie Girl is a great song, and Star Trekkin’ is a stone cold classic!

3 Likes

I’m liking and grokking lots of it. I’m still working my head around how the message in a rule is always a failure message, but I expect Robin’s code is doing Tony Hawk tricks and I’m like “so I’m to understand this board you skate on requires four wheels attached altogether?” :laughing:

I’m one of those weird’uns who learns by epiphany, so that’s just me.

2 Likes

Yeah, I regularly get this wrong myself.

But I think it makes sense this way. You set up a stack of requirements for an action, with an (optional) message that’ll be printed if one of them fails. This matches the common text adventure puzzle paradigm of “solve one obstacle, see what’s stumping you NOW, rinse, repeat”:

verb open door
has bouncer asleep: "Name's not dahn, you're not comin' in," says the bouncer.
has door handle: There's no handle on the door.
!has door locked: It's locked.
!has floor gluey: But your feet are glued to the floor!
goto macguffinery

and while each one of those lines might look more intuitive in isolation with the conditions flipped, I think the block as a whole makes sense this way. The conditions you’re listing are always the ones needed for the block to succeed.

1 Like