📝 Code Editor
🎮 Game View
đŸ’ģ Console
Stopped | Line: - | Vars: 0 F5=Start F6=Stop F8=Step Ctrl+S=Save

Modern Basic Engine

Version 1.0

From Banditware — made by: Willem van Uden

Modern Basic Engine is a graphical game engine IDE for creating retro-style games with Modern Basic.

🔧 Built-in Modern Basic interpreter
🎮 Graphical canvas for game rendering
đŸ•šī¸ Gamepad & sprite support
🌐 Peer-to-peer multiplayer networking
đŸŽĩ MP3 music playback

Made for game developers who love the simplicity of Basic.

📖 Modern Basic Documentation

Basic

PRINT exprWrite text to console
INPUT varRead user input
INPUT "prompt", varInput with prompt
LET var = exprAssign value
DIM name(size)Create array
REM textComment
ENDEnd program

Control Flow

IF cond THEN action [ELSE action]Single-line conditional
IF cond THEN ... ELSE ... ENDIFMulti-line block conditional
FOR var = start TO endFor loop
WHILE cond / WENDWhile loop
DO / LOOP [UNTIL cond]Do loop
GOTO labelJump to label
GOSUB label / RETURNSubroutine

Graphics

SCREEN w, hSet canvas size
CLSClear screen
COLOR colorSet color (0-15)
LINE x1,y1,x2,y2Draw line
CIRCLE x,y,rDraw circle
RECT x,y,w,hDraw rectangle
PLOT x,yDraw pixel
DRAW "text",x,y,sizeText on canvas

Sprites

SPRITE id,x,y,w,h [,color]Create sprite
MOVESPRITE id,x,yMove sprite
LOADSPRITE imgId, "player.png"Load a local image (load it first via File › Open Folder or Load Local Assets) or a URL
SETSPRITEIMG id, imgIdAssign image to sprite
HIDESPRITE idHide sprite
SHOWSPRITE idShow sprite

Sound & Music

SOUND freq, durPlay tone (Hz, ms)
PLAY freq, durPlay tone (same as SOUND)
PLAY "song.mp3"Play a local file (load it first via File › Open Folder or Load Local Assets) or a URL
STOPMUSICStop MP3 playback
MUSICPLAYING1 if music playing, else 0
PLAYFILEPrompt for a local MP3 file at run time (optional)
LOADSPRITEFILE imgIdPrompt for a local image at run time (optional)

Scrolling / Viewport

WORLD w, hDefine world size
SCROLL x, ySet scroll offset
VIEWPORT x, yAlias for SCROLL
SCROLLX / SCROLLYCurrent scroll position
WORLDW / WORLDHWorld dimensions

Gamepad

GAMEPAD1 if connected, else 0
GPBUTTON(n)Button n pressed (0/1)
GPAXIS(n)Axis value (-1 to 1)

Network / Multiplayer

NETHOSTHost a session
NETJOIN "peerId"Join a session
NETSEND "msg"Send message
NETRECV var$Receive message
NETCLOSEClose connection
NETACTIVE1 if connected
NETHASDATA1 if data available
NETPEERID$Your peer ID

Input & Functions

INKEY$Last key pressed
MOUSEX / MOUSEYMouse position
SLEEP msWait (milliseconds)
RND / RND(n)Random number
INT(x) / ABS(x) / SQR(x)Math functions