All Projects → Calinou → Godot Style Guide

Calinou / Godot Style Guide

Licence: other
Style guide for Godot projects

Projects that are alternatives of or similar to Godot Style Guide

Godot Next
Godot Node Extensions - Basic Node Extensions for Godot Engine
Stars: ✭ 438 (+873.33%)
Mutual labels:  godot, godot-engine
Godotnotificationcenter
A notification center for Godot Engine
Stars: ✭ 43 (-4.44%)
Mutual labels:  godot, godot-engine
Godot 2d Space Game
A 2D space exploration and mining game made with Godot and our AI framework
Stars: ✭ 462 (+926.67%)
Mutual labels:  godot, godot-engine
Mdframework
A multiplayer C# game framework for Godot 3.2 Mono.
Stars: ✭ 34 (-24.44%)
Mutual labels:  godot, godot-engine
Space rocks
Asteroids-like game made with Godot Engine 3.0.
Stars: ✭ 20 (-55.56%)
Mutual labels:  godot, godot-engine
Godot Power Pitch
International pitch for the Godot Game Engine, made in Godot, available in 15+ languages
Stars: ✭ 348 (+673.33%)
Mutual labels:  godot, godot-engine
Godot Open Rpg
Learn to create turn-based combat with this Open Source RPG demo ⚔
Stars: ✭ 855 (+1800%)
Mutual labels:  godot, godot-engine
viewport-spy
Godot editor UI to spy on what a Viewport is rendering. Useful for debugging.
Stars: ✭ 28 (-37.78%)
Mutual labels:  godot, godot-engine
Godotsteam
Steam API for the Godot game engine
Stars: ✭ 746 (+1557.78%)
Mutual labels:  godot, godot-engine
Gut
Godot Unit Test. Unit testing tool for Godot Game Engine.
Stars: ✭ 670 (+1388.89%)
Mutual labels:  godot, godot-engine
Godot Android Admob Plugin
Android AdMob plugin for Godot Game Engine 3.2 or higher
Stars: ✭ 292 (+548.89%)
Mutual labels:  godot, godot-engine
Gdtwitch
A Godot to IRC to Twitch interface.
Stars: ✭ 42 (-6.67%)
Mutual labels:  godot, godot-engine
Godello
Trello inspired kanban board made with the Godot Engine and GDScript, powered by an online real-time collaborative backend (Elixir and Phoenix Channels)
Stars: ✭ 273 (+506.67%)
Mutual labels:  godot, godot-engine
Godot Platformer 2d
2d Metroidvania-inspired game for the 2019 GDquest Godot Kickstarter course project.
Stars: ✭ 365 (+711.11%)
Mutual labels:  godot, godot-engine
Godot Go
Go language bindings for the Godot Engine's GDNative API.
Stars: ✭ 254 (+464.44%)
Mutual labels:  godot, godot-engine
Godot Steering Ai Framework
A complete framework for Godot to create beautiful and complex AI motion. Works both in 2D and in 3D.
Stars: ✭ 482 (+971.11%)
Mutual labels:  godot, godot-engine
godot-interpolated-camera3d
Provides an InterpolatedCamera3D node that replicates its 3.2.x functionality (and more)
Stars: ✭ 40 (-11.11%)
Mutual labels:  godot, godot-engine
godot-performance-comparison
Godot performance comparison between the `3.x` and `master` branch
Stars: ✭ 12 (-73.33%)
Mutual labels:  godot, godot-engine
Godot Tiled Importer
Plugin for Godot Engine to import Tiled Map Editor tilemaps and tilesets
Stars: ✭ 488 (+984.44%)
Mutual labels:  godot, godot-engine
Godot Addon Template
Repository template with a standard structure for Godot add-ons. Usage: Create a new repository based on this template and replace uppercase strings (LIKE_THIS) accordingly.
Stars: ✭ 23 (-48.89%)
Mutual labels:  godot, godot-engine

Godot style guide


This guide is deprecated since Godot 3.0's release. See the official GDScript style guide instead.


This is an unofficial style guide for Godot, a free, libre and open source game engine.

Conventions used in this document

  • snake_case is like_this.
  • camelCase is likeThis.
  • PascalCase is LikeThis.
  • UPPER_SNAKE_CASE is LIKE_THIS.

Naming

  • Use UPPER_SNAKE_CASE for constants.
  • Use snake_case for variables and functions.
  • Use snake_case for input map names.
  • Use snake_case for all file names.
  • Use PascalCase for node names.
  • Use PascalCase for classes.

Functions

  • Function arguments should have a space after each comma, like this:
func my_function(a, b, c):
    pass

Comments

  • Begin comments with an uppercase letter, unless you are referencing a function or a variable. Do not end them with a period, unless the comment has several sentences.

  • Comments should have a space after the # symbol, and should be indented as usual.

Example:

# Outputs "Hello world!" to console
print("Hello world!")

Indentation

  • Always use tabs for indentation, GDScript does not like spaces anyway.

Line lengths

  • Try to keep lines under 80 characters. Disregarding this guideline at times is acceptable, but over 100 characters is definitely too much.

Spacing

  • Put spaces around operators. Example:
print(str(5 * 40 + 2))

File types and extensions

  • In most cases, you should use .tscn scenes and .tres resources as those are more friendly towards version control systems.

Directory structure

Follow this page as for directory structure.

.gitignore

If using Git, you should use a .gitignore file that ignores certain patterns from being added to your Git repository. It should be placed at the root of the game folder. Here's an example that will suit most Godot projects:

.import/
.fscache
*~

Contributing to this document

Contributions are welcome, feel free to discuss on the issues.

License

Copyright (c) 2015-2017 Hugo Locurcio and contributors

CC0 1.0 Universal, see LICENSE.md.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].