oyun

Python
namespace SpriteKind {
    export const Obstacle = SpriteKind.create()
    export const Ground = SpriteKind.create()
}
sprites.onOverlap(SpriteKind.Player, SpriteKind.Obstacle, function (sprite, otherSprite) {
    game.gameOver(false)
})
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
    if (hero.y >= 106) {
        hero.vy = -145
    }
})
sprites.onOverlap(SpriteKind.Player, SpriteKind.Food, function (sprite, otherSprite) {
    info.changeScoreBy(1)
    sprites.destroy(otherSprite)
})
let block: Sprite = null
let coin: Sprite = null
let ground: Sprite = null
let hero: Sprite = null
info.setScore(0)
scene.setBackgroundColor(15)
game.splash("Untitled")
hero = sprites.create(img`
    ....................
    .......5.55.5.......
    .......5.22.5.......
    .......752258.......
    .......111111.......
    .......111ff1.......
    .......111ff1.......
    .......111111.......
    ....11111111555.....
    ....1111111122......
    ..111111111122......
    ...1111111111.......
    ......55..55........
    ......55..55........
    ......555.555.......
    ......555.555.......
    ....................
    ....................
    ....................
    ....................
    `, SpriteKind.Player)
hero.setPosition(28, 108)
hero.ay = 360
for (let i = 0; i <= 10; i++) {
    ground = sprites.create(img`
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        1 5 5 1 1 1 5 5 1 1 1 1 5 5 1 1 
        1 1 5 5 1 1 1 5 5 1 1 1 1 5 5 1 
        1 1 1 5 5 1 1 1 5 5 1 1 1 1 5 5 
        1 1 5 5 1 1 1 5 5 1 1 1 1 5 5 1 
        1 5 5 1 1 1 5 5 1 1 1 1 5 5 1 1 
        `, SpriteKind.Ground)
    ground.setFlag(SpriteFlag.Ghost, true)
    ground.z = -10
    ground.x = i * 16 + 8
    ground.top = 108
}
game.setGameOverMessage(false, "tekrar deneyebilirsin tostum")
game.setGameOverEffect(false, effects.melt)
game.setGameOverPlayable(true, music.melodyPlayable(music.powerUp), false)
game.onUpdate(function () {
    if (hero.y > 108) {
        hero.y = 108
        hero.vy = 0
    }
})
game.onUpdateInterval(1500, function () {
    coin = sprites.create(img`
        . . 5 5 5 5 . . 
        . 5 5 1 1 5 5 . 
        5 5 1 5 5 1 5 5 
        5 1 5 5 5 5 1 5 
        5 1 5 5 5 5 1 5 
        5 5 1 5 5 1 5 5 
        . 5 5 1 1 5 5 . 
        . . 5 5 5 5 . . 
        `, SpriteKind.Food)
    coin.setPosition(170, 80)
    coin.setVelocity(-90, 0)
})
game.onUpdateInterval(1200, function () {
    block = sprites.createProjectile(img`
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        `, -90, 0, SpriteKind.Obstacle)
    block.setPosition(scene.screenWidth(), 108)
})
Stellar oguz68771
Sign in to react
2
Uploaded Sep 5, 2026

falan filan

Published feedback

Robby
InimitableRobby
Updated Sep 5, 2026

Oğuz Özgül, 'oyun' projen çok güzel bir oyun mantığı kurmuş: engellerle çarpışınca oyun bitiyor, puan toplamak için nesneler var ve oyuncuya net bir geribildirim veriliyor.

Oyununda oyuncunun hareketlerine anında tepki veren bir sistem kurmuşsun, bu da gerçek oyun programlamasının temel taşlarından biri!