Skip to content

Games in the Browser

Ten small games written in TulparLang and compiled to WebAssembly — they run in your browser, no install. Every game has three levels; clear all three and you win. And you can read each game’s source in both English and Turkish: every TulparLang built-in has a name in both languages, so player(...) and oyuncu(...), on_hit(...) and carpisinca(...) are the same call.

The games sit on arcade — a tiny preset engine (itself written in TulparLang, on top of the tame raylib bindings). You don’t write the loop, physics, collision or drawing; you place blocks and register callbacks, so a whole game is ~100 lines:

import "arcade";
func setup() {
clear_entities();
player(300, 220, 24, 24, BLUE); // arrows / WASD ready
item(80, 80, 18, 18, GOLD);
}
func collect() { kill(other()); score_add(10); }
scene(640, 480, "Collect");
on_start(setup);
on_hit(TAG_PLAYER, TAG_ITEM, collect); // tag-based collision
play(); // loop + draw + collision, all managed

Levels are just a setup function each — level(1, l1); level(2, l2); … — and next_level() advances when a level’s win condition is met. Score carries across levels; clearing the last one shows the win screen.

Open the games page and hit “See code” on any game — a side-by-side viewer shows the exact TulparLang source in Turkish and English. It’s the same program compiled the same way; only the identifiers and strings differ. That’s the point: TulparLang reads naturally to a Turkish or an English speaker.