aaron-tamarin

@aaron-tamarin.bsky.social

Golden Tamarin is my "Studio Name" - https://www.golden-tamarin.com Elevation Tower Defense - https://store.steampowered.com/app/4009360/Elevation_Tower_Defense/ PawnUp! - https://golden-tamarin.itch.io/pawn-up

Waah - I'm a profitable $400 BILLION dollar company and can't help but raise my prices!! Boo hoo - take a pay cut, Tim Cook... We all spent the last 10-20 years reading about how Apple was one of the most profitable companies of all time... #apple thehill.com/policy/techn...

Apple raising prices, CEO says

Apple CEO Tim Cook told The Wall Street Journal in an interview that his company is raising its prices. In an interview published Wednesday by the Journal, Cook said the tech company is set to incr…

thehill.com

So if you have a grid of textureRects and you want to display things by coloring them, you can take what you want to display, send it to an offscreen subviewport, resize it to your grid of textureRects, extract it as an image and check each pixel to drive which rects to display #godot

Perhaps someone has a better approach. In #godot I have a label with text and a randomly selected font which I want maximized in size to visually fill the label. So I determine the % diff of the label size to the font's text size and then multiply the font size to that %. #fonts

Screen shot of the following code:

		# final font sizing
		# tmpRect == label, only attempt if label has text or get_string_size will error
		if tmpRect.text != "":
			# set font to a starting size, doesn't matter what
			tmpRect.label_settings.font_size = 20
			var string_size
			# if single line, use get_string_size - if long enough to be multiline, use get_multiline_string_size
			if tmpRect.text.length() < 14:
				string_size = tmpRect.label_settings.font.get_string_size(tmpRect.text, HORIZONTAL_ALIGNMENT_CENTER, tmpRect.size.x, tmpRect.label_settings.font_size)
				# pad the value slightly for better results
				string_size.y += 10
			else:
				string_size = tmpRect.label_settings.font.get_multiline_string_size(tmpRect.text, HORIZONTAL_ALIGNMENT_CENTER, tmpRect.size.x, tmpRect.label_settings.font_size)
				# pad the value slightly for better results
				string_size.y += 15
			# compute the percent size difference for X and Y axes 
			var tmpX = tmpRect.size.x/string_size.x
			var tmpY = tmpRect.size.y/string_size.y
			# sort of average them to get a resizing multiplier (.5 results were too big, so downsized to .35 via trial and error)
			var fontMultiplier = (tmpX + tmpY)*.35
			# apply the multiplier to the font size
			tmpRect.label_settings.font_size *= fontMultiplier

Tip: #godot has a good built-in file/directory chooser, but when your project is running on a #raspberrypi with a 3.5" screen, the file listing scroll bar winds up being like 3 pixels wide and nearly impossible to use via touch - you can create a theme override though to make it much wider.

Screen shot of godot file chooser with tiny scrollbarScreen shot of Godot file chooser with wide scroll barScreen shot of Godot theme manager setting an override on VScrollBarScreen grab of Godot StyleBoxFlat settings highlighting content margins

[sound] Redid this effect as a 2DMultiMesh and its much lighter weight (now runs on a Pi4 with plenty of processor room to spare) - originally this was done by instantiating ColorRects and queue_free'ing them, but ColorRects aren't free candy you can sprinkle everywhere🤔 #godot #raspberrypi #clock

aaron-tamarin@aaron-tamarin.bsky.social · 6mo ago

[sound] Playing with the maths for a more interesting visual and making clocky show the #clock - also you might notice my janky #bpm syncing kicking in - first track (the guitar) controls the rhythm in this case. #godot #music #visualizations