Hello World!
Hey there! This is my first time actually using Itch as a developer!
Weird being here, but I'm so glad I am.
If you don't know what Graphite is, well then here you go!
Graphite is a Godot port of Carbon from PHP (hence the name Graphite, since Graphite is Pure Carbon). It's an easier way to handle datetime in your games, apps, or whatever else you want to build in Godot. It's especially useful in terms of games than handle datetime in the "now" sense, but it can be used in other scenarios too!
Let's take a look at a scenario where Graphite is useful:
Time-based sim games
Let's say you have a game that takes place starting the day the player starts the game. Now let's say your game's time speed is done per day, and every 5 seconds is an in-game day.
@onready day_year_label: Label = $DayYearLabel
var datetime: Graphite
func _ready():
datetime = Graphite.now() # We'll say that the day is October 12, 2025
func _process():
# Some fancy way to check if 5 seconds has passed
datetime.addDay()
day_year_label.text = datetime.format("l, F j, Y") # Sets text to: Tuesday, August 12, 2025"
Of course, I could go through thousands of scenarios where getting the date/time make sense, and you can even set the datetime in multiple ways (even doing just Graphite.today() gets the start of the today), which is why in the Itch download I included the docs folder I made in GitHub.
Files
Get Graphite
Graphite
Better datetime management in Godot.
| Status | In development |
| Category | Tool |
| Author | TheECGaming |
| Tags | addon, gdscript, Godot, tool |

Leave a comment
Log in with itch.io to leave a comment.