Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

What is root?

A topic by Garry Francis created Oct 10, 2019 Views: 62 Replies: 1
Viewing posts 1 to 2
Submitted

It seems like everything I do uncovers yet another Adventuron mystery. My game has a root. When I created the root object as follows:

root : object "root";

I got an error saying, '"root" is a reserved identifier in the current context.' Okay, so it's a reserved word that is not documented. What other undocumented reserved words am I likely to come across?

The doco says it's advisable for the identifier and the noun to be the same. That makes sense. So how do I get it to stop complaining. I'm not gonna change my object, as it's crucial to the game.

[Some time later...] I found a workaround. Append a numeric suffix to the identifier as though it's needed for disambiguation, even though it isn't. Is it okay to do that?

Host

Root is just a banned id because root is the id of the root object of the entire state model of the game. Like the root of a file system.

It's a shorthand for the id of objects to represent the noun and the adjective, so you can use the numeric suffix trick or simple use noun="root" to override an object with an I'd that does not map to the noun.