Skip to content

BlitStudio

NtinosTheGamer2324 edited this page Mar 7, 2026 · 1 revision

BlitStudio - Visual Game Creator

Create games without writing code! BlitStudio is a visual level editor for Blit Engine.

🎨 What is BlitStudio?

BlitStudio is a graphical tool that lets you design game levels by clicking and dragging instead of writing code.

Before BlitStudio:

// Manually place 50 objects in code... tedious!
Entity *e1 = blit_entity_create(100, 150, 32, 32, sprite);
Entity *e2 = blit_entity_create(250, 200, 32, 32, sprite);
// ... 48 more lines ...

With BlitStudio:

  1. Click, drag, place ✨
  2. Save level
  3. Load in game
  4. Done! 🎮

✨ Features

  • 📐 Visual editing - Click to place, drag to move
  • 🎯 Grid system - Perfect alignment
  • 💾 Save/Load - Persistent levels
  • 📤 Export code - Generate C code for games
  • 🎮 Test mode - Play instantly without compiling
  • 🎨 Multiple modes - SELECT, PAINT, ENTITY, COLLISION, TEST

🚀 Quick Start

Build & Run

# Compile
gcc -c blitstudio_main.c -o editor_main.o
gcc -c BlitStudio.c -o BlitStudio.o
gcc -c Blit Engine.c -o Blit Engine.o

# Link
ld -T user.ld editor_main.o BlitStudio.o Blit Engine.o lib_NodGL.a libc.a -o BlitStudio.sqr

# Run
./BlitStudio.sqr

Basic Usage

  1. Press TAB to switch modes
  2. Click to place objects (ENTITY mode)
  3. Drag to move objects (SELECT mode)
  4. Press Ctrl+S to save
  5. Press ESC to exit

🎮 Editor Modes

Mode Purpose
SELECT Select and move objects
PAINT Draw sprites pixel-by-pixel
ENTITY Place game entities
COLLISION Add collision boxes
TEST Play your level instantly

⌨️ Keyboard Shortcuts

Key Action
TAB Cycle modes
F1 Toggle help
G Toggle grid
Ctrl+S Save level
Ctrl+O Load level
Ctrl+E Export as code
DELETE Delete selected
ESC Exit

📖 Documentation

🎯 Example Workflow

Creating a Level

1. Start editor → ./BlitStudio.sqr
2. Press TAB → Switch to ENTITY mode
3. Click around → Place enemies, items
4. Press TAB → Switch to SELECT mode  
5. Drag objects → Fine-tune positions
6. Press Ctrl+S → Save level
7. Press Ctrl+E → Export code

Using in Game

#include "level.c"  // Generated by BlitStudio

int md_main() {
    Blit Engine engine;
    blit_init(&engine);
    
    load_level();  // Loads all objects!
    
    // Game loop...
    
    blit_shutdown(&engine);
    return 0;
}

📁 Files

In userland/:

  • BlitStudio.h - Editor API
  • BlitStudio.c - Editor implementation
  • blitstudio_main.c - Main application

Generated Files:

  • level.dat - Binary level data
  • level.c - Exported C code

🎨 Interface Overview

+--------------------------------------------------------+
| Mode: SELECT | Objects: 5 | Grid: ON     [TOOLBAR]    |
+--------------------------------------------------------+
| Objects  |                                             |
| -------- |        [MAIN CANVAS - Your Level]          |
| Player   |                                             |
| Enemy_1  |     Click to place, drag to move objects   |
| Coin_1 ✓ |                                             |
|  [PANEL] |                   [GRID]                   |
+--------------------------------------------------------+
| X:256 Y:192          Status messages      [STATUS]    |
+--------------------------------------------------------+

🔧 Use Cases

Level Design

Create platformer levels, puzzle layouts, and game maps visually.

Rapid Prototyping

Test different layouts without recompiling.

Learning

Understand game design concepts hands-on.

Asset Preview

See how sprites look in your game.

📊 Specifications

  • Max Objects: 256 per level
  • Grid Size: Adjustable (default 32px)
  • File Format: Binary (.dat) or C code (.c)
  • Supported Types: Entities, Collision boxes, Sprites

🎓 Learning Path

Complete Beginner:

  1. Read Introduction
  2. Follow Getting Started
  3. Create a simple 5-object level
  4. Export and use in a test game

Intermediate:

  1. Learn all 5 modes
  2. Create complex multi-layer levels
  3. Use collision boxes effectively
  4. Integrate with Blit Engine games

Advanced:

  1. Extend BlitStudio code
  2. Add custom object types
  3. Create editor tools
  4. Build game-specific editors

🐛 Known Limitations

Current version:

  • ❌ No undo/redo
  • ❌ No copy/paste
  • ❌ Single level at a time
  • ❌ Basic sprite editor
  • ❌ No layer system

Future improvements planned!

🤝 Contributing

Want to improve BlitStudio?

Ideas:

  • Add undo/redo system
  • Improve sprite editor
  • Add more drawing tools
  • Create object templates
  • Better file formats
  • Multi-level projects

📜 License

BlitStudio is part of the ModuOS project.
Licensed under GPL v2.0


Ready to create games visually? Get Started →

Need the game engine? [Blit Engine →](../Blit Engine/README.md)

Clone this wiki locally