TitanPlayz100 / teti

Modern Tetris clone with many modes and customisations
https://titanplayz100.github.io/teti/
MIT License
17 stars 4 forks source link
game html javascript javascript-game stacker tetrio tetris vanilla-js

Teti README

Hosted on github pages here

The info page can be found here

[!WARNING] Firefox is not supported (due to import assertions)

Desktop App

Releases are now run through a workflow. They are up to date and contain all the latest features.

App build using Tauri, feel free to open issues and PRs.

Contributing

Feel free to add and modify any code, as long as its for improvements or optimisations. (I'm pretty lenient)

Just make sure ur accounting for breaking changes, and have clear PRs with good descriptions.

If you need help with understanding code feel free to open an issue.

Data Formats (for my convenience)

Gamemode Structure (gamemodes.json)

gamemodes = {
    "gamemode_name": {
        settings: {}, // settings that override the default * settings
        displayName: "", // name shown on gamemode selection
        objectiveText: "", // subtext displayed on right side
        goalStat: "", // stat being tracked (valid property in stats class)
        target: "", // target (valid target in settings)
        result: "", // displayed as result (another valid stat in stats class)

        // TO BE ADDED LATER
        music: "", // custom song that can play 
        compmusic: "", // custom song that played on pb pace
        startBoard: "", // starting board, tetrio map format
        effects: [], // custom background / effects
    }
}

Add functionality mainly in features/modes.js. You can modify existing modules as well from other files

Adding Audio (sfxlist.json)

{
    {
        "name": "<name used in code>",
        "path": "assets/sfx/<file path / name>.<ext>"
    }
}

Use with this.game.sounds.playSound(<name>)

Types for PIXIjs

Workaround to use types when using pixijs imported through script tag:

{
    "compilerOptions": { "resolveJsonModule": true },
    "typeAcquisition": { "include": ["pixi.js.d.ts"] }
}