Skip to content

ThisAMJ/SARtris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 

Repository files navigation

SARtris Classic

Run in your browser! DEMO (switch left menu to SAR Hud)

(tl;dr - I made Tetris for NES in Portal 2)

Since its creation, the SAR speedrunning plugin has been able to do much more than simply speedrun. In June of 2021, this was taken to the extreme with the advent of Config+, an esoteric programming language that runs entirely within the config files of Portal 2.

Config+ was intended to improve the automation that speedrunners used during their sessions, and has effectively done so in the community-driven srconfigs project. At the same time, it has been used in... less productive ways.

This repository signifies the current state of 'Config++' exploration. I have recreated the popular game 'Tetris' for the NES entirely within a config file that is normally used to change how your crosshair looks, and I think that's pretty cool.

Fellow community member RainbowwPhoenixx has made a version of SARtris for 'modern' Tetris. Keep in mind that it was made quite a while ago, and therefore doesn't have the best performance.

I've also made Minesweeper in a similar way, which can be downloaded from here.

Installation

  1. Download the source code for the repository.
  2. Extract the tetris folder and place it in .../steamapps/common/Portal 2/portal2/cfg. You can also put it in your common folder, and it will work similarly in mods such as Speedrun Mod, Portal Stories: Mel, and Portal Reloaded.
  3. Open autoexec.cfg (or extra.cfg if you have srconfigs) and write exec tetris/tetris on a new line.

Usage

You can bind these actions to keys using bind <key> <action>.

Action Description
sartris_toggle Toggles SARtris on/off.
sartris_newgame Resets SARtris to a new game. You can optionally specify
a number with which to seed the RNG for the next game.
sartris_get_seed Get the RNG seed of the current game.
sartris_get_prev_seed Get the RNG seed of the previous game. Useful if you died
before you could get the seed.
+sartris_left Move your tetromino left.
+sartris_right Move your tetromino right.
+sartris_drop Move your tetromino down.
+sartris_rotate_cw Rotate your tetromino clockwise.
+sartris_rotate_ccw Rotate your tetromino counter-clockwise.
+sartris_hold Hold your current tetromino. Only if sartris_use_hold is on.

You can customise the behaviour of SARtris Classic by changing certain 'svars' using svar_set <name> <value>.

Name Default Description
sartris_hud_offset 1000 Offset for the SAR HUD text element at which to draw the game.
sartris_region NTSC Select ROM region. NTSC or PAL.
sartris_draw_next 1 Whether to draw the 'NEXT' piece.
sartris_nes_color 0 Whether to use the NES palette for colors.
sartris_use_7bag 0 Whether to use the 7-Bag randomiser instead of classic. Reduces piece droughts!
sartris_use_hold 0 Enable the ability to hold pieces.

About

NES Tetris for the SAR hud.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published