gdquest-demos / godot-2d-space-game

A 2D space exploration and mining game made with Godot and our AI framework
MIT License
838 stars 109 forks source link

Code review and documentation #16

Closed Razoric480 closed 4 years ago

Razoric480 commented 4 years ago

Code Review

This entails going through the code base and refactoring chunks of code to clean it up. A few shortcuts were taken in the development, and due diligence wasn't always followed to do clean architecture.

Documentation

While this isn't exactly an educational tool, some documenting and highlighting could still go a long way to helping people learn from it.

NathanLovato commented 4 years ago

I'll do a first review pass now

NathanLovato commented 4 years ago

For get nodes, you can't use type inference. Below, the type of both vars is Node:

onready var tween := $Tween
onready var fadeout := $FadeOut
Razoric480 commented 4 years ago

Auto-complete seems to pick up that it's a tween, because it shows interpolate_property/callback/method and start.

NathanLovato commented 4 years ago

Ah, so they might have fixed that. Good to know!