Date, time, timestamps (mobile) [Game Maker Studio 2 | Advanced] @1upIndie
Date, time, timestamps (mobile) [Game Maker Studio 2 | Advanced]  @1upIndie
Uploaded June 2022 | Updated September 2026, 1 hour ago
This advanced video tutorial shows you how to utalize the current time, dates or even use time stamps for saving in mobile devices in GameMaker.

Image this, you want to have create a mobile game where you time game your content. The problem is once you close you application you cannot count the time passed directly. How to fix this? With saving in an .ini file the old time stamp/date and read it out (plus compare) once you open the applicaion/game again.

There are different things you can do with the internal time (time_current) or time stamps. First of all you can read out from your local machine (pc/mobile) the time there like minutes, hours up to years if you like, change the time zone or create your own time (stamps) or read out how many days have passed in this year/month/week etc. . That is in most cases not very useful information but you can use those metrics to store them in a time stamp which you create once you close the application. Next time you open the game/application you can compare the old time stored with the current one and even calculate the difference which the most common use case for mobile games. That's it!

// for clarification
current_time: read out internal time passed in application
current_day/current_hour etc. : local values from pc/mobile
date_get_hour: read out also hour but with a argument time
date_current_datetime: the timestamp of the local machine's current time
date_datetime_String: read out a full readable string of the timestamp
date_hour_span: Calculate the difference (here in hours) between two timestamps


// Video on saving with .ini:
youtu.be/r6N_mAmpT7s

Official manual on date and time:
manual-en.yoyogames.com/#t=GameMaker_Language%2FGML_Reference%2FMaths_And_Numbers%2FDate_And_Time%2FDate_And_Time.htm

// images from the thumbnail:
opengameart.org/content/some-phone-templates-ctatz
opengameart.org/content/fight-20-kids-game-concept


๐Ÿ‘‘ Support me and get fresh game art and game maker projects every month:
patreon.com/1upindie

Follow me on:
๐Ÿ“ธ Instangram: instagram.com/1upindie
๐Ÿฆ Twitter: twitter.com/1upIndie
๐Ÿ’ฌ Discord: discord.gg/gvr98nb
๐Ÿ“œ Udemy: udemy.com/course/become-a-video-game-developer-with-gms-23 (See youtube about page for discount)


----------------------------------------------------------------------------------------
0:00 What we will do
1:01 Subscribe
1:12 Use case for storing time
2:32 General uses
6:45 Practical part for mobiles
Date, time, timestamps (mobile) [Game Maker Studio 2 | Advanced]Patch V2022.5 - Weather effect + features [GameMaker Studio 2]Seasons change effect - quick n dirty  [GameMaker Studio 2 | Vfx]Some really good new features [GameMaker Update 2023.8]Scope and encapsulation [Game Maker | Most know Basics]Orbiting bubble shield Megaman style [Game Maker Studio 2 | Basics]๐Ÿ”ดVignette - The very easy way [GameMaker | Vfx]First impression mattes [Super Demon Survivors devlog #2]How to make a world map [Game Maker Studio 2 | Basics]How to move diagonal correctly [Game Maker Studio 2 | Basics]Random ground generation [#2 Vampire Survivors Remake in GameMaker ]Text/dialog box - Quick and dirty with Scribble [GameMaker]
1up Indie |

Date, time, timestamps (mobile) [Game Maker Studio 2 | Advanced]

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER