diff options
| author | Indrajith K L | 2025-11-05 01:50:32 +0530 |
|---|---|---|
| committer | Indrajith K L | 2025-11-05 01:50:32 +0530 |
| commit | 10c22d35678f96e722f25a12badca98febb2921e (patch) | |
| tree | fe71581d11747f32ceebb31839034d61e7a55614 /template/assets | |
| parent | 2d565e5bcb0e2eab93d9d1bab520bbbaf7457a07 (diff) | |
| download | reilua-enhanced-10c22d35678f96e722f25a12badca98febb2921e.tar.gz reilua-enhanced-10c22d35678f96e722f25a12badca98febb2921e.tar.bz2 reilua-enhanced-10c22d35678f96e722f25a12badca98febb2921e.zip | |
Adds Game Jam Ready Templates & ReiLua API Updates
(Most of the code is Copilot Generated LOL)
Diffstat (limited to 'template/assets')
| -rw-r--r-- | template/assets/README.md | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/template/assets/README.md b/template/assets/README.md new file mode 100644 index 0000000..c401c47 --- /dev/null +++ b/template/assets/README.md @@ -0,0 +1,90 @@ +# Place your game assets here + +## Recommended Structure + +``` +assets/ +├── images/ +│ ├── player.png +│ ├── enemy.png +│ └── background.png +├── sounds/ +│ ├── jump.wav +│ └── shoot.wav +├── music/ +│ └── theme.ogg +└── fonts/ + └── game_font.ttf +``` + +## Sprite Sheet Guidelines + +### Grid-Based Animations +- Use equal-sized frames arranged in a grid +- Frames are read left-to-right, top-to-bottom +- Example: 32x32 pixel frames + +### Example Layout +``` +Frame 1 Frame 2 Frame 3 Frame 4 +Frame 5 Frame 6 Frame 7 Frame 8 +``` + +### Recommended Sizes +- Player: 32x32 or 64x64 +- Enemies: 32x32 +- Effects: 16x16, 32x32, or 64x64 +- Backgrounds: Match your game resolution + +## Audio Guidelines + +### Sound Effects +- Format: WAV (uncompressed) or OGG (compressed) +- Short sounds (< 2 seconds): Use WAV +- Length: Keep under 5 seconds for quick loading + +### Music +- Format: OGG (recommended for size) +- Use streaming (LoadMusicStream) for music +- Sample rate: 44100 Hz recommended + +## Loading Assets + +### In Lua +```lua +-- Images +local playerImg = RL.LoadTexture("assets/images/player.png") + +-- Sounds +local jumpSound = RL.LoadSound("assets/sounds/jump.wav") + +-- Music (streaming) +local music = RL.LoadMusicStream("assets/music/theme.ogg") + +-- Fonts +local font = RL.LoadFont("assets/fonts/game_font.ttf") +``` + +### With Loading Screen +```lua +local assetsToLoad = { + "assets/images/player.png", + "assets/sounds/jump.wav", + "assets/music/theme.ogg" +} + +RL.BeginAssetLoading(#assetsToLoad) +for _, asset in ipairs(assetsToLoad) do + RL.UpdateAssetLoading(asset) + -- Load the asset... +end +RL.EndAssetLoading() +``` + +## Tips + +- Keep asset sizes reasonable (< 2MB per file for quick loading) +- Use PNG for images with transparency +- Use JPG for photos/backgrounds (smaller size) +- Optimize images before adding to game +- Test loading times during development |
