Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Godot for Unity Developers

Godot for Unity Developers

An overview of the Godot Engine game development environment along with comparisons to Unity.

LD Smith

July 09, 2017
Tweet

More Decks by LD Smith

Other Decks in Programming

Transcript

  1. Why Use It? • Free, no "pro" version required for

    number of sales • MIT licensed, open source, you can view the code or even contribute • Runs on many "open" operating systems • No splash screen • If you like Python (GDScript) over C#/Javascript, faster code editor • It's the "cool" thing to do right now • More stable than Unity? – Infinte loops just crash the game, not the entire editor. – By now Unity should be able to easily break out of infinte loops
  2. Installing • Highly recommend getting the version from Steam –

    Also free • Building yourself isn’t simple
  3. Comparisons with Unity • GameObject > Nodes • Nodes are

    hierarchical • No components - Can be confusing, collider, rigid body • Inspector - same, ordered from lowest subclass to highest • Spatial is the base 3D Node -Transform like GameObject, with position, rotation, and scale • Only one script can be attached to an object, must have filename • void Start() > func _ready() • void Update() > func _process(delta): – must call set_process(true) in _ready()! • Time.deltaTime > delta • Phyton style language for scripting (at least it has visual tabs)
  4. Comparisons with Unity (continued) • Project Assets tab > FileSystem

    – Assets (sound effects, fonts, meshes, textures) have to be manually imported, unlike Blender • Scenes are same as Unity scenes – Camera, directional light • Prefabs don't exist – Make new scene – Instantiate scene and add it to a node – Instantiate(gameObject, Vector3) > preload("res://path/scene.tscn").instance() • Application.load_level > Switching scenes is a hassle – Problems happen when having two Nodes with the same name in two different scenes • Internally, they get named differently • Game view > Click camera and press preview (can't update in real time)
  5. Comparisons with Unity (continued) • AudioSource > StreamPlayer (music), SamplePlayer

    (Sounds) • "Play mode" is limited, can't view changes in scene • GameObject.Find > get_node("/root/path") – check has_node("/root/path") first • No need to call GetComponent<Script>() to get a script variable on a Node • No data types, use str(variable), float(variable), etc to convert • Build settings > Export • Project Settings, Input > Project Settings > Input Map – Input.GetButtonDown("FIRE1") > Input.is_action_pressed("FIRE1") • Particle system is limited (no fade over time) but sufficient
  6. Annoyances • Intellisense isn't that great, usually doesn't detect methods

    on Node type • Spinning thing every time screen is painted • Limitations on moving in 3D view (no right click + ASWD FPS controls) – Middle Mouse - rotate – Ctrl + Middle Mouse - zoom – Shift + Middle Mouse - translate • Ambient light in 3D view doesn't apply to actual game
  7. What It Doesn’t Have • Animation import is limited •

    No direct Blender import – Must be exported to OBJ or Collada first – Collada must be imported as a scene • Limited Asset Store • No PlayMaker equivalent • Tutorials seemed to be focused on 2D games
  8. What It Does Have • Signals, actions that can be

    applied to the selected Node – Autofills script • Simple 2D, 3D, and Script views – Better than waiting on Visual Studio / MonoDevelop to load • Docs – http://docs.godotengine.org/en/stable/ – Not many examples • Use "pass" for a method with no code