Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit) (+4)

I spent some time yesterday thinking about how we could reduce and untangle all the conditional logic in building parser-based IF in Decker, and I came up with a few thoughts. If we represent rooms within a game as cards, and objects within those rooms as widgets, we could use Decker's ordinary event-sending mechanisms to drastically reduce the amount of repeated logic, so that instead of having to write:

 # (imagine this surrounded by a huge pile of other semi-related repetitive logic)
 ...
 if (obj~"battery")&(verb~"lick")
  printf["tastes sparkly!"]
 end
 ...

It's only necessary to write an event handler on the "battery" widget:

on lick do
 println["tastes sparkly!"]
end

And everything is broken up into tidy logical pieces instead of one gigantic script.


Give this a spin and then poke around inside to see if it provides any useful ideas:

http://beyondloom.com/decker/goofs/ifparser.html

(+2)

This is really great, it does seems useful to store it that way. It will be really useful, thank you!