Mejorar aspecto visual y configurar filtro nearest neighbor

- Cambiar tamaño de pelota de 8x8 a 10x10 píxeles
- Aclarar color de fondo de (32,32,32) a (64,64,64)
- Redibujar textura ball.png con mejor definición
- Implementar filtro nearest neighbor para texturas píxel-perfect
- Actualizar README.md con documentación completa del proyecto

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-15 08:25:18 +02:00
parent dd73ca3514
commit bd40109f57
5 changed files with 5 additions and 2 deletions

BIN
README.md

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 B

After

Width:  |  Height:  |  Size: 162 B

View File

@@ -5,7 +5,7 @@ constexpr char WINDOW_CAPTION[] = "vibe1_delta";
constexpr int SCREEN_WIDTH = 320; constexpr int SCREEN_WIDTH = 320;
constexpr int SCREEN_HEIGHT = 240; constexpr int SCREEN_HEIGHT = 240;
constexpr int WINDOW_SIZE = 3; constexpr int WINDOW_SIZE = 3;
constexpr int BALL_SIZE = 8; constexpr int BALL_SIZE = 10;
constexpr float GRAVITY_FORCE = 0.2f; constexpr float GRAVITY_FORCE = 0.2f;
constexpr Uint64 DEMO_SPEED = 1000 / 60; constexpr Uint64 DEMO_SPEED = 1000 / 60;

View File

@@ -235,7 +235,7 @@ void update()
// Renderiza el contenido en la pantalla // Renderiza el contenido en la pantalla
void render() void render()
{ {
SDL_SetRenderDrawColor(renderer, 32, 32, 32, 255); SDL_SetRenderDrawColor(renderer, 64, 64, 64, 255);
SDL_RenderClear(renderer); SDL_RenderClear(renderer);
for (auto &ball : balls) for (auto &ball : balls)

View File

@@ -79,6 +79,9 @@ bool Texture::loadFromFile(const std::string &file_path)
// Obtiene las dimensiones de la imagen // Obtiene las dimensiones de la imagen
width_ = loaded_surface->w; width_ = loaded_surface->w;
height_ = loaded_surface->h; height_ = loaded_surface->h;
// Configurar filtro nearest neighbor para píxel perfect
SDL_SetTextureScaleMode(new_texture, SDL_SCALEMODE_NEAREST);
} }
// Destruye la superficie cargada // Destruye la superficie cargada