Time in Games

Something I’ve noticed about JRPGs, especially those in the indie community, and those branching off or part of the Final Fantasy chain is that time gets completely ignored.

It’s easy to forget about day and night cycles, and that fact that NPCs, although programmed, are people (or at least, should be good representations of people). It makes no sense that the shopkeepers can be standing around all day, waiting for players to come in and spend their precious currency units on items. Dragon Quest IX on the Nintendo DS made sense of this by having different NPCs appear between night and day, and having NPCs sleeping at the night time hours- For shops, they had the shopkeepers operating during the day sleeping, while substitutes stand at the counter.

This is something that I have tried to alleviate within my own project. The screentint changes depending on the time of day, and at night, some shops close. Unless otherwise stated, shops are open during the daytime hours, and some are closed at night. Currently, time is divided into four segments, which are named in the game’s code as [Early, Day, Afternoon, Night], although this is likely to extend to five segments to facilitate shops closing later on in the night.

Currently, this is processed all as parallel events and simple events with conditionals looking for the conditional events that the parallel events create. Shops close, lights turn on and off (at night, a lantern appears outside shops if they are open), and different NPCs appear through the city. The only part of this whole set up that seems to be a problem is that the transition is not seamless. Changes happen instanteously as the light changes gradually.