GithubHelp home page GithubHelp logo

errorer / portal_stillalive_python Goto Github PK

View Code? Open in Web Editor NEW
124.0 124.0 18.0 4.31 MB

A demo of the credit song 'Still Alive' of Portal 1 written in Python, running in 80x24 text terminal

Python 100.00%

portal_stillalive_python's People

Contributors

chirsz-ever avatar errorer avatar tizee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

portal_stillalive_python's Issues

Missing line break in the beginning of lines

_print(' -------------------------------------- -------------------------------------- ', False)
_print('| || |', False)
_print('| || |', False)
_print('| | -------------------------------------- ', False)

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.

recording

当脚本中的英文被替换为中文字符后,一旦制作人员名单部分开始播放,接下来出现的中文字符将在一行中重叠

问题描述

当脚本中的英文被替换为中文字符后,一旦制作人员名单部分开始播放,接下来出现的中文字符将在一行中重叠

复现方法

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),

Screenshot_20230408_200226
# Credits start行之后的部分中,中文字符将开始出现重叠情况

临时解决方法

  1. 在中文中添加空格
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),
  1. 删除# 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),

Tutorial needed

Is this a way you can make a tutorial for linux dummies such as myself I was attempting to show my friend your program but couldn't get it to run.
Screenshot 2022-10-24 9 50 00 AM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.