Skip to content
JoeStroutPublic

About

MiniScript + Raylib integration, optimized for web builds

Resources

Stars

5 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

66 Commits

Folders and files

Repository files navigation

MSRLWeb - Make Web Games with MiniScript + Raylib

Write 2D games in MiniScript, powered by Raylib graphics, running in your browser via WebAssembly.

No compiler needed. Just edit your MiniScript code and assets, refresh the browser, and play!

๐ŸŽฎ Try It Now!

Play the live demo - See MSRLWeb in action!

๐Ÿ“ฆ Download & Use

Download the latest release

Unzip and you're ready to go:

  1. Start a web server in the unzipped folder. If you have Python installed, you can just cd to the folder, and do:
    python3 -m http.server 8000

If you don't have Python, consider Redbean. Any web server will do.

  1. Open your browser to: http://localhost:8000

  2. Edit assets/main.ms to change the game - then refresh the web page to see your changes.

That's it! No build tools, no compilation, no hassle.

โœจ What Is This?

MSRLWeb lets you create 2D games and interactive graphics using:

  • MiniScript - A simple, elegant scripting language (like Python meets JavaScript)
  • Raylib - A powerful 2D/3D game programming library
  • WebAssembly - Runs anywhere, right in the browser

Your game logic lives in easy-to-edit MiniScript files. Change the code, refresh the browser, see results instantly. No recompiling, no build steps.

๐Ÿš€ Quick Example

Here's a complete bouncing sprite demo in MiniScript:

// Load a sprite
spriteTex = raylib.LoadTexture("assets/Wumpus.png")

// Starting position and velocity
x = 100; y = 100
dx = 5; dy = 5

// Game loop
while true
    raylib.BeginDrawing
    raylib.ClearBackground raylib.RAYWHITE

    // Move the sprite, bouncing off edges
    x += dx; y += dy
    if x > 960 - 64 or x < 0 then dx = -dx
    if y > 640 - 64 or y < 0 then dy = -dy

    // Draw it
    raylib.DrawTexture spriteTex, x, y, raylib.WHITE
    raylib.DrawFPS

    raylib.EndDrawing
    yield  // Let the browser breathe
end while

That's it! Edit, save, refresh.

๐Ÿ“š What's Available?

MSRLWeb provides 174 Raylib functions organized into modules:

  • rcore (29 functions) - Window, input, timing, mouse, keyboard
  • rshapes (35 functions) - Circles, rectangles, lines, polygons, collision detection
  • rtextures (45 functions) - Load/draw images, procedural textures, image manipulation
  • rtext (12 functions) - Load fonts, draw text, measure text
  • raudio (53 functions) - Sound effects, music streaming, spatial audio

See RAYLIB_API.md for the complete function list.

All functions have sensible defaults, so you can start simple:

raylib.DrawCircle 100, 100, 50, raylib.RED  // Works!
raylib.DrawRectangle                        // Also works! (uses defaults)

๐ŸŽฏ Who Is This For?

  • Game developers who want rapid prototyping without build tools
  • Educators teaching game development with a simple language
  • Hobbyists making web games with minimal friction
  • Anyone who wants to try Raylib without installing C/C++ toolchains

๐ŸŽ“ Learning Resources

MiniScript:

Raylib:

๐Ÿ› ๏ธ Building from Source

Want to hack on MSRLWeb itself? See BUILDING.md for:

  • Setting up the build environment
  • Compiling from source
  • Adding new Raylib intrinsics
  • Creating release packages

๐Ÿ“„ License


Happy game making! ๐ŸŽฎ

Have questions or want to share what you've made? Open an issue or discussion, or join us on Discord.

About

MiniScript + Raylib integration, optimized for web builds

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages