Announcement

Collapse
No announcement yet.

Ingame Date & Time - Custom calendar/timers plugin

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    [RELEASED] Ingame Date & Time - Custom calendar/timers plugin



    Available now on the marketplace.

    Ingame Date & Time is a plugin designed to make it easy to work with a customized in-game time system in all your Blueprint or C++ code.

    You can use the standard Gregorian calendar, or define your own from scratch. Specify whatever rate you want your game clock to flow at with respect to real time. You can then create timer events in blueprint triggered at times/delays specified in your internal game time system, as opposed to having to constantly work in terms of raw seconds.

    The system is suitable for any type of game with a persistent game world. It's also ideal as a way of driving graphical time-of-day systems, or other time dependent effects such as dynamic weather or seasonal appearance changes.

    For more details and links to a packaged demo and documentation, see here.

    The plugin can be used in Blueprint-only projects, and comes with example blueprints showing basic usage as well as how to connect it to a simple time-of-day system. There are also examples showing how you can create your own UMG widgets to display dates and times in whatever format you like.
    Last edited by ambershee; 09-01-2016, 10:16 AM.

    #2
    Plugin has been released, and there is now a packaged demo available, along with full blueprint node reference. Link added to above post.

    Comment


      #3
      Originally posted by NovaNinja64 View Post
      This is extremely cool, and useful. I've been looking into things similar to this for a game we're working on. I would love to have something like this available to use. Just for example I would like to ask if I could setup your system with the following calendar setup - Say your year systems work in eras and years like its the "14th era year 401, 14th of march" and have 12 hours clock with daytime triggering around ~6-7am and nighttime ~8-9pm? It would be really cool to be able to setup seasons, so that dusk is later or earlier during certain times of the year, and you could trigger snow and things like that. Oh also I just thought of something else, could you set a year to be say only 100 days, like set the length of years months hours days and such to a custom amount.. that is without much changing of your day cycle timings. Anyway it'd be really cool if you could get back with me, I know its a year later hopefully you've got some improvements...
      Hey there.

      So yes, you can define a completely custom calendar with whatever named periods you like, and specify how many of each period make up another period. The only restriction with custom calendars (there is a special built in case for the Gregorian calendar) is that the subperiods need to be fixed. So you cannot for example, if using a custom calendar, have months with varying numbers of days - it would have to fixed to, say, 30, for all months. The reason is that it would be impractical to calculate time differences if this were allowed. What this also implies is that you could only include the era in the calendar if the number of years per era was predetermined. If you need to advance the era at arbitrary times, then you'd have to manage the era number yourself independently of the time system. This shouldn't really be a problem, since by definition if eras are not fixed in advance, then you shouldn't have a need to set up timers outside of the current era anyway.

      As for day/night or seasonal effects, this isn't actually a part of the plugin, but the functionality is there to drive such systems very easily. You essentially can query for how far through a given time period you currently are. Say, ask the clock '"Proportion through 'Year'", and it will return a value in the range [0, 1], from which you can smoothly drive seasonal changes, maybe via a curve asset. Likewise for time of day, you just map the [0, 1] value proportionally to [0, 24] or however many hours you've defined to be in a day.
      Alternatively, if you don't need continuous, smooth changes, you can just register timers to trigger at a certain time of day/year/whatever, and update your effects then.

      Comment

      Working...
      X