game-programming-languages

SKILL.md

Game Programming Languages

C# (Unity)

Easiest to learn, most used for game dev

// βœ… Production-Ready: Unity MonoBehaviour Template
public class GameEntity : MonoBehaviour
{
    [SerializeField] private float _speed = 5f;
    [SerializeField] private int _health = 100;

    public event Action<int> OnHealthChanged;
    public event Action OnDeath;

    private Rigidbody _rb;
    private bool _isInitialized;

    private void Awake()
    {
        _rb = GetComponent<Rigidbody>();
        _isInitialized = true;
    }

    public void TakeDamage(int amount)
    {
        if (!_isInitialized) return;

        _health = Mathf.Max(0, _health - amount);
        OnHealthChanged?.Invoke(_health);

        if (_health <= 0)
            OnDeath?.Invoke();
    }
}

Key Features:

  • Object-oriented, managed memory
  • LINQ for data queries
  • Coroutines for async game logic
  • Events and delegates
  • Garbage collection (requires optimization)

Learning Path: 2-3 weeks basics, 2-3 months mastery

C++ (Unreal Engine)

Most powerful, steepest learning curve

// βœ… Production-Ready: Unreal Actor Template
UCLASS()
class MYGAME_API AGameEntity : public AActor
{
    GENERATED_BODY()

public:
    AGameEntity();

    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats")
    float Speed = 500.0f;

    UPROPERTY(ReplicatedUsing = OnRep_Health)
    int32 Health = 100;

    UFUNCTION(BlueprintCallable, Category = "Combat")
    void TakeDamage(int32 Amount);

    DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnHealthChanged, int32, NewHealth);
    UPROPERTY(BlueprintAssignable)
    FOnHealthChanged OnHealthChanged;

protected:
    virtual void BeginPlay() override;

    UFUNCTION()
    void OnRep_Health();
};

Key Features:

  • Manual memory management (smart pointers)
  • Templates and STL
  • Maximum performance
  • Unreal reflection system (UPROPERTY, UFUNCTION)
  • Blueprint integration

Learning Path: 4-6 weeks basics, 4-6 months proficiency

GDScript (Godot)

Python-like, easiest syntax

# βœ… Production-Ready: Godot Node Template
extends CharacterBody2D
class_name GameEntity

signal health_changed(new_health: int)
signal died

@export var speed: float = 200.0
@export var max_health: int = 100

var _health: int = max_health

func _ready() -> void:
    _health = max_health

func take_damage(amount: int) -> void:
    _health = max(0, _health - amount)
    health_changed.emit(_health)

    if _health <= 0:
        died.emit()
        queue_free()

func _physics_process(delta: float) -> void:
    var direction = Input.get_vector("left", "right", "up", "down")
    velocity = direction * speed
    move_and_slide()

Key Features:

  • Dynamic typing with optional type hints
  • Simple, Python-like syntax
  • Signals for messaging
  • First-class functions
  • Growing ecosystem

Learning Path: 1-2 weeks basics, 4-8 weeks proficiency

Language Comparison

Feature C# (Unity) C++ (Unreal) GDScript
Memory Managed (GC) Manual Managed
Speed Fast Fastest Moderate
Learning Moderate Hard Easy
Typing Static Static Dynamic
Industry Mobile/Indie AAA Indie

πŸ”§ Troubleshooting

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ PROBLEM: Garbage collection spikes in C#                   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ SOLUTIONS:                                                   β”‚
β”‚ β†’ Use object pooling                                        β”‚
β”‚ β†’ Avoid allocations in Update()                             β”‚
β”‚ β†’ Cache GetComponent results                                β”‚
β”‚ β†’ Use structs for small data                                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ PROBLEM: Memory leaks in C++                                β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ SOLUTIONS:                                                   β”‚
β”‚ β†’ Use TSharedPtr/TWeakPtr                                   β”‚
β”‚ β†’ UPROPERTY for UObject pointers                            β”‚
β”‚ β†’ Run memory profiler regularly                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Best Practices

Practice Benefit
Consistent naming Readable code
Early returns Reduced nesting
Composition over inheritance Flexible design
Cache frequently used values Performance

Use this skill: When learning game programming languages or optimizing code.

Weekly Installs
33
GitHub Stars
16
First Seen
Jan 24, 2026
Installed on
codex27
claude-code26
gemini-cli25
cursor25
opencode25
github-copilot21