Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+2)

I find it really funny that 'chf back' & 'chf left' are more efficient 'set false' commands than 'set false,' but 'set true' is more efficient than 'chf forth'

Why is that the case? I don’t understand any of this deeper level game behavior.

Character counts. Chf is 'check if' and sets it to true if it's true and false if it's not. False is 5 letters, while true is 4. Left and back are relational directions, and 'chf left' checks if you're facing to your left, but that's always false because you're facing forth, because forth is always forward. 

So 'set true' has the same character count as 'chf left', while 'set false' and 'chf forth' use the same number of characters.

It's not a major improvement in efficiency, but it's there.