TalentJR apps
Run, jump over spikes, collect coins and reach the flag. Play it first, then open it in the Game Studio and change it until it is your own game.
🎮 Controls: ← → to run · SPACE or ↑ to jump
At the top of the code are the settings — change one, run the game, and feel the difference. This is how game designers balance a game.
let playerSpeed = 240 | |
let jumpPower = 640 | |
let gravity = 1600 | |
let coinPoints = 10 | |
let startLives = 3 |
Try them in order. The studio ticks each one off when your change works — and shows a hint if it does not.
let playerSpeed = 360let jumpPower = 800let gravity = 800let coinPoints = 50" $ $ $ "," ===== E ",let startLives = 5tj.timer(45)background: "night"51 lines of real JavaScript, made with TalentJR Game Studio's game library. Lines that start with // explain what the next part does.
// 🏃 Platformer — TalentJR Game Studio
// ✏️ Change these numbers, then press ▶ Run!
let playerSpeed = 240
let jumpPower = 640
let gravity = 1600
let coinPoints = 10
let startLives = 3
tj.setup({ background: "sky", gravity: gravity })
tj.touchControls("platform")
// The level — each letter is one block:
// = ground $ coin ^ spikes E enemy F flag @ start
const level = tj.level([
" ",
" F ",
" ====",
" $$ ",
" ===== ",
" $ ",
" @ ^ === ",
"====== =====",
" E ",
"=============",
])
const player = tj.player({ at: level.start, speed: playerSpeed, jump: jumpPower, mode: "platform" })
const score = tj.score()
const lives = tj.lives(startLives)
// Collect coins
player.onCollide("coin", (coin) => {
destroy(coin)
score.add(coinPoints)
tj.sound("coin")
})
// Ouch! Lose a life and go back to the start
function ouch() {
lives.lose()
player.pos = level.start.clone()
}
player.onCollide("danger", ouch)
player.onCollide("enemy", ouch)
player.on("fell", ouch)
// Reach the flag to win
player.onCollide("goal", () => {
tj.victory("You win! 🎉")
})
🏃 Coin Run — your first gameType your first game yourself in 7 short missions — every line explained.
🏃 Platform AdventureA classic 8-bit platformer: coins, slimes and a flag — change the code, sprites and level.
🎯 Slime BlasterGuard the fence: move the robot, blast the slimes marching in — big ones need 3 hits.
🏏 CricketTime your swing for a SIX, a FOUR or a run — and chase the target before you are all out.
🏎️ Retro RacingDodge the traffic on a scrolling road — change the speed, the cars and the road colour.
🚀 Space ShooterFly the rocket and shoot the aliens before they reach you — they shoot back!