Saltar a contenido

Game Development - Guía de Entorno

Guía completa para desarrollo de videojuegos con Claude Code.

Capacidades de Claude Code

Capacidad Herramientas
2D/3D Games Unity, Unreal, Godot
Game Logic C#, C++, GDScript, Lua
Shaders HLSL, GLSL, Shader Graph
Assets Blender, Aseprite
Audio FMOD, Wwise
Multiplayer Photon, Mirror, Netcode
Build/Deploy Steam SDK, Platform SDKs

Unity

Instalación

# Unity Hub
# Windows
winget install Unity.UnityHub

# macOS
brew install --cask unity-hub

# Desde Unity Hub, instalar:
# - Unity LTS (2022.3.x o 2023.2.x)
# - Módulos: WebGL, Android, iOS según necesidad

Estructura de Proyecto

MyGame/
├── Assets/
│   ├── Scripts/
│   │   ├── Player/
│   │   ├── Enemies/
│   │   └── Managers/
│   ├── Prefabs/
│   ├── Scenes/
│   ├── Materials/
│   ├── Textures/
│   ├── Audio/
│   └── Animations/
├── Packages/
├── ProjectSettings/
└── MyGame.sln

IDE para Unity

# Rider (recomendado)
winget install JetBrains.Rider  # Windows
brew install --cask rider        # macOS

# Visual Studio (Windows)
# Se instala con Unity Hub

# VS Code
code --install-extension Unity.unity-debug
code --install-extension ms-dotnettools.csharp
code --install-extension kleber-swf.unity-code-snippets

Unity CLI

# Build desde línea de comandos
Unity -batchmode -projectPath /path/to/project -buildTarget StandaloneWindows64 -executeMethod BuildScript.Build -quit

# Ejecutar tests
Unity -batchmode -runTests -projectPath /path/to/project -testResults results.xml

Unreal Engine

Instalación

# Epic Games Launcher
# Windows: https://www.unrealengine.com/download

# Desde Launcher instalar UE5

# O compilar desde source (requerido para modificar engine)
git clone https://github.com/EpicGames/UnrealEngine
cd UnrealEngine
./Setup.bat  # Windows
./Setup.sh   # Linux/macOS
./GenerateProjectFiles.bat

IDE para Unreal

# Rider (recomendado)
# Soporte nativo para Unreal

# Visual Studio 2022
# Instalar workload "Game development with C++"

# VS Code
code --install-extension ms-vscode.cpptools
code --install-extension ms-vscode.cmake-tools

Unreal CLI

# Build proyecto
UnrealBuildTool.exe MyGame Development Win64

# Cookear contenido
RunUAT.bat BuildCookRun -project=/path/to/MyGame.uproject -cook -stage -pak -archive

# Automation tests
RunUAT.bat RunTests -project=/path/to/MyGame.uproject

Godot

Instalación

# Windows
winget install GodotEngine.GodotEngine

# macOS
brew install --cask godot

# Linux
flatpak install flathub org.godotengine.Godot

# Verificar
godot --version

Godot CLI

# Ejecutar proyecto
godot --path /path/to/project

# Export
godot --headless --export-release "Windows Desktop" /path/to/output.exe

# Ejecutar script
godot --headless --script res://scripts/my_script.gd

# Tests con GUT
godot --headless -s addons/gut/gut_cmdln.gd

IDE para Godot

# Editor integrado (recomendado para GDScript)

# VS Code (para C# con Godot .NET)
code --install-extension geequlim.godot-tools
code --install-extension ms-dotnettools.csharp

Frameworks Alternativos

Pygame (Python 2D)

pip install pygame

# Estructura típica
my_game/
├── main.py
├── game/
   ├── __init__.py
   ├── player.py
   ├── enemies.py
   └── levels.py
├── assets/
   ├── images/
   └── sounds/
└── requirements.txt

Love2D (Lua 2D)

# Windows
winget install love.love

# macOS
brew install love

# Ejecutar
love /path/to/game

# Estructura
my_game/
├── main.lua
├── conf.lua
├── player.lua
└── assets/

Raylib (C/C++)

# Windows (vcpkg)
vcpkg install raylib

# macOS
brew install raylib

# CMakeLists.txt
find_package(raylib CONFIG REQUIRED)
target_link_libraries(mygame raylib)

Bevy (Rust)

# Cargo.toml
[dependencies]
bevy = "0.13"

# Ejecutar
cargo run --release

Phaser (JavaScript/Web)

pnpm create vite@latest my-game -- --template vanilla-ts
cd my-game
pnpm add phaser

MonoGame (C#)

# Instalar templates
dotnet new install MonoGame.Templates.CSharp

# Crear proyecto
dotnet new mgdesktopgl -n MyGame

# Build
dotnet build
dotnet run

Herramientas de Assets

Blender (3D)

# Windows
winget install BlenderFoundation.Blender

# macOS
brew install --cask blender

# CLI
blender --background model.blend --python export_script.py

Aseprite (Pixel Art)

# Windows
winget install Aseprite.Aseprite

# macOS
brew install --cask aseprite

# CLI
aseprite -b sprite.aseprite --save-as sprite.png
aseprite -b sprite.aseprite --sheet spritesheet.png --data spritesheet.json

FMOD / Wwise (Audio)

# FMOD Studio
# https://www.fmod.com/download

# Wwise
# https://www.audiokinetic.com/download/

Version Control para Games

Git LFS (Archivos grandes)

# Instalar
git lfs install

# Trackear assets
git lfs track "*.png"
git lfs track "*.fbx"
git lfs track "*.wav"
git lfs track "*.mp3"

# .gitattributes generado:
# *.png filter=lfs diff=lfs merge=lfs -text
# *.fbx filter=lfs diff=lfs merge=lfs -text

.gitignore para Unity

# Unity
[Ll]ibrary/
[Tt]emp/
[Oo]bj/
[Bb]uild/
[Bb]uilds/
[Ll]ogs/
[Uu]ser[Ss]ettings/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
*.mdb
*.opendb
*.VC.db
*.pidb.meta
*.pdb.meta
*.mdb.meta

.gitignore para Unreal

# Unreal
Binaries/
DerivedDataCache/
Intermediate/
Saved/
*.VC.db
*.opensdf
*.opendb
*.sdf
*.suo
*.sln
*.xcworkspace
*.xcodeproj

Testing

Unity Test Framework

// Tests/EditMode/PlayerTests.cs
using NUnit.Framework;

public class PlayerTests
{
    [Test]
    public void Player_TakeDamage_ReducesHealth()
    {
        var player = new Player(100);
        player.TakeDamage(30);
        Assert.AreEqual(70, player.Health);
    }
}

Godot GUT

# tests/test_player.gd
extends GutTest

func test_player_takes_damage():
    var player = Player.new()
    player.health = 100
    player.take_damage(30)
    assert_eq(player.health, 70)

Comandos que Claude Code Ejecutará

# Unity
Unity -batchmode -projectPath . -executeMethod BuildScript.Build -quit
Unity -batchmode -runTests -testResults results.xml

# Godot
godot --headless --export-release "Windows Desktop" build/game.exe
godot --headless -s addons/gut/gut_cmdln.gd

# Unreal
RunUAT.bat BuildCookRun -project=MyGame.uproject -cook -pak

# Blender
blender -b model.blend --python script.py

# MonoGame
dotnet build
dotnet run

# Bevy
cargo run --release

Verificación del Entorno

#!/bin/bash
echo "=== Verificación Entorno Game Dev ==="

echo -e "\n--- Unity ---"
Unity -version 2>/dev/null || echo "Unity no en PATH"

echo -e "\n--- Godot ---"
godot --version 2>/dev/null || echo "Godot no instalado"

echo -e "\n--- Blender ---"
blender --version 2>/dev/null || echo "Blender no instalado"

echo -e "\n--- .NET (MonoGame/Unity) ---"
dotnet --version 2>/dev/null || echo ".NET no instalado"

echo -e "\n--- Rust (Bevy) ---"
cargo --version 2>/dev/null || echo "Rust no instalado"

echo -e "\n--- Git LFS ---"
git lfs version 2>/dev/null || echo "Git LFS no instalado"

echo -e "\n=== Verificación Completa ==="

Recursos