Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Some of my code seems to go a bit screwy in 8-bit export. For example, this little time-handling  routine works fine in Adventuron, but goes wrong in DAAD (starts off at 12.00 rather than 11.45 and the minutes run over 59 in the 8-bit version). Which is a shame, as there a some timed events in my game.

--

start_at                 = my_location

locations {

   my_location : location "You are in a room." ;
   
}

on_tick {
: increment "minutes" ;
: if (minutes>59) {
: set_integer var = "minutes"  value = "0" ;
: increment "hours" ;
: if (hours==13) {
: set_integer var = "hours"  value = "1" ;
}
}
: print {(hours+" "+minutes)};

}

integers {
    hours : integer "11" ;
   minutes : integer "45" ;
   
}

---

Another thing to note is that local event handlers don't appear to translate into DAAD (so on_ticks or on_describes per room don't work, but they do work globally). 

But never mind - I'll make it work in Adventuron and then go back and do what I can to make the 8-bit version as functional as it can be (there will be a few rough edges...)

(2 edits)

Nice bug report.

I have fixed most of this and performed an update of Adventuron.

That said,  printing out of the time  still has linefeeds.

I'll look at that a bit later.

Regarding local event handlers not working on export to DAAD, one of the DAAD guys mentioned that in one of the previous game jams, so I stopped using them. I now put all event handlers in the global event handlers. The only downside is that you have to do an is_at test where appropriate. The upside is that all my event handlers are now in one place, so it's easier to manage.

Question for Chris: Is this still the case? If so, it might be worth mentioning in the guide on 8-bit export, assuming it's not already in there.

OK, I've made two changes to local event handlers for 8-bit.

  • First is that local event handlers will be flagged as incompatible in the 8-bit mode of the editor.
  • Second is that I've documented that they are not compatible with the 8-bit mode.

To be honest, I could make them compatible, but it' not worth the development and testing overhead at the moment when there is a very easy alternative.