Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

How to make your game have date and time *******************

I want to know how to make my game have time at the top.
like an actual time. so it can be like 12:30PM
or like 1:12AM

and i want to know how to make a date system. so everytime the clock goes past
midnight, a day goes by in the game. And you can also check the date on a calender.

howww to do !~? :angel:
 
Scripting would be much less of a hassle. I'm no coder, but I did manage to have time show up on the menu on my game:

2qbszo1.jpg

I am using the Advanced Time System by Dubealex and Near Fantastica. With a few edits to Scene_Menu, I replaced the Step Count and Playtime(because who really needs those?) with Time and Date.

Code:
####################

# Window_PlayTime2 #

####################

class Window_PlayTime2 < Window_Base

def initialize

super(0, 0, 160, 96)

self.contents = Bitmap.new(width - 32, height - 32)

refresh

end

  def refresh

    return if Graphics.frame_count % 10 != 0

    self.contents.clear

    self.contents.font.color = text_color(0) 

    self.contents.draw_text(20, 26, 120, 32, "Time.: " +$ats.clock)

    self.contents.draw_text(20, 40, 120, 32, "Weather.: " + $ats.weather_is)

  end

def update

super

if Graphics.frame_count / Graphics.frame_rate != @total_sec

refresh

end

end

end

Code:
#################

# Window_Steps2 #

#################

class Window_Steps2 < Window_Base

def initialize

super(0, 0, 160, 96)

self.contents = Bitmap.new(width - 32, height - 32)

refresh

end

def refresh

self.contents.clear

self.contents.font.color = normal_color

self.contents.draw_text(24, 32, 120, 32, "" +$ats.full_date)

end

end

That's all the help I can offer!
If you're set on a HUD, I can't help you much there.
 
If you want a hud, a full Day/Night, weather, and dates and such, I would recommend looking into eharper256's Dynamic Time System. It has everything that you asked for in your post so it should be what you are looking for. If you search the site you should find it.

Hope this helps!
~xgamexfreakx
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top