Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Hi Clouddie!

Happy to hear you are enjoying the engine :)

This is a great question, and it sounds like you came up with a good solution too.  If you have any other questions, feel free to post them on https://enegames.itch.io/elm-narrative-engine/community so others can learn from too.  Also, I'd love to see what you make if you end up with something you'd like to share, and don't hesitate to reach out with more questions.

Here are a few more thoughts related to your question which may or may not be useful:

  • In my own games I ultimately would use a query very much like what you wrote in part of the view logic.  I'd like to add a setting where you can supply a header and query to show up in the view, instead of the limited defaults of the current theme.
  • The .hidden tag is a great way to toggle what should show up, but the default theme doesn't currently support that.  I think I should add it.  For now you could toggle the .location tag on and off to make locations appear or disappear.
  • In a custom game, the engine supports adding other component data to your entities, and I have used this before to model how locations fit together.
  • If you have a location that is linked to more than one other location, you'll get stuck, because links are only one-to-one.  You could use something like .north, .south, .east, .west to get around this.  I'm considering making a new time of link that is one-to-many, but it adds a fair amount of complications and I've gotten along without it in my games so far.
  • If you are toggling views on and off in your rules, just take care to remember to do the same if you have a specific rule that would override your generic "moving around" rule.  This is the primary reason I use a custom view query or separate component data in my own custom games.  I have plans soon to make it easier to create your own custom game shell.

Hi ! Thanks for your answer, helps a lot ! I hope to build a game soon, although time is a scarce commodity !