errorer / portal_stillalive_python Goto Github PK
View Code? Open in Web Editor NEWA demo of the credit song 'Still Alive' of Portal 1 written in Python, running in 80x24 text terminal
A demo of the credit song 'Still Alive' of Portal 1 written in Python, running in 80x24 text terminal
Portal_StillAlive_Python/still_alive_credit.py
Lines 648 to 651 in b3c2a42
Running the script in the terminal larger than 80x24 would fail to render first few lines properly due to above lines of code.
It's okay to enable new lines here as the cursor is controlled by the control characters and global variables which define the position of the cursor.
当脚本中的英文被替换为中文字符后,一旦制作人员名单部分开始播放,接下来出现的中文字符将在一行中重叠
将
lyrics = [
########## Page 1 ##########
lyric("Forms FORM-29827281-12:", 0, -1, 0),
lyric("Test Assessment Report", 200, -1, 0),
lyric("\00\00\00\00\00\00\00", 400, - \
1, 0), # Keep flushing the buffer
lyric("", 710, 0, 4), # Music start
lyric("This was a triumph.", 730, 2, 0),
lyric("", 930, 0, 5), # Credits start
lyric("I'm making a note here:", 1123, 2, 0),
修改为
lyrics = [
########## Page 1 ##########
lyric("Forms FORM-29827281-12:", 0, -1, 0),
lyric("Test Assessment Report", 200, -1, 0),
lyric("\00\00\00\00\00\00\00", 400, - \
1, 0), # Keep flushing the buffer
lyric("", 710, 0, 4), # Music start
lyric("这是一次伟大的胜利。", 730, 2, 0),
lyric("", 930, 0, 5), # Credits start
lyric("我要在这儿做点记录:", 1123, 2, 0),
在# Credits start
行之后的部分中,中文字符将开始出现重叠情况
lyrics = [
########## Page 1 ##########
lyric("Forms FORM-29827281-12:", 0, -1, 0),
lyric("Test Assessment Report", 200, -1, 0),
lyric("\00\00\00\00\00\00\00", 400, - \
1, 0), # Keep flushing the buffer
lyric("", 710, 0, 4), # Music start
lyric("这是一次伟大的胜利。", 730, 2, 0),
lyric("", 930, 0, 5), # Credits start
lyric("我 要 在 这 儿 做 点 记 录 :", 1123, 2, 0),
# Credits start
行,缺点为右侧的制作人员名单将消失lyrics = [
########## Page 1 ##########
lyric("Forms FORM-29827281-12:", 0, -1, 0),
lyric("Test Assessment Report", 200, -1, 0),
lyric("\00\00\00\00\00\00\00", 400, - \
1, 0), # Keep flushing the buffer
lyric("", 710, 0, 4), # Music start
lyric("这是一次伟大的胜利。", 730, 2, 0),
lyric("我要在这儿做点记录:", 1123, 2, 0),
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.