Posted August 20, 2018 by puppetmaster
#godotengine #tutorial
!! this tutorial can also work with the new 3.x version Godot, but in certain places there are already bigger differences !!
to adjust the project settings according to the game type.
For a perfect 64x64 pixel game that looks correct no matter what the scale,
the following settings have to be made:
When everything is set I create the main scene. It always gets the same name in my games and is always in the root of the project structure.
All other scenes are placed in the scene folder and, if necessary, in other sub directories.
Pictures, music and sound effects are stored in the resources folder.
Next I think about which game element is the most important
T H E T I L E
load the images an set it to the puzzle type node
var texture = load("res://ressources/images/switzerland_"+str(puzzleNr)+".png") get_node("tiles/type_0").set_texture(texture)
set the tile position (automatically cut image in 4x4 parts and set the right one)
get_node("tiles/type_0").set_frame(tileNr)
move tile up
func move(): if global.canMove: OS.set_low_processor_usage_mode(false) if !rayUp.is_colliding() && position > 3: global.canMove = false tween.interpolate_property(self,"transform/pos", get_pos(),Vector2(get_pos().x,get_pos().y-16), moveSpeed,Tween.TRANS_LINEAR,Tween.EASE_OUT_IN) tween.start() get_node("effects/up/sprite/AnimationPlayer").play("on") yield(tween,"tween_complete") position -= 4 playMoveSound() global.canMove = true
If you have detailed questions you can ask them, I will try to answer them as good as possible.
Have fun!!