Skip to content

Instantly share code, notes, and snippets.

@dploeger
Last active April 18, 2018 03:26
Show Gist options
  • Save dploeger/596e7b2917dd16d97ab2a983eb0c2231 to your computer and use it in GitHub Desktop.
Save dploeger/596e7b2917dd16d97ab2a983eb0c2231 to your computer and use it in GitHub Desktop.
Migration Notes Godot 2 => Godot 3
@mhilbrunner
Copy link

mhilbrunner commented Dec 13, 2017

Moar notes (6+ months old, but anyway): https://hastebin.com/soxarekito.pl

Thanks, I've updated some things but don't know, how up to date many of the notes are now.

✔️

@RiverMesa
Copy link

RiverMesa commented Dec 13, 2017

Might want to mention that direct property access/modification is a thing now, as opposed to using setters & getters (unless there's no corresponding property for them, of course).

✔️

@mrcdk
Copy link

mrcdk commented Dec 13, 2017

Another new thing: you can modify the properties of core classes independently for example when using a tween or as an animation track. For example, if you want to tween only the x position of a sprite you can do:
$Tween.interpolate_property(self, "position:x", position.x, position.x + 100, 2, Tween.TRANS_LINEAR, Tween.EASE_IN)

More info here godotengine/godot#12284

✔️

@dploeger
Copy link
Author

dploeger commented Jan 3, 2018

Thanks, everybody. I've updated the gist.

@Nutriz
Copy link

Nutriz commented Jan 6, 2018

According to godotengine/godot#15374 (comment)

create or create_from_data() must be called after Image.new()

2.1 :

var img = Image.new()
img.lock()
img.set_pixel(x, y, color) # Works
img.unlock()

3.0

var img = Image.new()
img.create(1, 1, false, Image.FORMAT_RGBA8)
img.lock()
img.set_pixel(x, y, color) # Works
img.unlock()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment