docs: clean up personal references for public use
This commit is contained in:
@@ -10,7 +10,7 @@ ReiLua includes a built-in asset loading system with a nice loading screen UI th
|
|||||||
- Smooth progress bar with shimmer effect
|
- Smooth progress bar with shimmer effect
|
||||||
- Progress percentage (e.g., "3 / 10")
|
- Progress percentage (e.g., "3 / 10")
|
||||||
- Current asset name being loaded
|
- Current asset name being loaded
|
||||||
- Dark, professional color scheme
|
- Dark, clean color scheme
|
||||||
- **Easy to Use** - Just 3 functions to show loading progress
|
- **Easy to Use** - Just 3 functions to show loading progress
|
||||||
- **Works Everywhere** - Development and release builds
|
- **Works Everywhere** - Development and release builds
|
||||||
|
|
||||||
@@ -266,7 +266,7 @@ RL.EndAssetLoading()
|
|||||||
- You have more than 5-10 assets to load
|
- You have more than 5-10 assets to load
|
||||||
- Assets are large (images, sounds, fonts)
|
- Assets are large (images, sounds, fonts)
|
||||||
- Loading might take more than 1 second
|
- Loading might take more than 1 second
|
||||||
- You want professional loading feedback
|
- You want polished loading feedback
|
||||||
|
|
||||||
**You can skip it when:**
|
**You can skip it when:**
|
||||||
- You have very few, small assets
|
- You have very few, small assets
|
||||||
@@ -275,11 +275,11 @@ RL.EndAssetLoading()
|
|||||||
|
|
||||||
## ✨ Benefits
|
## ✨ Benefits
|
||||||
|
|
||||||
- ✅ Professional user experience
|
- ✅ Polished user experience
|
||||||
- ✅ User knows the game is loading, not frozen
|
- ✅ User knows the game is loading, not frozen
|
||||||
- ✅ Shows progress for large asset sets
|
- ✅ Shows progress for large asset sets
|
||||||
- ✅ Works with embedded assets
|
- ✅ Works with embedded assets
|
||||||
- ✅ Minimal code required
|
- ✅ Minimal code required
|
||||||
- ✅ Beautiful default UI
|
- ✅ Beautiful default UI
|
||||||
|
|
||||||
The loading system makes your game feel polished and professional with just a few lines of code!
|
The loading system makes your game feel polished with just a few lines of code!
|
||||||
|
|||||||
401
CUSTOMIZATION.md
Normal file
401
CUSTOMIZATION.md
Normal file
@@ -0,0 +1,401 @@
|
|||||||
|
# Customizing Your ReiLua Executable
|
||||||
|
|
||||||
|
This guide explains how to customize the ReiLua executable with your own branding.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
You can customize:
|
||||||
|
- Executable name
|
||||||
|
- Window icon
|
||||||
|
- File properties (company name, version, description, etc.)
|
||||||
|
- Splash screen text and logos
|
||||||
|
- Loading screen appearance
|
||||||
|
|
||||||
|
## Quick Customization Checklist
|
||||||
|
|
||||||
|
- [ ] Change executable name in CMakeLists.txt
|
||||||
|
- [ ] Replace icon.ico with your game icon
|
||||||
|
- [ ] Edit resources.rc with your game information
|
||||||
|
- [ ] Customize splash screens in src/splash.c
|
||||||
|
- [ ] Replace logo images in logo/ folder
|
||||||
|
- [ ] Rebuild the project
|
||||||
|
|
||||||
|
## 1. Changing the Executable Name
|
||||||
|
|
||||||
|
The easiest customization - change "ReiLua.exe" to "YourGame.exe".
|
||||||
|
|
||||||
|
### Steps
|
||||||
|
|
||||||
|
1. Open `CMakeLists.txt`
|
||||||
|
2. Find line 6 (near the top):
|
||||||
|
```cmake
|
||||||
|
project( ReiLua )
|
||||||
|
```
|
||||||
|
3. Change to your game name:
|
||||||
|
```cmake
|
||||||
|
project( MyAwesomeGame )
|
||||||
|
```
|
||||||
|
4. Rebuild:
|
||||||
|
```bash
|
||||||
|
cd build
|
||||||
|
cmake ..
|
||||||
|
cmake --build . --config Release
|
||||||
|
```
|
||||||
|
|
||||||
|
Result: Executable is now named `MyAwesomeGame.exe`
|
||||||
|
|
||||||
|
## 2. Adding a Custom Icon
|
||||||
|
|
||||||
|
Replace the default icon with your game's icon.
|
||||||
|
|
||||||
|
### Requirements
|
||||||
|
|
||||||
|
- **Format**: .ico file (Windows icon format)
|
||||||
|
- **Recommended sizes**: 16x16, 32x32, 48x48, 256x256
|
||||||
|
- **Tools**: Use online converters or tools like IcoFX, GIMP, or Photoshop
|
||||||
|
|
||||||
|
### Steps
|
||||||
|
|
||||||
|
1. Create or convert your image to .ico format
|
||||||
|
2. Replace `icon.ico` in the ReiLua root folder with your icon
|
||||||
|
3. Keep the same filename (`icon.ico`) or update `resources.rc`:
|
||||||
|
```rc
|
||||||
|
IDI_ICON1 ICON "your_icon.ico"
|
||||||
|
```
|
||||||
|
4. Rebuild the project
|
||||||
|
|
||||||
|
**Tip**: Many online tools can convert PNG to ICO:
|
||||||
|
- https://convertio.co/png-ico/
|
||||||
|
- https://www.icoconverter.com/
|
||||||
|
|
||||||
|
## 3. Customizing Executable Properties
|
||||||
|
|
||||||
|
When users right-click your .exe and select "Properties", they see file information. Customize this to show your game details.
|
||||||
|
|
||||||
|
### Steps
|
||||||
|
|
||||||
|
1. Open `resources.rc`
|
||||||
|
2. Find the `VERSIONINFO` section
|
||||||
|
3. Modify these values:
|
||||||
|
|
||||||
|
```rc
|
||||||
|
1 VERSIONINFO
|
||||||
|
FILEVERSION 1,0,0,0 // Change version numbers
|
||||||
|
PRODUCTVERSION 1,0,0,0 // Change product version
|
||||||
|
FILEFLAGSMASK 0x3fL
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
FILEOS VOS_NT_WINDOWS32
|
||||||
|
FILETYPE VFT_APP
|
||||||
|
FILESUBTYPE VFT2_UNKNOWN
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0"
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", "Your Studio Name" // Your company/studio
|
||||||
|
VALUE "FileDescription", "Your Game - An awesome game" // Game description
|
||||||
|
VALUE "FileVersion", "1.0.0.0" // File version string
|
||||||
|
VALUE "InternalName", "YourGame" // Internal name
|
||||||
|
VALUE "LegalCopyright", "Copyright (C) 2025 Your Name" // Copyright notice
|
||||||
|
VALUE "OriginalFilename", "YourGame.exe" // Original filename
|
||||||
|
VALUE "ProductName", "Your Game" // Product name
|
||||||
|
VALUE "ProductVersion", "1.0.0.0" // Product version string
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200
|
||||||
|
END
|
||||||
|
END
|
||||||
|
```
|
||||||
|
|
||||||
|
### Common Values
|
||||||
|
|
||||||
|
**FileVersion / ProductVersion Format**: Major, Minor, Patch, Build
|
||||||
|
- Example: `1,0,0,0` for version 1.0.0.0
|
||||||
|
- Example: `2,3,1,5` for version 2.3.1.5
|
||||||
|
|
||||||
|
**CompanyName Examples**:
|
||||||
|
- "Your Studio Name"
|
||||||
|
- "Independent Developer"
|
||||||
|
- "Your Name Games"
|
||||||
|
|
||||||
|
**FileDescription**:
|
||||||
|
- Short description users see in file properties
|
||||||
|
- Example: "Space Adventure Game"
|
||||||
|
- Example: "Puzzle Game with Physics"
|
||||||
|
|
||||||
|
**LegalCopyright**:
|
||||||
|
- Standard format: "Copyright (C) Year Your Name"
|
||||||
|
- Example: "Copyright (C) 2025 Indie Studios"
|
||||||
|
|
||||||
|
4. Rebuild the project
|
||||||
|
|
||||||
|
## 4. Customizing Splash Screens
|
||||||
|
|
||||||
|
Change the text and logos that appear when your game starts.
|
||||||
|
|
||||||
|
### Changing Splash Screen Text
|
||||||
|
|
||||||
|
1. Open `src/splash.c`
|
||||||
|
2. Find the splash drawing function (around line 150)
|
||||||
|
3. Change this line:
|
||||||
|
```c
|
||||||
|
const char* text = "YOUR STUDIO NAME";
|
||||||
|
```
|
||||||
|
|
||||||
|
**Style Tips**:
|
||||||
|
- Use ALL CAPS for bold impact
|
||||||
|
- Keep it short (under 30 characters)
|
||||||
|
- Examples: "INDIE STUDIO GAMES", "MADE BY YOUR NAME", "GAME JAM 2025"
|
||||||
|
|
||||||
|
### Changing Splash Screen Logos
|
||||||
|
|
||||||
|
1. Create or find your logos:
|
||||||
|
- **Recommended size**: 256x256 pixels or smaller
|
||||||
|
- **Format**: PNG with transparency
|
||||||
|
- **Style**: Simple, recognizable logos work best
|
||||||
|
|
||||||
|
2. Replace these files:
|
||||||
|
```
|
||||||
|
logo/raylib_logo.png → Your game logo
|
||||||
|
logo/reilua_logo.png → Your studio logo (or keep ReiLua logo as credit)
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Logo sizing:
|
||||||
|
- Logos are automatically scaled to max 200px
|
||||||
|
- They display side-by-side on second splash screen
|
||||||
|
- Maintain aspect ratio
|
||||||
|
|
||||||
|
4. Rebuild the project - logos are automatically embedded
|
||||||
|
|
||||||
|
### Changing Splash Screen Timing
|
||||||
|
|
||||||
|
1. Open `src/splash.c`
|
||||||
|
2. Modify these constants at the top:
|
||||||
|
```c
|
||||||
|
#define FADE_IN_TIME 0.8f // Seconds to fade in (default: 0.8)
|
||||||
|
#define DISPLAY_TIME 2.5f // Seconds fully visible (default: 2.5)
|
||||||
|
#define FADE_OUT_TIME 0.8f // Seconds to fade out (default: 0.8)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Recommendations**:
|
||||||
|
- Keep fade times between 0.5 - 1.5 seconds
|
||||||
|
- Display time between 1.5 - 3.5 seconds
|
||||||
|
- Total splash time ideally under 10 seconds
|
||||||
|
|
||||||
|
### Changing Splash Screen Colors
|
||||||
|
|
||||||
|
1. Open `src/splash.c`
|
||||||
|
2. Find color definitions:
|
||||||
|
```c
|
||||||
|
// First splash screen background (Raylib red)
|
||||||
|
Color bgColor = (Color){ 230, 41, 55, 255 }; // Change these RGB values
|
||||||
|
|
||||||
|
// Second splash screen background (Black)
|
||||||
|
Color bg = BLACK; // Change to any color
|
||||||
|
```
|
||||||
|
|
||||||
|
**Color Examples**:
|
||||||
|
- White: `(Color){ 255, 255, 255, 255 }`
|
||||||
|
- Blue: `(Color){ 0, 120, 215, 255 }`
|
||||||
|
- Dark Gray: `(Color){ 32, 32, 32, 255 }`
|
||||||
|
- Your brand color: `(Color){ R, G, B, 255 }`
|
||||||
|
|
||||||
|
## 5. Customizing the Loading Screen
|
||||||
|
|
||||||
|
Change the appearance of the asset loading screen.
|
||||||
|
|
||||||
|
### Steps
|
||||||
|
|
||||||
|
1. Open `src/lua_core.c`
|
||||||
|
2. Find the `drawLoadingScreen()` function
|
||||||
|
3. Modify colors and style:
|
||||||
|
|
||||||
|
```c
|
||||||
|
// Background color
|
||||||
|
Color bgColor = BLACK; // Change background
|
||||||
|
|
||||||
|
// Text color
|
||||||
|
Color textColor = WHITE; // Change text color
|
||||||
|
|
||||||
|
// Progress bar fill color
|
||||||
|
Color fillColor = WHITE; // Change bar fill
|
||||||
|
|
||||||
|
// Border color
|
||||||
|
Color borderColor = WHITE; // Change borders
|
||||||
|
```
|
||||||
|
|
||||||
|
### Customizing Loading Text
|
||||||
|
|
||||||
|
```c
|
||||||
|
// In drawLoadingScreen() function
|
||||||
|
const char* loadingText = "LOADING"; // Change to "LOADING GAME", etc.
|
||||||
|
```
|
||||||
|
|
||||||
|
### Changing Progress Bar Size
|
||||||
|
|
||||||
|
```c
|
||||||
|
int barWidth = 200; // Default 200px, change as needed
|
||||||
|
int barHeight = 16; // Default 16px, change as needed
|
||||||
|
int borderThick = 2; // Border thickness
|
||||||
|
```
|
||||||
|
|
||||||
|
## 6. Complete Rebranding Example
|
||||||
|
|
||||||
|
Here's a complete example of rebranding ReiLua as "Space Quest":
|
||||||
|
|
||||||
|
### 1. CMakeLists.txt
|
||||||
|
```cmake
|
||||||
|
project( SpaceQuest )
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. resources.rc
|
||||||
|
```rc
|
||||||
|
VALUE "CompanyName", "Cosmic Games Studio"
|
||||||
|
VALUE "FileDescription", "Space Quest - Explore the Galaxy"
|
||||||
|
VALUE "FileVersion", "1.0.0.0"
|
||||||
|
VALUE "InternalName", "SpaceQuest"
|
||||||
|
VALUE "LegalCopyright", "Copyright (C) 2025 Cosmic Games"
|
||||||
|
VALUE "OriginalFilename", "SpaceQuest.exe"
|
||||||
|
VALUE "ProductName", "Space Quest"
|
||||||
|
VALUE "ProductVersion", "1.0.0.0"
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. icon.ico
|
||||||
|
Replace with your space-themed icon
|
||||||
|
|
||||||
|
### 4. src/splash.c
|
||||||
|
```c
|
||||||
|
const char* text = "COSMIC GAMES STUDIO";
|
||||||
|
```
|
||||||
|
|
||||||
|
### 5. logo/ folder
|
||||||
|
```
|
||||||
|
logo/raylib_logo.png → Your game logo (space ship, planet, etc.)
|
||||||
|
logo/reilua_logo.png → Studio logo (keep ReiLua logo for credit)
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6. Build
|
||||||
|
```bash
|
||||||
|
cd build
|
||||||
|
cmake ..
|
||||||
|
cmake --build . --config Release
|
||||||
|
```
|
||||||
|
|
||||||
|
Result: `SpaceQuest.exe` with all your custom branding!
|
||||||
|
|
||||||
|
## 7. Advanced: Removing ReiLua Branding
|
||||||
|
|
||||||
|
If you want to completely remove ReiLua references:
|
||||||
|
|
||||||
|
### Remove "Made with ReiLua" Logo
|
||||||
|
|
||||||
|
1. Open `src/splash.c`
|
||||||
|
2. Find `drawMadeWithSplash()` function
|
||||||
|
3. Comment out or modify the function to only show your logo
|
||||||
|
|
||||||
|
### Remove Second Splash Screen
|
||||||
|
|
||||||
|
1. Open `src/main.c`
|
||||||
|
2. Find the splash screen loop
|
||||||
|
3. Modify to only call your custom splash
|
||||||
|
|
||||||
|
**Note**: Please keep attribution to Raylib and ReiLua in your game's credits or about screen as a courtesy!
|
||||||
|
|
||||||
|
## 8. Build and Test
|
||||||
|
|
||||||
|
After making any customizations:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Clean build (recommended after customizations)
|
||||||
|
cd build
|
||||||
|
rm -rf * # Or: rmdir /s /q * on Windows
|
||||||
|
cmake ..
|
||||||
|
cmake --build . --config Release
|
||||||
|
|
||||||
|
# Test with console
|
||||||
|
YourGame.exe --log
|
||||||
|
|
||||||
|
# Test production mode
|
||||||
|
YourGame.exe
|
||||||
|
```
|
||||||
|
|
||||||
|
Verify:
|
||||||
|
- ✅ Executable has correct name
|
||||||
|
- ✅ Icon appears in file explorer
|
||||||
|
- ✅ Right-click → Properties shows correct info
|
||||||
|
- ✅ Splash screens display correctly
|
||||||
|
- ✅ Loading screen appears as expected
|
||||||
|
|
||||||
|
## Checklist: Release-Ready Customization
|
||||||
|
|
||||||
|
Before releasing your game:
|
||||||
|
|
||||||
|
- [ ] Executable name matches your game
|
||||||
|
- [ ] Custom icon is recognizable at small sizes
|
||||||
|
- [ ] File properties are complete and accurate
|
||||||
|
- [ ] Splash screens show correct studio name
|
||||||
|
- [ ] Logos are high quality and appropriate size
|
||||||
|
- [ ] Loading screen matches your game's aesthetic
|
||||||
|
- [ ] Copyright and legal information is correct
|
||||||
|
- [ ] Version numbers are accurate
|
||||||
|
- [ ] Tested on target platforms
|
||||||
|
- [ ] Credits mention Raylib and ReiLua
|
||||||
|
|
||||||
|
## Tips for Polish
|
||||||
|
|
||||||
|
1. **Consistent Branding**: Use the same colors, fonts, and style across splash screens, loading screen, and in-game UI
|
||||||
|
|
||||||
|
2. **Icon Quality**: Invest time in a good icon - it's the first thing users see
|
||||||
|
|
||||||
|
3. **Version Management**: Update version numbers for each release
|
||||||
|
|
||||||
|
4. **Legal Info**: Always include proper copyright and attribution
|
||||||
|
|
||||||
|
5. **Test Everything**: Test your branded executable on a clean system
|
||||||
|
|
||||||
|
6. **Keep Credits**: Mention Raylib and ReiLua in your game's credits screen
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
**Icon doesn't change:**
|
||||||
|
- Ensure .ico file is valid
|
||||||
|
- Rebuild completely (clean build)
|
||||||
|
- Clear icon cache (Windows): Delete `IconCache.db`
|
||||||
|
|
||||||
|
**Properties don't update:**
|
||||||
|
- Verify `resources.rc` syntax is correct
|
||||||
|
- Rebuild completely
|
||||||
|
- Check that resource compiler ran (check build output)
|
||||||
|
|
||||||
|
**Splash screens don't show changes:**
|
||||||
|
- Rebuild with clean build
|
||||||
|
- Check `embed_logo.py` ran successfully
|
||||||
|
- Verify logo files exist in `logo/` folder
|
||||||
|
|
||||||
|
**Executable name unchanged:**
|
||||||
|
- Check `CMakeLists.txt` project name
|
||||||
|
- Do a clean rebuild
|
||||||
|
- Verify cmake configuration step succeeded
|
||||||
|
|
||||||
|
## Additional Resources
|
||||||
|
|
||||||
|
### Icon Creation Tools
|
||||||
|
- **IcoFX**: Icon editor (paid)
|
||||||
|
- **GIMP**: Free, supports ICO export
|
||||||
|
- **Online**: convertio.co, icoconverter.com
|
||||||
|
|
||||||
|
### Image Editing
|
||||||
|
- **GIMP**: Free, powerful image editor
|
||||||
|
- **Paint.NET**: Simple, free Windows editor
|
||||||
|
- **Photoshop**: Industry standard (paid)
|
||||||
|
|
||||||
|
### Color Picking
|
||||||
|
- **ColorPicker**: Use system color picker
|
||||||
|
- **HTML Color Codes**: htmlcolorcodes.com
|
||||||
|
- **Adobe Color**: color.adobe.com
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Now your ReiLua executable is fully branded and ready to represent your game!
|
||||||
213
DOCUMENTATION_INDEX.md
Normal file
213
DOCUMENTATION_INDEX.md
Normal file
@@ -0,0 +1,213 @@
|
|||||||
|
# Documentation Overview
|
||||||
|
|
||||||
|
This document provides a quick reference to all available documentation for ReiLua Enhanced Edition.
|
||||||
|
|
||||||
|
## Core Documentation
|
||||||
|
|
||||||
|
### 📘 [README.md](README.md) - **START HERE**
|
||||||
|
The main documentation covering:
|
||||||
|
- What is ReiLua Enhanced Edition
|
||||||
|
- Complete attributions (Raylib, ReiLua, enhancements)
|
||||||
|
- Quick start guide
|
||||||
|
- All enhanced features overview
|
||||||
|
- Command line options
|
||||||
|
- Building from source (Windows, Linux, Mac, Raspberry Pi, Web)
|
||||||
|
- Complete release workflow
|
||||||
|
- Troubleshooting
|
||||||
|
|
||||||
|
**Read this first!**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Feature-Specific Guides
|
||||||
|
|
||||||
|
### 🎨 [SPLASH_SCREENS.md](SPLASH_SCREENS.md)
|
||||||
|
Everything about splash screens:
|
||||||
|
- How the dual splash screen system works
|
||||||
|
- Custom text splash screen details
|
||||||
|
- "Made using Raylib + ReiLua" screen details
|
||||||
|
- Skipping splashes with `--no-logo` flag
|
||||||
|
- Customizing text, logos, timing, and colors
|
||||||
|
- Technical implementation details
|
||||||
|
- Troubleshooting splash screen issues
|
||||||
|
|
||||||
|
### 📦 [EMBEDDING.md](EMBEDDING.md)
|
||||||
|
Complete guide to embedding:
|
||||||
|
- Development vs release workflows
|
||||||
|
- Embedding Lua files (`EMBED_MAIN=ON`)
|
||||||
|
- Embedding assets (`EMBED_ASSETS=ON`)
|
||||||
|
- Console control with `--log` flag
|
||||||
|
- Complete release build workflow
|
||||||
|
- Asset path consistency
|
||||||
|
- Troubleshooting embedding issues
|
||||||
|
|
||||||
|
### 📊 [ASSET_LOADING.md](ASSET_LOADING.md)
|
||||||
|
Asset loading system documentation:
|
||||||
|
- API functions (`BeginAssetLoading`, `UpdateAssetLoading`, `EndAssetLoading`)
|
||||||
|
- Beautiful 1-bit pixel art loading screen
|
||||||
|
- Complete examples
|
||||||
|
- Loading patterns
|
||||||
|
- Progress tracking
|
||||||
|
- When to use the loading system
|
||||||
|
- Customization options
|
||||||
|
|
||||||
|
### 🔧 [BUILD_SCRIPTS.md](BUILD_SCRIPTS.md)
|
||||||
|
Build automation documentation:
|
||||||
|
- `build_dev.bat` / `build_dev.sh` - Development builds
|
||||||
|
- `build_release.bat` / `build_release.sh` - Release builds
|
||||||
|
- Features of each build type
|
||||||
|
- Workflow examples
|
||||||
|
- Customizing executable name, icon, and properties
|
||||||
|
- Troubleshooting build issues
|
||||||
|
|
||||||
|
### 🎨 [CUSTOMIZATION.md](CUSTOMIZATION.md)
|
||||||
|
Complete rebranding guide:
|
||||||
|
- Changing executable name
|
||||||
|
- Adding custom icon
|
||||||
|
- Customizing file properties (company name, version, etc.)
|
||||||
|
- Customizing splash screens
|
||||||
|
- Customizing loading screen
|
||||||
|
- Complete rebranding example
|
||||||
|
- Removing ReiLua branding (with attribution notes)
|
||||||
|
|
||||||
|
### 💻 [ZED_EDITOR_SETUP.md](ZED_EDITOR_SETUP.md)
|
||||||
|
Complete Zed editor setup:
|
||||||
|
- Why Zed for ReiLua development
|
||||||
|
- Installation guide
|
||||||
|
- Lua Language Server configuration
|
||||||
|
- Project setup with `.zed/settings.json`
|
||||||
|
- Task configuration for quick testing
|
||||||
|
- Essential keyboard shortcuts
|
||||||
|
- Multi-cursor editing, split views, Vim mode
|
||||||
|
- Troubleshooting LSP issues
|
||||||
|
- Workflow tips and best practices
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Technical Documentation
|
||||||
|
|
||||||
|
### 📚 [API.md](API.md)
|
||||||
|
Complete API reference:
|
||||||
|
- 1000+ functions
|
||||||
|
- All ReiLua/Raylib bindings
|
||||||
|
- Function signatures
|
||||||
|
- Raygui, Raymath, Lights, Easings, RLGL modules
|
||||||
|
|
||||||
|
### 📝 [ReiLua_API.lua](ReiLua_API.lua)
|
||||||
|
Lua annotations file:
|
||||||
|
- Provides autocomplete in LSP-enabled editors
|
||||||
|
- Function documentation
|
||||||
|
- Copy to your project for IDE support
|
||||||
|
|
||||||
|
### 🔄 [UPGRADE_SUMMARY.md](UPGRADE_SUMMARY.md)
|
||||||
|
Technical implementation details:
|
||||||
|
- Features added in this enhanced version
|
||||||
|
- Files modified and added
|
||||||
|
- Build options explained
|
||||||
|
- Testing checklist
|
||||||
|
- Known changes from original ReiLua
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Quick Reference by Task
|
||||||
|
|
||||||
|
### "I want to start making a game"
|
||||||
|
1. Read [README.md](README.md) - Quick Start section
|
||||||
|
2. Look at examples in `examples/` folder
|
||||||
|
3. Use `ReiLua.exe --log --no-logo` for development
|
||||||
|
|
||||||
|
### "I want to embed my game into a single .exe"
|
||||||
|
1. Read [EMBEDDING.md](EMBEDDING.md)
|
||||||
|
2. Use `build_release.bat` / `build_release.sh`
|
||||||
|
3. Follow the complete release workflow in [README.md](README.md)
|
||||||
|
|
||||||
|
### "I want to add a loading screen"
|
||||||
|
1. Read [ASSET_LOADING.md](ASSET_LOADING.md)
|
||||||
|
2. Use `RL.BeginAssetLoading()`, `RL.UpdateAssetLoading()`, `RL.EndAssetLoading()`
|
||||||
|
3. See complete examples in the guide
|
||||||
|
|
||||||
|
### "I want to customize splash screens"
|
||||||
|
1. Read [SPLASH_SCREENS.md](SPLASH_SCREENS.md)
|
||||||
|
2. Edit `src/splash.c` for text changes
|
||||||
|
3. Replace logo files in `logo/` folder
|
||||||
|
4. Rebuild project
|
||||||
|
|
||||||
|
### "I want to rebrand the executable"
|
||||||
|
1. Read [CUSTOMIZATION.md](CUSTOMIZATION.md)
|
||||||
|
2. Change project name in `CMakeLists.txt`
|
||||||
|
3. Replace `icon.ico`
|
||||||
|
4. Edit `resources.rc`
|
||||||
|
5. Customize splash screens
|
||||||
|
6. Rebuild
|
||||||
|
|
||||||
|
### "I want to setup my code editor"
|
||||||
|
1. Read [ZED_EDITOR_SETUP.md](ZED_EDITOR_SETUP.md)
|
||||||
|
2. Install Zed and Lua Language Server
|
||||||
|
3. Copy `ReiLua_API.lua` to your project
|
||||||
|
4. Create `.zed/settings.json` configuration
|
||||||
|
5. Set up tasks for quick testing
|
||||||
|
|
||||||
|
### "I want to build ReiLua from source"
|
||||||
|
1. Read [README.md](README.md) - Building from Source section
|
||||||
|
2. Install prerequisites (CMake, compiler, Raylib, Lua)
|
||||||
|
3. Use `build_dev.bat` for development
|
||||||
|
4. Use `build_release.bat` for release
|
||||||
|
|
||||||
|
### "I need API reference"
|
||||||
|
1. Open [API.md](API.md)
|
||||||
|
2. Search for function name
|
||||||
|
3. See function signature and description
|
||||||
|
4. Or copy [ReiLua_API.lua](ReiLua_API.lua) for autocomplete
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Documentation File Sizes
|
||||||
|
|
||||||
|
| File | Size | Purpose |
|
||||||
|
|------|------|---------|
|
||||||
|
| README.md | 21 KB | Main documentation (START HERE) |
|
||||||
|
| ZED_EDITOR_SETUP.md | 13 KB | Editor setup guide |
|
||||||
|
| CUSTOMIZATION.md | 11 KB | Rebranding guide |
|
||||||
|
| ASSET_LOADING.md | 8 KB | Loading system guide |
|
||||||
|
| EMBEDDING.md | 7 KB | Embedding guide |
|
||||||
|
| SPLASH_SCREENS.md | 7 KB | Splash screen guide |
|
||||||
|
| UPGRADE_SUMMARY.md | 6 KB | Technical details |
|
||||||
|
| BUILD_SCRIPTS.md | 5 KB | Build automation guide |
|
||||||
|
| API.md | 207 KB | Complete API reference |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Contribution
|
||||||
|
|
||||||
|
When adding new features, please:
|
||||||
|
1. Update relevant documentation
|
||||||
|
2. Add examples where appropriate
|
||||||
|
3. Update this overview if adding new docs
|
||||||
|
4. Test documentation accuracy
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Documentation Standards
|
||||||
|
|
||||||
|
All documentation follows these standards:
|
||||||
|
- ✅ Clear headings and structure
|
||||||
|
- ✅ Code examples for all features
|
||||||
|
- ✅ Troubleshooting sections
|
||||||
|
- ✅ Cross-references to related docs
|
||||||
|
- ✅ Platform-specific notes where needed
|
||||||
|
- ✅ Emoji icons for visual scanning
|
||||||
|
- ✅ Complete but concise
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Quick Links
|
||||||
|
|
||||||
|
- **Original ReiLua**: https://github.com/Gamerfiend/ReiLua
|
||||||
|
- **Raylib**: https://github.com/raysan5/raylib
|
||||||
|
- **Lua**: https://www.lua.org/
|
||||||
|
- **Zed Editor**: https://zed.dev/
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Last Updated**: 2025-01-03
|
||||||
|
**Documentation Version**: 1.0 (Enhanced Edition)
|
||||||
@@ -69,7 +69,6 @@ Distribution/
|
|||||||
- ✅ Single executable file
|
- ✅ Single executable file
|
||||||
- ✅ No external dependencies
|
- ✅ No external dependencies
|
||||||
- ✅ Users can't modify game files
|
- ✅ Users can't modify game files
|
||||||
- ✅ Professional distribution
|
|
||||||
- ✅ Smaller download (no separate files)
|
- ✅ Smaller download (no separate files)
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
# Splash Screens
|
# Splash Screens
|
||||||
|
|
||||||
ReiLua includes a built-in splash screen system that displays three professional splash screens before your game loads. This gives your game a polished, professional appearance right from startup.
|
ReiLua includes a built-in splash screen system that displays splash screens before your game loads. This gives your game a polished appearance right from startup.
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
When you run your ReiLua game, it automatically shows two splash screens in sequence:
|
When you run your ReiLua game, it automatically shows two splash screens in sequence:
|
||||||
|
|
||||||
1. **"INDRAJITH MAKES GAMES"** - Clean, bold text on Raylib red background (similar to Squid Game style)
|
1. **Custom Text** - Clean, bold text on Raylib red background (similar to Squid Game style)
|
||||||
2. **"Made using"** - Text with Raylib and ReiLua logos displayed side-by-side
|
2. **"Made using"** - Text with Raylib and ReiLua logos displayed side-by-side
|
||||||
|
|
||||||
Each splash screen:
|
Each splash screen:
|
||||||
@@ -24,7 +24,7 @@ The logo images are **always embedded** into the executable in both development
|
|||||||
- ✅ No external logo files needed
|
- ✅ No external logo files needed
|
||||||
- ✅ Consistent splash screens across all builds
|
- ✅ Consistent splash screens across all builds
|
||||||
- ✅ No risk of missing logo files
|
- ✅ No risk of missing logo files
|
||||||
- ✅ Professional appearance from the start
|
- ✅ Clean appearance from the start
|
||||||
|
|
||||||
### Asset Loading Integration
|
### Asset Loading Integration
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ The splash screens display **before** your game's asset loading begins. This mea
|
|||||||
4. Asset loading with progress indicator (if you use it)
|
4. Asset loading with progress indicator (if you use it)
|
||||||
5. Your game starts
|
5. Your game starts
|
||||||
|
|
||||||
This creates a smooth, professional startup experience.
|
This creates a smooth, polished startup experience.
|
||||||
|
|
||||||
## Skipping Splash Screens (Development)
|
## Skipping Splash Screens (Development)
|
||||||
|
|
||||||
@@ -90,13 +90,13 @@ No manual steps required - it just works!
|
|||||||
|
|
||||||
### Changing Splash Screen Text
|
### Changing Splash Screen Text
|
||||||
|
|
||||||
To change "INDRAJITH MAKES GAMES" to your studio name:
|
To change the default text to your studio name:
|
||||||
|
|
||||||
1. Open `src/splash.c`
|
1. Open `src/splash.c`
|
||||||
2. Find the `drawIndrajithSplash()` function
|
2. Find the splash drawing function
|
||||||
3. Change this line:
|
3. Change the text line:
|
||||||
```c
|
```c
|
||||||
const char* text = "INDRAJITH MAKES GAMES";
|
const char* text = "YOUR STUDIO NAME";
|
||||||
```
|
```
|
||||||
4. Rebuild the project
|
4. Rebuild the project
|
||||||
|
|
||||||
@@ -152,7 +152,7 @@ ReiLua.exe MyGame/
|
|||||||
**User Experience:**
|
**User Experience:**
|
||||||
|
|
||||||
1. **Splash Screen 1** (4.1 seconds)
|
1. **Splash Screen 1** (4.1 seconds)
|
||||||
- "INDRAJITH MAKES GAMES" bold text
|
- Custom text displayed in bold (default: "YOUR STUDIO NAME")
|
||||||
- Red background (Raylib color #E62937)
|
- Red background (Raylib color #E62937)
|
||||||
- Subtle zoom effect
|
- Subtle zoom effect
|
||||||
|
|
||||||
@@ -227,4 +227,4 @@ ReiLua --help
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
The splash screen system adds a professional touch to your ReiLua games with minimal effort. Customize it to match your studio's branding and give players a great first impression!
|
The splash screen system adds a polished touch to your ReiLua games with minimal effort. Customize it to match your studio's branding and give players a great first impression!
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ Successfully ported embedded assets, splash screens, and asset loading features
|
|||||||
|
|
||||||
### 3. **Splash Screens**
|
### 3. **Splash Screens**
|
||||||
- Always embedded dual logo splash screens
|
- Always embedded dual logo splash screens
|
||||||
- Screen 1: "INDRAJITH MAKES GAMES" on Raylib red background
|
- Screen 1: Custom text on Raylib red background
|
||||||
- Screen 2: "Made using" with Raylib and ReiLua logos
|
- Screen 2: "Made using" with Raylib and ReiLua logos
|
||||||
- Each screen: 0.8s fade in, 2.5s display, 0.8s fade out
|
- Each screen: 0.8s fade in, 2.5s display, 0.8s fade out
|
||||||
- `--no-logo` flag to skip in development
|
- `--no-logo` flag to skip in development
|
||||||
@@ -141,7 +141,7 @@ cmake -G "MinGW Makefiles" .. -DEMBED_MAIN=ON -DEMBED_ASSETS=ON
|
|||||||
mingw32-make
|
mingw32-make
|
||||||
```
|
```
|
||||||
- Everything embedded in single .exe
|
- Everything embedded in single .exe
|
||||||
- Professional distribution package
|
- Clean distribution package
|
||||||
- No external file dependencies
|
- No external file dependencies
|
||||||
|
|
||||||
## Command Line Options
|
## Command Line Options
|
||||||
|
|||||||
579
ZED_EDITOR_SETUP.md
Normal file
579
ZED_EDITOR_SETUP.md
Normal file
@@ -0,0 +1,579 @@
|
|||||||
|
# Setting Up Zed Editor for ReiLua Development
|
||||||
|
|
||||||
|
Zed is a high-performance, modern code editor built for speed and collaboration. This guide shows you how to set up Zed for the best ReiLua game development experience.
|
||||||
|
|
||||||
|
## Why Zed?
|
||||||
|
|
||||||
|
- ⚡ **Fast**: Written in Rust, extremely responsive
|
||||||
|
- 🧠 **Smart**: Built-in AI assistance (optional)
|
||||||
|
- 🎨 **Beautiful**: Clean, modern interface
|
||||||
|
- 🔧 **Powerful**: LSP support, multi-cursor editing, vim mode
|
||||||
|
- 🆓 **Free**: Open source and free to use
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### Download Zed
|
||||||
|
|
||||||
|
Visit https://zed.dev/ and download for your platform:
|
||||||
|
|
||||||
|
- **Windows**: Download installer and run
|
||||||
|
- **Mac**: Download .dmg and install
|
||||||
|
- **Linux**:
|
||||||
|
```bash
|
||||||
|
curl https://zed.dev/install.sh | sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### First Launch
|
||||||
|
|
||||||
|
1. Launch Zed
|
||||||
|
2. Choose your theme (light/dark)
|
||||||
|
3. Select keybindings (VS Code, Sublime, or default)
|
||||||
|
4. Optional: Sign in for collaboration features
|
||||||
|
|
||||||
|
## Setting Up for ReiLua
|
||||||
|
|
||||||
|
### 1. Install Lua Language Server
|
||||||
|
|
||||||
|
The Lua Language Server provides autocomplete, error detection, and documentation.
|
||||||
|
|
||||||
|
**Method 1: Automatic (Recommended)**
|
||||||
|
1. Open Zed
|
||||||
|
2. Open any `.lua` file
|
||||||
|
3. Zed will prompt to install Lua support
|
||||||
|
4. Click "Install"
|
||||||
|
|
||||||
|
**Method 2: Manual**
|
||||||
|
1. Press `Ctrl+Shift+P` (Windows/Linux) or `Cmd+Shift+P` (Mac)
|
||||||
|
2. Type "zed: install language server"
|
||||||
|
3. Select "Lua"
|
||||||
|
|
||||||
|
### 2. Create Workspace Configuration
|
||||||
|
|
||||||
|
Create a `.zed` folder in your project root:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd your_game_project
|
||||||
|
mkdir .zed
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Configure Lua Language Server
|
||||||
|
|
||||||
|
Create `.zed/settings.json` with ReiLua-specific settings:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"lsp": {
|
||||||
|
"lua-language-server": {
|
||||||
|
"settings": {
|
||||||
|
"Lua": {
|
||||||
|
"runtime": {
|
||||||
|
"version": "Lua 5.4",
|
||||||
|
"path": [
|
||||||
|
"?.lua",
|
||||||
|
"?/init.lua"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"diagnostics": {
|
||||||
|
"globals": [
|
||||||
|
"RL"
|
||||||
|
],
|
||||||
|
"disable": [
|
||||||
|
"lowercase-global"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"workspace": {
|
||||||
|
"library": [
|
||||||
|
"ReiLua_API.lua"
|
||||||
|
],
|
||||||
|
"checkThirdParty": false
|
||||||
|
},
|
||||||
|
"completion": {
|
||||||
|
"callSnippet": "Both",
|
||||||
|
"keywordSnippet": "Both"
|
||||||
|
},
|
||||||
|
"hint": {
|
||||||
|
"enable": true,
|
||||||
|
"setType": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"languages": {
|
||||||
|
"Lua": {
|
||||||
|
"format_on_save": "on",
|
||||||
|
"formatter": "language_server",
|
||||||
|
"tab_size": 4,
|
||||||
|
"hard_tabs": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tab_size": 4,
|
||||||
|
"soft_wrap": "editor_width",
|
||||||
|
"theme": "One Dark",
|
||||||
|
"buffer_font_size": 14,
|
||||||
|
"ui_font_size": 14
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**What this does:**
|
||||||
|
- Sets Lua 5.4 runtime (matches ReiLua)
|
||||||
|
- Adds `RL` as a global (prevents "undefined global" warnings)
|
||||||
|
- Loads ReiLua_API.lua for autocomplete
|
||||||
|
- Enables format-on-save
|
||||||
|
- Sets tab size to 4 spaces
|
||||||
|
- Enables type hints
|
||||||
|
- Disables third-party library checking (reduces noise)
|
||||||
|
|
||||||
|
### 4. Add ReiLua API Definitions
|
||||||
|
|
||||||
|
Copy `ReiLua_API.lua` to your project:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Windows
|
||||||
|
copy path\to\ReiLua\ReiLua_API.lua your_game_project\
|
||||||
|
|
||||||
|
# Linux/Mac
|
||||||
|
cp path/to/ReiLua/ReiLua_API.lua your_game_project/
|
||||||
|
```
|
||||||
|
|
||||||
|
This file provides:
|
||||||
|
- Autocomplete for all 1000+ ReiLua functions
|
||||||
|
- Function signatures
|
||||||
|
- Parameter hints
|
||||||
|
- Documentation tooltips
|
||||||
|
|
||||||
|
### 5. Create Tasks Configuration
|
||||||
|
|
||||||
|
Create `.zed/tasks.json` for quick commands:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "Run Game (Dev)",
|
||||||
|
"command": "path/to/ReiLua.exe",
|
||||||
|
"args": ["--log", "--no-logo"],
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Run Game (Production)",
|
||||||
|
"command": "path/to/ReiLua.exe",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Run Game with Logging",
|
||||||
|
"command": "path/to/ReiLua.exe",
|
||||||
|
"args": ["--log"],
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Build Release",
|
||||||
|
"command": "path/to/ReiLua/build_release.bat",
|
||||||
|
"cwd": "path/to/ReiLua"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Usage:**
|
||||||
|
1. Press `Ctrl+Shift+P` / `Cmd+Shift+P`
|
||||||
|
2. Type "task: spawn"
|
||||||
|
3. Select your task
|
||||||
|
|
||||||
|
Replace `path/to/ReiLua.exe` with the actual path to your ReiLua executable.
|
||||||
|
|
||||||
|
## Essential Keyboard Shortcuts
|
||||||
|
|
||||||
|
### Navigation
|
||||||
|
|
||||||
|
| Shortcut | Action | Description |
|
||||||
|
|----------|--------|-------------|
|
||||||
|
| `Ctrl+P` / `Cmd+P` | Quick Open | Jump to any file instantly |
|
||||||
|
| `Ctrl+Shift+P` / `Cmd+Shift+P` | Command Palette | Access all commands |
|
||||||
|
| `Ctrl+T` / `Cmd+T` | Go to Symbol | Jump to function/variable |
|
||||||
|
| `F12` | Go to Definition | Jump to where something is defined |
|
||||||
|
| `Shift+F12` | Find References | Find all uses of a symbol |
|
||||||
|
| `Alt+←` / `Alt+→` | Navigate Back/Forward | Like browser navigation |
|
||||||
|
| `Ctrl+G` / `Cmd+G` | Go to Line | Jump to specific line number |
|
||||||
|
|
||||||
|
### Editing
|
||||||
|
|
||||||
|
| Shortcut | Action | Description |
|
||||||
|
|----------|--------|-------------|
|
||||||
|
| `Ctrl+D` / `Cmd+D` | Add Selection | Select next occurrence |
|
||||||
|
| `Alt+Click` | Add Cursor | Multiple cursors |
|
||||||
|
| `Ctrl+Shift+L` / `Cmd+Shift+L` | Select All Occurrences | Multi-cursor all matches |
|
||||||
|
| `Ctrl+/` / `Cmd+/` | Toggle Comment | Comment/uncomment line |
|
||||||
|
| `Alt+↑` / `Alt+↓` | Move Line Up/Down | Move current line |
|
||||||
|
| `Ctrl+Shift+D` / `Cmd+Shift+D` | Duplicate Line | Copy line below |
|
||||||
|
| `Ctrl+Shift+K` / `Cmd+Shift+K` | Delete Line | Remove entire line |
|
||||||
|
| `Ctrl+]` / `Cmd+]` | Indent | Indent selection |
|
||||||
|
| `Ctrl+[` / `Cmd+[` | Outdent | Unindent selection |
|
||||||
|
|
||||||
|
### Search
|
||||||
|
|
||||||
|
| Shortcut | Action | Description |
|
||||||
|
|----------|--------|-------------|
|
||||||
|
| `Ctrl+F` / `Cmd+F` | Find | Search in current file |
|
||||||
|
| `Ctrl+H` / `Cmd+H` | Replace | Find and replace |
|
||||||
|
| `Ctrl+Shift+F` / `Cmd+Shift+F` | Find in Files | Search entire project |
|
||||||
|
| `F3` / `Cmd+G` | Find Next | Next search result |
|
||||||
|
| `Shift+F3` / `Cmd+Shift+G` | Find Previous | Previous search result |
|
||||||
|
|
||||||
|
### View
|
||||||
|
|
||||||
|
| Shortcut | Action | Description |
|
||||||
|
|----------|--------|-------------|
|
||||||
|
| `Ctrl+\` / `Cmd+\` | Split Editor | Side-by-side editing |
|
||||||
|
| `` Ctrl+` `` / `` Cmd+` `` | Toggle Terminal | Show/hide terminal |
|
||||||
|
| `Ctrl+B` / `Cmd+B` | Toggle Sidebar | Show/hide file tree |
|
||||||
|
| `Ctrl+K Z` / `Cmd+K Z` | Zen Mode | Distraction-free mode |
|
||||||
|
| `Ctrl+K V` / `Cmd+K V` | Toggle Preview | For markdown files |
|
||||||
|
|
||||||
|
### Code
|
||||||
|
|
||||||
|
| Shortcut | Action | Description |
|
||||||
|
|----------|--------|-------------|
|
||||||
|
| `Ctrl+Space` | Trigger Autocomplete | Force show suggestions |
|
||||||
|
| `Ctrl+.` / `Cmd+.` | Code Actions | Quick fixes |
|
||||||
|
| `F2` | Rename Symbol | Rename variable/function |
|
||||||
|
| `Ctrl+K Ctrl+F` / `Cmd+K Cmd+F` | Format Selection | Format selected code |
|
||||||
|
|
||||||
|
## Project Structure Best Practices
|
||||||
|
|
||||||
|
### Recommended Layout
|
||||||
|
|
||||||
|
```
|
||||||
|
your_game/
|
||||||
|
├── .zed/
|
||||||
|
│ ├── settings.json
|
||||||
|
│ └── tasks.json
|
||||||
|
├── assets/
|
||||||
|
│ ├── images/
|
||||||
|
│ ├── sounds/
|
||||||
|
│ └── fonts/
|
||||||
|
├── lib/
|
||||||
|
│ └── (your libraries)
|
||||||
|
├── src/
|
||||||
|
│ ├── main.lua
|
||||||
|
│ ├── player.lua
|
||||||
|
│ ├── enemy.lua
|
||||||
|
│ └── game.lua
|
||||||
|
├── ReiLua_API.lua
|
||||||
|
└── README.md
|
||||||
|
```
|
||||||
|
|
||||||
|
### Using Multiple Folders
|
||||||
|
|
||||||
|
Add ReiLua source for reference:
|
||||||
|
|
||||||
|
1. File → Add Folder to Workspace
|
||||||
|
2. Select ReiLua source directory
|
||||||
|
3. Now you can reference ReiLua code easily
|
||||||
|
|
||||||
|
## Advanced Features
|
||||||
|
|
||||||
|
### Multi-Cursor Editing
|
||||||
|
|
||||||
|
**Use cases:**
|
||||||
|
- Rename variables in multiple places
|
||||||
|
- Edit similar lines simultaneously
|
||||||
|
- Batch formatting
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
1. Select a variable name
|
||||||
|
2. Press `Ctrl+D` repeatedly to select more occurrences
|
||||||
|
3. Type to edit all at once
|
||||||
|
|
||||||
|
### Split Editor
|
||||||
|
|
||||||
|
Work on multiple files simultaneously:
|
||||||
|
|
||||||
|
1. Press `Ctrl+\` to split
|
||||||
|
2. Open different files in each pane
|
||||||
|
3. Example: `main.lua` on left, `player.lua` on right
|
||||||
|
|
||||||
|
### Vim Mode (Optional)
|
||||||
|
|
||||||
|
If you love Vim:
|
||||||
|
|
||||||
|
1. `Ctrl+Shift+P` → "zed: toggle vim mode"
|
||||||
|
2. All Vim keybindings become available
|
||||||
|
3. Normal, Insert, Visual modes work
|
||||||
|
4. `:w` to save, `:q` to close, etc.
|
||||||
|
|
||||||
|
### Live Grep
|
||||||
|
|
||||||
|
Powerful project-wide search:
|
||||||
|
|
||||||
|
1. Press `Ctrl+Shift+F`
|
||||||
|
2. Type your search query
|
||||||
|
3. Results show in context
|
||||||
|
4. Click to jump to location
|
||||||
|
|
||||||
|
**Search tips:**
|
||||||
|
- Use regex with `.*` for patterns
|
||||||
|
- Search by file type: `*.lua`
|
||||||
|
- Exclude folders: Add to `.gitignore`
|
||||||
|
|
||||||
|
### Collaboration (Optional)
|
||||||
|
|
||||||
|
Share your coding session:
|
||||||
|
|
||||||
|
1. Click "Share" button (top right)
|
||||||
|
2. Send link to teammate
|
||||||
|
3. Collaborate in real-time
|
||||||
|
4. See each other's cursors
|
||||||
|
|
||||||
|
## Workflow Tips
|
||||||
|
|
||||||
|
### 1. Quick File Switching
|
||||||
|
|
||||||
|
```
|
||||||
|
Ctrl+P → type filename → Enter
|
||||||
|
```
|
||||||
|
|
||||||
|
Example: `Ctrl+P` → "play" → selects `player.lua`
|
||||||
|
|
||||||
|
### 2. Symbol Search
|
||||||
|
|
||||||
|
```
|
||||||
|
Ctrl+T → type function name → Enter
|
||||||
|
```
|
||||||
|
|
||||||
|
Example: `Ctrl+T` → "update" → jumps to `function RL.update()`
|
||||||
|
|
||||||
|
### 3. Multi-File Editing
|
||||||
|
|
||||||
|
1. `Ctrl+Shift+F` → Search for text
|
||||||
|
2. Results show all occurrences
|
||||||
|
3. Use multi-cursor to edit across files
|
||||||
|
|
||||||
|
### 4. Integrated Terminal
|
||||||
|
|
||||||
|
Keep terminal open while coding:
|
||||||
|
|
||||||
|
1. `` Ctrl+` `` → Open terminal
|
||||||
|
2. Split view: code above, terminal below
|
||||||
|
3. Run `ReiLua.exe --log --no-logo` for testing
|
||||||
|
|
||||||
|
### 5. Quick Testing Loop
|
||||||
|
|
||||||
|
Set up this workflow:
|
||||||
|
1. Edit code in Zed
|
||||||
|
2. Save with `Ctrl+S` (autosave optional)
|
||||||
|
3. Switch to terminal with `` Ctrl+` ``
|
||||||
|
4. Press `↑` to recall previous command
|
||||||
|
5. Press `Enter` to run game
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### Lua Language Server Not Working
|
||||||
|
|
||||||
|
**Problem**: No autocomplete or diagnostics
|
||||||
|
|
||||||
|
**Solutions:**
|
||||||
|
1. Check LSP status: `Ctrl+Shift+P` → "lsp: show active servers"
|
||||||
|
2. Restart LSP: `Ctrl+Shift+P` → "lsp: restart"
|
||||||
|
3. Check `.zed/settings.json` syntax
|
||||||
|
4. Verify `ReiLua_API.lua` exists in project
|
||||||
|
|
||||||
|
### ReiLua Functions Show as Undefined
|
||||||
|
|
||||||
|
**Problem**: `RL.DrawText` shows as error
|
||||||
|
|
||||||
|
**Solutions:**
|
||||||
|
1. Add `"RL"` to globals in `.zed/settings.json`:
|
||||||
|
```json
|
||||||
|
"diagnostics": {
|
||||||
|
"globals": ["RL"]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
2. Restart LSP
|
||||||
|
|
||||||
|
### Format on Save Not Working
|
||||||
|
|
||||||
|
**Problem**: Code doesn't format when saving
|
||||||
|
|
||||||
|
**Solutions:**
|
||||||
|
1. Check formatter setting:
|
||||||
|
```json
|
||||||
|
"languages": {
|
||||||
|
"Lua": {
|
||||||
|
"format_on_save": "on"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
2. Ensure LSP is running
|
||||||
|
3. Try manual format: `Ctrl+Shift+F`
|
||||||
|
|
||||||
|
### Tasks Not Showing
|
||||||
|
|
||||||
|
**Problem**: Can't find run tasks
|
||||||
|
|
||||||
|
**Solutions:**
|
||||||
|
1. Verify `.zed/tasks.json` exists
|
||||||
|
2. Check JSON syntax
|
||||||
|
3. Reload window: `Ctrl+Shift+P` → "zed: reload"
|
||||||
|
|
||||||
|
## Themes and Appearance
|
||||||
|
|
||||||
|
### Change Theme
|
||||||
|
|
||||||
|
1. `Ctrl+Shift+P` → "theme selector: toggle"
|
||||||
|
2. Browse themes
|
||||||
|
3. Select one
|
||||||
|
|
||||||
|
**Recommended for coding:**
|
||||||
|
- One Dark (dark)
|
||||||
|
- One Light (light)
|
||||||
|
- Andromeda (dark)
|
||||||
|
- GitHub Light (light)
|
||||||
|
|
||||||
|
### Adjust Font Size
|
||||||
|
|
||||||
|
**Method 1: Settings**
|
||||||
|
Edit `.zed/settings.json`:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"buffer_font_size": 14,
|
||||||
|
"ui_font_size": 14
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Method 2: Quick Zoom**
|
||||||
|
- `Ctrl+=` / `Cmd+=` → Increase font
|
||||||
|
- `Ctrl+-` / `Cmd+-` → Decrease font
|
||||||
|
- `Ctrl+0` / `Cmd+0` → Reset font
|
||||||
|
|
||||||
|
### Custom Font
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"buffer_font_family": "JetBrains Mono",
|
||||||
|
"buffer_font_size": 14
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Recommended coding fonts:**
|
||||||
|
- JetBrains Mono
|
||||||
|
- Fira Code
|
||||||
|
- Cascadia Code
|
||||||
|
- Source Code Pro
|
||||||
|
|
||||||
|
## Extensions and Enhancements
|
||||||
|
|
||||||
|
### Install Extensions
|
||||||
|
|
||||||
|
1. `Ctrl+Shift+X` / `Cmd+Shift+X`
|
||||||
|
2. Search for extensions
|
||||||
|
3. Click install
|
||||||
|
|
||||||
|
### Recommended for Lua Development
|
||||||
|
|
||||||
|
**Core:**
|
||||||
|
- ✅ Lua Language Server (built-in)
|
||||||
|
|
||||||
|
**Productivity:**
|
||||||
|
- Better Comments - Enhanced comment highlighting
|
||||||
|
- Error Lens - Inline error display
|
||||||
|
- Bracket Pair Colorizer - Match brackets with colors
|
||||||
|
|
||||||
|
**Optional:**
|
||||||
|
- GitHub Copilot - AI code suggestions (requires subscription)
|
||||||
|
- GitLens - Advanced git integration
|
||||||
|
|
||||||
|
## Sample Workspace
|
||||||
|
|
||||||
|
Here's a complete example setup:
|
||||||
|
|
||||||
|
### Directory Structure
|
||||||
|
```
|
||||||
|
MyGame/
|
||||||
|
├── .zed/
|
||||||
|
│ ├── settings.json
|
||||||
|
│ └── tasks.json
|
||||||
|
├── src/
|
||||||
|
│ ├── main.lua
|
||||||
|
│ ├── player.lua
|
||||||
|
│ └── enemy.lua
|
||||||
|
├── assets/
|
||||||
|
│ ├── player.png
|
||||||
|
│ └── music.wav
|
||||||
|
├── ReiLua_API.lua
|
||||||
|
└── README.md
|
||||||
|
```
|
||||||
|
|
||||||
|
### .zed/settings.json
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"lsp": {
|
||||||
|
"lua-language-server": {
|
||||||
|
"settings": {
|
||||||
|
"Lua": {
|
||||||
|
"runtime": {"version": "Lua 5.4"},
|
||||||
|
"diagnostics": {"globals": ["RL"]},
|
||||||
|
"workspace": {"library": ["ReiLua_API.lua"]}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"languages": {
|
||||||
|
"Lua": {
|
||||||
|
"format_on_save": "on",
|
||||||
|
"tab_size": 4
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"theme": "One Dark",
|
||||||
|
"buffer_font_size": 14
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### .zed/tasks.json
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "Run Game",
|
||||||
|
"command": "C:/ReiLua/build/ReiLua.exe",
|
||||||
|
"args": ["--log", "--no-logo"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Now you can:
|
||||||
|
- Open project in Zed
|
||||||
|
- Get autocomplete for all RL functions
|
||||||
|
- Press `Ctrl+Shift+P` → "Run Game" to test
|
||||||
|
- Edit code with full LSP support
|
||||||
|
|
||||||
|
## Tips for Efficient Development
|
||||||
|
|
||||||
|
1. **Learn 5 shortcuts**: `Ctrl+P`, `Ctrl+Shift+F`, `Ctrl+D`, `F12`, `` Ctrl+` ``
|
||||||
|
2. **Use multi-cursor**: Speed up repetitive edits
|
||||||
|
3. **Split editor**: Work on related files side-by-side
|
||||||
|
4. **Keep terminal open**: Quick testing without leaving Zed
|
||||||
|
5. **Use Zen mode**: Focus during complex coding
|
||||||
|
6. **Enable autosave**: Never lose work
|
||||||
|
|
||||||
|
## Next Steps
|
||||||
|
|
||||||
|
✅ Install Zed
|
||||||
|
✅ Configure for Lua 5.4
|
||||||
|
✅ Add ReiLua_API.lua to project
|
||||||
|
✅ Set up tasks for quick testing
|
||||||
|
✅ Learn essential shortcuts
|
||||||
|
✅ Start coding your game!
|
||||||
|
|
||||||
|
## Additional Resources
|
||||||
|
|
||||||
|
- **Zed Documentation**: https://zed.dev/docs
|
||||||
|
- **Zed GitHub**: https://github.com/zed-industries/zed
|
||||||
|
- **Community**: https://zed.dev/community
|
||||||
|
- **Keyboard Shortcuts**: View in Zed with `Ctrl+K Ctrl+S`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Happy coding with Zed and ReiLua! 🚀
|
||||||
Reference in New Issue
Block a user