I’ve not actually used Godot, but I’ve been following it for a while, and I think you should give it a go, especially for just “unserious playing around.” It’s widely regarded as beginner-friendly (as far as gamedev tools go), and yeah, while some people absolutely do not have the analytical mind you really should have for working with anything involving programming, you being in a position to do any scripting at all sounds like you’re at least most of the way there.
As someone who came into godot with programming knowledge, the whole signals thing was probably what took the longest to get used to, but now that I understand it it seems very simple. For code, the godot documentation is both accessible on the web and built into the engine, and it’s generally very thorough.
Here’s an intro guide to programming in godot that I wrote a little while ago:
expand
# If you don’t know how to do something, google it!# to write a comment, type a hashtag# lines are executed in sequence# words typed are variables, and can be assigned by typing "var" and then its name# GDScript uses the word "var", but leave out "var" in pythonvar x = 1var number = 5# display the value a variable holdsprint(number)
# you can do math, with +,-,*,/,% (modulus), ** (exponentiation), sqrt(), etcprint(number / 2)
# variables can be reassigned, by setting them equal to something else# variables that store numbers can be used as a number
number = 2 / x
number = number - 4# operations such as the one directly above can be simplified:
number -= 4#this does the same thing# variables can also hold:# true/false (aka Booleans)var thing = false# words, etc (aka Strings), surround in quotes
thing = "Hi, I'm Adrian"# lists of other data types
thing = [number, False, "Hi, I'm Adrian", 52.67]
# access elements of a list by using []# the first element in a list is element 0print(thing[1]) # will print False# you can reassign list elements
thing[1] = True
print(thing) # will print [-6, true, "Hi, I'm Adrian", 52.67]# you can add elements onto lists with __.append(), remove with __.pop()
thing.append(3.4)
print(thing) # will print [-6, true, "Hi, I'm Adrian", 52.67, 3.4]
thing.pop(2)
print(thing) # will print [-6, true, 52.67, 3.4]# similarly to how we can do math, we can also evaluate logic (conditionals)# 'and' will return true only if both inputs are true# 'or' will return true if either or both inputs are truevar bool1 = false# remember, thing[2] is now 52.67# here, thing[2] < 4 is false and bool1 is falseprint(thing[2] < 4or bool1) # will print false as both sides are false# to compare any data types, you can use == (equal to), != (not equal to)# to compare numbers, you can use <, >, <= (less than or equal to), >=# you can also use the words 'or', 'not', 'and'print(thing[2] != 3and not bool1) # will print true# 'If' statements will run code inside of them if they receive the value true# lines of code inside of the if statement will be indented one level# you can use the words if, else, elif (else if)# you can use conditionals here:iftrue:
print("is true")
#will print "is true"if thing[2] == 2:
print(thing)
print("as thing[2] == 2, we will not evaluate the rest of the if statement")
elif bool1: # is equivalent to writing "elif bool1 == True"print("bool1 is true")
else:
print("bool1 is not true")
#will print "bool1 is not true"# Loops operate over ranges and lists (aka iterables)# ranges work with the format range(stop), range(start,stop), or range(start,stop,step)# ranges start at 0 and step by 1 by defaultfor i in range(1,11):
print(i)
# will print 1,2,3,4,5,6,7,8,9,10 (stops before 'stop' number)# lists are also 'iterables'for i in [1,5,2]:
print(i * 2)
# will print 2,10,4# inside of the for loop, we can access this new variable I have called 'item'for item in thing:
print(item)
# will print -6, true, 52.67, 3.4# functions allow you to simplify code and remove re-used elements# you can put multiple things inside of the function's parenthesis,# which can be used as variables by code inside of your function# use "func" in GDScript, and "def" in Python
func repeated_sqrt(value, times):
for i in range(times): #will start at 0 and go up to times - 1
value = sqrt(value)
return value
# return will immediately exit out of the function,# and give this value to wherever the function was called# this function can be used as below:print(repeated_sqrt(5.2,3)) # will print sqrt(sqrt(sqrt(5.2)))var number1 = 1print(repeated_sqrt(thing[2],number1)) # will print sqrt(52.67)
number += repeated_sqrt(thing[2],2) + 1# will increase number by sqrt(sqrt(52.67)) + 1# function returns don't need to be used
func printvalue(value):
print(value)
return"hello"printvalue(2) #will print 2print(printvalue(3)) #will print 3,hello
I’ve not actually used Godot, but I’ve been following it for a while, and I think you should give it a go, especially for just “unserious playing around.” It’s widely regarded as beginner-friendly (as far as gamedev tools go), and yeah, while some people absolutely do not have the analytical mind you really should have for working with anything involving programming, you being in a position to do any scripting at all sounds like you’re at least most of the way there.
As someone who came into godot with programming knowledge, the whole signals thing was probably what took the longest to get used to, but now that I understand it it seems very simple. For code, the godot documentation is both accessible on the web and built into the engine, and it’s generally very thorough.
Here’s an intro guide to programming in godot that I wrote a little while ago:
expand
# If you don’t know how to do something, google it! # to write a comment, type a hashtag # lines are executed in sequence # words typed are variables, and can be assigned by typing "var" and then its name # GDScript uses the word "var", but leave out "var" in python var x = 1 var number = 5 # display the value a variable holds print(number) # you can do math, with +,-,*,/,% (modulus), ** (exponentiation), sqrt(), etc print(number / 2) # variables can be reassigned, by setting them equal to something else # variables that store numbers can be used as a number number = 2 / x number = number - 4 # operations such as the one directly above can be simplified: number -= 4 #this does the same thing # variables can also hold: # true/false (aka Booleans) var thing = false # words, etc (aka Strings), surround in quotes thing = "Hi, I'm Adrian" # lists of other data types thing = [number, False, "Hi, I'm Adrian", 52.67] # access elements of a list by using [] # the first element in a list is element 0 print(thing[1]) # will print False # you can reassign list elements thing[1] = True print(thing) # will print [-6, true, "Hi, I'm Adrian", 52.67] # you can add elements onto lists with __.append(), remove with __.pop() thing.append(3.4) print(thing) # will print [-6, true, "Hi, I'm Adrian", 52.67, 3.4] thing.pop(2) print(thing) # will print [-6, true, 52.67, 3.4] # similarly to how we can do math, we can also evaluate logic (conditionals) # 'and' will return true only if both inputs are true # 'or' will return true if either or both inputs are true var bool1 = false # remember, thing[2] is now 52.67 # here, thing[2] < 4 is false and bool1 is false print(thing[2] < 4 or bool1) # will print false as both sides are false # to compare any data types, you can use == (equal to), != (not equal to) # to compare numbers, you can use <, >, <= (less than or equal to), >= # you can also use the words 'or', 'not', 'and' print(thing[2] != 3 and not bool1) # will print true # 'If' statements will run code inside of them if they receive the value true # lines of code inside of the if statement will be indented one level # you can use the words if, else, elif (else if) # you can use conditionals here: if true: print("is true") #will print "is true" if thing[2] == 2: print(thing) print("as thing[2] == 2, we will not evaluate the rest of the if statement") elif bool1: # is equivalent to writing "elif bool1 == True" print("bool1 is true") else: print("bool1 is not true") #will print "bool1 is not true" # Loops operate over ranges and lists (aka iterables) # ranges work with the format range(stop), range(start,stop), or range(start,stop,step) # ranges start at 0 and step by 1 by default for i in range(1,11): print(i) # will print 1,2,3,4,5,6,7,8,9,10 (stops before 'stop' number) # lists are also 'iterables' for i in [1,5,2]: print(i * 2) # will print 2,10,4 # inside of the for loop, we can access this new variable I have called 'item' for item in thing: print(item) # will print -6, true, 52.67, 3.4 # functions allow you to simplify code and remove re-used elements # you can put multiple things inside of the function's parenthesis, # which can be used as variables by code inside of your function # use "func" in GDScript, and "def" in Python func repeated_sqrt(value, times): for i in range(times): #will start at 0 and go up to times - 1 value = sqrt(value) return value # return will immediately exit out of the function, # and give this value to wherever the function was called # this function can be used as below: print(repeated_sqrt(5.2,3)) # will print sqrt(sqrt(sqrt(5.2))) var number1 = 1 print(repeated_sqrt(thing[2],number1)) # will print sqrt(52.67) number += repeated_sqrt(thing[2],2) + 1 # will increase number by sqrt(sqrt(52.67)) + 1 # function returns don't need to be used func printvalue(value): print(value) return "hello" printvalue(2) #will print 2 print(printvalue(3)) #will print 3,hello