Brahman.1

Brahman (part 1)

There are parser games, which tend to focus on objects, and non-parser games, which tend to focus on choices and threads. But lets consider the middle ground:

Non-parser games based around concepts.

concepts here refers to a generalisation of objects, things, places, people and non-tangible ideas, knowledge or facts. But they are nevertheless entities that can be applied, referenced or used; “nouns” would be a crude approximation.

Now, let’s take the idea of a parser and, instead of shooting for hairy ball NLP, relegate it to a robust, but powerful command language (which it always was anyhow).

Take the parser out of the player experience and make it an authoring tool.

The authoring tool and the game then become the same thing. You create the game from inside itself out of thin air!

The Cosmic Power of Creation

What is Brahman?

A system for creating touch-based, text interactive fiction with graphic illustrations and sound.

Why Brahman?

According to Wikipedia:

“Brahman” is the power itself, not the creator. That’s you!

Non-parser games based around concepts?

If there’s a parser could it still be a parser game? Emphatically yes, but typing is a bit like working - people don’t want to do it (mobiles especially). They also don’t like reading too much in one go either.

X on Y

The idea is to simplify all player operations, conceptually into “X on Y”. This generalisation covers cases such as “use X on Y”, “ask X about Y”, “tell X about Y”, where the idea of “how” (verb) is implicit.

It’s important to remember that X and Y can be intangibles.

You don’t have an inventory. You don’t pick things up and you don’t have to walk halfway across the game to get the silver key to then come back and open the birdcage. This sort of stuff is not entertainment.

You [em]do[/em] have a roster of entities. These are both ideas and objects that you’ve encountered that might be useful. The roster will include physical objects, people, places and facts. We’ll pull the usual trick of having things disappear from this list once you’ve used them, to keep it manageable.

For the UI, this could be a sliding drawer of icons, it could be a palette or something else. So long as it works. You tap on an entity from the roster to “use it” and you apply it to the current focus.

Current Focus?

The text on the screen establishes the current focus. The last thing mentioned in the text, or the person you’re talking to is the focus.

When the butler opens the door, you select the calling card in the roster to present it to the butler.

Inspector Lestrade is in the room. You click on “Mr. Peterson”, you’re asking Lestrade about Peterson.

You only select “X” to perform “X on Y”.

The focus, “Y”, is essentially the last thing mentioned in the text. If it’s not the thing you want to reference, you can tap something else in the text. This is also the mechanism to inspect or examine, search etc.

Inspector Lestrade and Mrs. Hudson are in the room. You click on “Mr. Peterson”?

Will depend on who’s talking or with whom you last interacted. If you really want to ask Mrs. Hudson, you click on “Hudson” in the main text body, then on Peterson from your roster.

Depending on the game design, maybe you’ll always be asking the most relevant character anyhow.

From itself out of thin air

Just how does this work?

The best way to explain might be by demonstrating in the system so far. So let’s do that. Bear in mind that the system is currently WIP. Here’s goes:

[code] Welcome to Brahman.
Version 0.1.

You are in the Universe.
It is vast.
You can see a Mobile here.

[/code]

Rocking!

Ok, not very spectacular, but indeed minimalist. You start with almost nothing, creating even the basics yourself. I’ll demonstrate how things work by creating some of those basics, but in practice you’d load a [em]kickstart[/em] library and build your story on top of that.

> look at the mobile I don't understand "look". In "look at the mobile".

Not even “look” is defined to begin with!

I should mention here that this demo is going to look awfully like a parser game. That’s because it kinda is when you’re the author. As mentioned above, the player experience would normally be totally different.

Boot me up Scotty! (he didn’t say this either)

create "examine", "look" and "l" as verbs. look means think. look thing "X" means describe "X". look at "X" means look "X". examine "X" means look "X". l "X" means look "X".

That sorts out the basic look and aliases. We’ll cover “in” and “on” later. Try it out,

[code]> look at the mobile
The Mobile is a wild and crazy dude.
You are in the Universe.
It is vast.
You can see a Mobile here.

look at the universe
It is vast.

look at me
Brahma is the one with the tough job.[/code]

One of the aims of this system is to allow a somewhat organic development. The idea of trying it as you go rather than making everything upfront. Also, play testing is also editing and filling in gaps. At any time you could create a new object and give it meaning.

In these examples i won’t be giving things long and full descriptions because it will just get in the way. Also, in practice you’d want to separate the re-usable stuff from the story stuff. Here I’m just going to mix it all together to keep the examples short.

Create object to represent classes.

[code]create a “room” as container.
create (a “lounge” as room) in here.
set lounge as “This place is disgusting!”

create “go” as verb.
go room “X” means put me in “X”.[/code]

Notice that “room X” is a filter. This is how you make things work on only those things that make sense. Filters works just like adjectives.

Let’s create some things,

create "people" as mobile. create "Fat", "Freak", "Freewheeling" as adjectives. create freak "brothers" as people. create (Fat "Freddy" as brother) in lounge. create ("Phineas" as brother) in lounge. create (Freewheeling "Franklin" as brother) in lounge. set freddy as "Fat Freddy is fat and stupid looking." set phineas as "Phineas is wild and crazy." set franklin as "Freehwheeling Franklin is a mean looking dude." go lounge

How does it look so far,

[code]You are in the lounge.
This place is disgusting!
You can see Fat Freddy, Phineas and Freewheeling Franklin here.

[/code]

> look at fat freddy Fat Freddy is fat and stupid looking.

The collective nouns used for groups and filters work too.

> look at the freak brothers Fat Freddy is fat and stupid looking. Phineas is wild and crazy. Freehwheeling Franklin is a mean looking dude.

We need some extra things,

[code]create a “kitchen” as room.
set kitchen as “This kitchen is totally revolting. The cooker has never been cleaned.”

create ((“Fat Freddy’s” “cat” as mobile) of freddy) in kitchen.
set cat as “He looks hungry”
create (some “cat” “food” of cat) in kitchen.
create a “cooker” in kitchen.
set cooker as “Eeeww!”
set cat food as “Urg!”
go kitchen[/code]

These last examples illustrate some points,

[code]You are in the kitchen.
This kitchen is totally revolting. The cooker has never been cleaned.
You can see Fat Freddy’s cat, some cat food and a cooker here.

[/code]

Notice that it “knows” to say “some cat food” but “a cooker”. This is because it learns how to say something from the definition. It also knows not to say “a fat freddy’s cat”.

But there’s something wrong. We don’t really want it to mention the cooker since it’s part of the description,

sorted,

create an implicit "cooker" in kitchen.

Makes this implied, but not mentioned.

[code]You are in the kitchen.
This kitchen is totally revolting. The cooker has never been cleaned.
You can see Fat Freddy’s cat, some cat food and an implicit cooker here.

[/code]

Oops! it’s mentioned. That’s because we’ve got the power of Brahman to see the invisible. Things are different if we’re one of the characters,

put fat freddy in kitchen. become fat freddy.

and try some things out,

[code]You are in the kitchen.
This kitchen is totally revolting. The cooker has never been cleaned.
You can see Fat Freddy’s cat and some cat food here.

What now? look at the cooker
Eeeww![/code]

What now? look at freddy's cat He looks hungry.

What now? look at phineas You can't see any such Phineas here.

Now let’s add stuff so we can feed the cat.

I know we weren’t going to have “get”, but let’s see how you’d implement it, because it illustrates some important points.

create "get" as verb. get thing "X" means if "X" in me then think "You've already got ", "X" else (silent. put "X" in me. loud. think "You get ", "X").

try it out,

What now? get cat food You get some cat food. You are in the kitchen.

What now? get cat food You've already got some cat food.

What now? get cooker You get a cooker.

oops! didn’t really want to get the cooker.

fix this by creating a class “gettable” and change those things we allow to get as gettable.

create a "gettable" as thing. create ((some "cat" "food" as gettable) of cat) in kitchen.

rewrite “get” and add aliases,

create "to", "up" as prepositions. create "get", "take" and "pick" as verbs. get thing "X" means think "You can't get ", "X". get gettable "X" means ( if "X" in me then think "You've already got ", "X" else ( silent. if put "X" in me then ( loud. think "You get ", "X" ) else loud ) ) take "X" means get "X". pick up "X" means get "X".

try it out,

[code]You are in the kitchen.
This kitchen is totally revolting. The cooker has never been cleaned.
You can see Fat Freddy’s cat and some cat food here.

What now? pick up cat food
You get some cat food.
You are in the kitchen.
This kitchen is totally revolting. The cooker has never been cleaned.
You can see Fat Freddy’s cat here.

What now? get cooker
You can’t get a cooker.[/code]

That’s better! You start to see that the standard verbs begin to get complicated. This is why you’d normally have a kickstart library with a basic ontology and a pre-defined verb set.

So now we write our only story action, which is to feed the cat.

[code]create “feed” as verb.
feed thing “X” means think “huh?”.
feed mobile “X” means think “X”, " doesn’t want any food".

feed cat “X” means (
if food in me then (
think “X”, " bolts down the food hungrily.".
silent.
put food in universe.
loud
)
else think “you don’t have any food.”
)[/code]

play it,

[code]You are in the kitchen.
This kitchen is totally revolting. The cooker has never been cleaned.
You can see Fat Freddy’s cat and some cat food here.

What now? feed cat
You don’t have any food.

What now? get cat food
You get some cat food.
You are in the kitchen.
This kitchen is totally revolting. The cooker has never been cleaned.
You can see Fat Freddy’s cat here.

What now? feed cat
Fat Freddy’s cat bolts down the food hungrily.
You are in the kitchen.
This kitchen is totally revolting. The cooker has never been cleaned.
You can see Fat Freddy’s cat here.

What now? feed cat
You don’t have any food.[/code]

Conclusion

We haven’t covered building a map or movement yet (although it’s similar) and i haven’t shown how it works from a kickstart library - which makes it a [em]lot[/em] easier to build stuff.

Much of the above would be in the kickstart library, leaving only the descriptions and story actions to really be implemented.

Also the above examples lean far too much toward the old school text adventure paradigm, but a different kickstart can give a different kind of experience. Focusing more on threads rather than objects.

You can see, however, that we pretty much did build this from nothing, only a few raw primitives, which means the experience and type of games created can vary enormously.

Thanks for the detailed examples! I’ll be interested to see where you go with it from here.

I’m not that familiar with existing authoring options but this looks alot like what say Inform7 offers as a development system. Does removing the parser from the front end of the game produced really benefit from reinventing the wheel with respect to tools for writing the IF game?

As I understand it you explain the above in the context of a parser (eg. >get cat food) but you say your innovation is being parser-less and explained elsewhere that your frontend will show hyperlinks for nouns/objects (which though you don’t say so I presume will show supported verbs/actions when clicked). Isn’t this something people are already looking at doing with existing IF engines (I’m not certain how doable it is, I guess it depends on internal representation of the game within the interpreter/s)?

I would love to see this actually in action.

It also sounds a lot like another allegedly in development tool called Yarn with a somewhat similar world model concept, although this hasn’t received an update since February: yarnstudio.io/yarnscript-language/

(There are two things currently called “yarn”, the other seems to be a mobile interface/store that uses Twine as a development tool: useyarn.com/ )

@turnip

removing the front end parser is really just to present a choice game with inventory. The difference from a straight choice game is that some choices come from your inventory.

My examples were a bit misleading because i used them to generate a parser game “get cat food” etc. I shall have to make some examples that demonstrate the the main idea. The parser game is actually harder to make, so that’s one reason why i had those examples - to show that quite general things can be done.

I wont be showing any verb/action combinations. Basically, the verb is always implied. You click on something in the inventory and it will “use” it in the current situation. Basically, there won’t be a choice on how to use a given thing in a given situation.

For example, if you had a dark corridor, selecting the flashlight from the inventory will automatically use the flashlight to enter the corridor.

I need to write part 2.

@HanonO

Thanks for the links to yarnscript. I didn’t know about this. Looks like useyarn is planning on rolling out their own authoring system. Up until now, it looked like a twine container.

My script language is considerably more advanced that yarnscript. I don’t see any actions defined and the properties described I can easily accommodate.

Here’s the first yarnscript example in brahman:

[code]create a “place” as container.
create the “pond” as a place.
create “animal” as mobile.
create “frog” as animal.
create (“Kermit” as frog) in the pond.
create “pig” as animal.
create “Miss” as adjective.
create (Miss “Piggy” as pig) in the pond.
set kermit as “It’s Kermit the frog!”

create implicit “loverof” as preposition.
put kermit loverof miss piggy.

create (the “player” as mobile) in pond.
become the player.[/code]

play it!

[code]You are in the pond.
The pond is ordinary.
You can see Kermit and Miss Piggy here.

What now? describe all in pond
It’s Kermit the frog! Miss Piggy is ordinary. You are ordinary.
You are in the pond.
The pond is ordinary.
You can see Kermit and Miss Piggy here.

What now? describe what is loverof miss piggy
It’s Kermit the frog!
[/code]

We can go further and make use of loverof. make a verb.

create "kiss" as verb. kiss mobile "X" means ( if what is loverof "X" in here then ( think (what is loverof "X"), " says hey!!" ) else think "you give ", "X", " a kiss." )

play it.

[code]What now? kiss miss piggy
Kermit says hey!!
You are in the pond.
The pond is ordinary.
You can see Kermit and Miss Piggy here.

What now? kiss kermit
You give Kermit a kiss.
[/code]

any comments from Mr Yarn?

“removing the front end parser is really just to present a choice game with inventory. The difference from a straight choice game is that some choices come from your inventory.”

“Choice game with inventory” sounds a lot like Jon Ingold’s original Adventure Book system.

Honestly, I’d never looked in detail at Inform7 source until now.

There are some surprising similarities, although I’d never seen this system before. Brahman does some things a lot more generally than Inform, although inform has some extra hooks (like before and after), which are quite nice.

Inform seems to have predefined ideas about directions and room connections. In Brahman you make these from general relations,

eg define standard directions and “go”.

; Pseudo prepositions.
create implicit "north_of", implicit "east_of", implicit "west_of" and implicit "south_of" as prepositions.

; Self movement operator
create "go" as verb.
go east means (
	if what is east_of here then
		put me in what is east_of here
	else think "There's no exit there."
)
go west means (
	if what is west_of here then
		put me in what is west_of here
	else think "There's no exit there."
)
go north means (
	if what is north_of here then
		put me in what is north_of here
	else think "There's no exit there."
)
go south means (
	if what is south_of here then
		put me in what is south_of here
	else think "There's no exit there."
)

use like this:

create the "kitchen" as room.
put kitchen east_of lounge.
put lounge west_of kitchen.

Same way for other forms of directions, up down in out etc. You can see that these “pseudo prepositions” work as generic relations, a bit like “loverof” in the Miss Piggy example. Nothing is pre-defined here.

Something else is that you have to Edit/Compile/Test with Inform. In Brahman, you just type away and play test at the same time. To do this, Brahman has an internal permissions model. I was going to talk about this in Brahman.2, it’s quite subtle but important. I’ll say a bit here,

In Brahman, you can say,

create the "kitchen" as room.

Buy why can’t the player do this?

It’s because you start with the power of creation. When you become an object, you lose this power, so you can only perform “mortal” operations. Mortal operations consist of using those things; verbs, objects etc that have been already created.

As Brahma, i can say,

Put me in the kitchen

and it will do it - from anywhere. The player, on the other hand, can only operate on local objects. but if the kitchen is east of here, how can i go to the kitchen as a mortal if it’s not here?

For example typing “go east” as the player might run this,

go east means (
	if what is east_of here then
		put me in what is east_of here
	else think "There's no exit there."
)

This statement was created using the power of creation and retains that power when it is invoked. It therefore has the power to put you anywhere, create anything and do anything. But only inside its invocation, which the player cannot change.

In theory, then you could have a game with a “magic wand”, that allowed the player to actually create objects within the gameplay limited by the definitions allowed by the wand - which would have to be quite careful, but possible.

Without this permission/security model, you couldn’t have a game where you create it from within. It would have to have the edit/compile/test loop like Inform.

Usually the last thing done in a Brahman script is

become the player

I love the philosophy and creativity of what you want to accomplish. I like the concept of simple entities and how verbs and relations and every other concept are built out of the same gesture.

I can see how starting from scratch with no world model might be an advantage in more experimental interactive works, and for people who don’t already use a natural-language system.

I’d definitely like to see in the documentation some code examples which demonstrate the world-modeling process but could also be dropped into a game wholesale to simplify common processes…things like inventory, containment, examining, taking and dropping, directional location modeling, turn counting, scoring, etc. An author could use these in the same manner as the Inform Recipe Book or extension library to get up and running a little more easily and have a starting place for customization.

Allowing game creation within the world…sounds ambitious and potentially amazing. Do you see this as the primary author interaction/creation method, or do you intend this as a way to turn the reins over to a player within a game? That sounds like a strange loop that could provide some odd existential gameplay or be a mess. Definitely should be an option that can be turned off and locked for distributed games.

Does this mean that the interpreter and the builder are the same app?

Does anyone remember Figment?

mirrors.ibiblio.org/interactive- … g/figment/

I seem to remember it allowed for something similar, though not nearly as complete and ambitious. You could switch viewpoints with ANY character in the game (by design, ANY NPC, be it animal, mineral or vegetable, could be “jumped into”) and I think you could edit a few things on the fly as well.

It was ultimately too buggy to use properly, IIRC.

@HanonO

Thanks for your comments.

You are right. I’ll have to put together some detailed tutorials. Perhaps one aimed at authors and one more technical.

I’ve been making what i call a “kickstart” library. This is a basically a whole bunch of bootstrap definitions that get anyone started. Most of the examples, i’ve talked about so far would actually be part of this bootstrap.

Stuff like; movement, get/drop, give, wearing stuff, and so on. Definitions for all the usual verbs together with a set of object types; people, places, garments, etc from which to subclass.

To make a game, you’d just copy the kickstart and then add story specifics.

So the author oriented docs would be aimed at people who would build on top of this library and won’t really need to explain the nuts and bolts of how it works underneath, just how to use it.

The tech docs, on the other hand, would show you how things really work from the ground up. A lot of what i’ve already mentioned would essentially be tech doc.

Building on top of a kickstart library would, of course, be much easier.

But inevitably, there are cases in certain games and plots where something a bit non-standard is needed. That’s when you’d need to dip in and make a change to a standard definition.

Say you had a game that modelled “fear” so that, when too frightened, you couldn’t perform certain actions - or that those actions did something different (make you drop things by accident when scared for example). You’d probably add hooks into some of the standard definitions for this feature.

But essentially, it would be doable.

You are correct that the interpreter and builder are the same thing. There’s no concept of a build process. This means you could, under certain circumstances, allow the player to create things.

One of the things i always intended, is to allow the player to make his/her own shortcuts via the same mechanism.

eg

create "w", "e", "s", "n".
w means go west
e means go east
s means go south
n means go north

works and could be added by a player just to save typing (if it wasn’t already defined).

Like this the player can make up his/her own command macros if they wanted.

@Peter Piers,

Thanks for the link to Figment. I hadn’t heard of that before. It’s a pity that there’s only a DOS EXE and no source code. That’s how thing die, unfortunately.

A bit of Brahman background:

I wrote the original code some years ago and, just recently, i had a go at building it again. Of course, it didn’t compile! but luckily i got it working again.

Since that time before, i now develop desktop software and mobile apps. I had a idea, to use the original engine as a backend, and build extensions to trigger graphical features.

The front end would be a new, cross platform, body of code that hosts the backend transcript as well as graphics and other media (eg sounds).

The front end would, ideally, present a touch interface that essentially works by sending commands to the back end so the player doesn’t actually have to type them.

In theory, you could also have a plain text, command line interface. Although not exciting for players, this might prove invaluable for batch testing a game. ie run walkthrough scripts to check that the game can still be fully played after a change.

I always wanted to make everything open source, and still plan to do so.