『楼 主』:
关于chenmingmin发表的篮球飞人扣篮火爆版的改进
呵呵,昨天晚上让我发现了这个DOS批处理室,这里高手云集,所有的人都积极参与讨论,交流,实在令我兴奋不已,于是昨晚情不自禁就通宵了....
namejm 版主更是热心替人解惑!
师者,传道,授业,解惑也
namejm 版主 当之无愧,希望能有更多机会向你学习.
---------------------------------------------------------------------------------------------------------
以下批处理文件内容是我对 chenmingmin chenmingmin发表的篮球飞人扣篮火爆版的改进,感觉更加COOL了,加了个Loading,还有把延时设计得更合理了,只是这个Loading也太久了,若是能减掉一半时间(大概5秒),那会感觉更好了
篮架我也美化了一些,只是,程序运行过程,大家注意一下篮架,怎么会移动位置.
发上来希望得到更进一步优化的地方是:
1. 减少loading 时间
注意: 我希望能够不减少循环次数69次的情况改进,因为窗口宽定为 71字符,减少循环次数的话, >>>>这些字符就不能满行显示了;若是修改宽71的话,后面的扣篮又要改了,麻烦!
2. 程序运行过程组成篮架的字符会移动,不知道为什么,我已经排版好了的,希望能改进..
我是新手,请大家参与一下,谢谢!
----------------------------------------------------------------------------------------------------------
@echo off
title Los Angeles Lakers Kobe Bryant's Incredible Slam Dunk
ping -n 1 127.1>nul
ping -n 1 127.1>nul
ping -n 1 127.1>nul
ping -n 1 127.1>nul
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
cls
@echo off
setlocal enabledelayedexpansion
mode con cols=71 lines=9
rem ">" is an available command,you can add "^" in font of it when you wanna use ">" as a string
set n=^>
for /l %%a in (1,1,69) do (
echo.
echo **********************************************************************
echo ************Kobe Bryant's Incredible Dunk At The Foul Line************
echo **********************************************************************
color e
ping -n 1 127.1>nul
color a
echo.
echo Loading...
echo.
set n=!n!^>
echo !n!
ping -n 1 127.1>nul
dir >nul
cls
)
endlocal
cls
rem The windows is modified to 9 lines,so the following will make sure the string "Program Loaded" is exactly in the center
echo.
echo.
echo.
echo.
echo Program Loaded
rem I'm trying to show people the process of loading,this is the end of loading.You need time to check this,you know.
echo y | pause >nul
echo y | pause >nul
ping -n 2 127.1>nul
ping -n 2 127.1>nul
cls
color a
echo ^|
echo ^|
echo ≤≥^|--^|
echo ^|
echo ^|
echo o ^|
echo /^|\o ^|
echo _____________/_\_____________________________________________________^|
rem Kobe Bryant is running the ball,the process is needed,and it will look more dramatical.
ping -n 1 127.1>nul
ping -n 1 127.1>nul
cls
echo ^|
echo ^|
echo ≤≥^|--^|
echo ^|
echo ^|
echo o ^|
echo /^|\ ^|
echo ________________/_^>_o_______________________________________________^|
ping -n 1 127.1>nul
ping -n 1 127.1>nul
cls
echo ^|
echo ^|
echo ≤≥^|--^|
echo ^|
echo ^|
echo o ^|
echo /^|\o ^|
echo ______________________^>_\___________________________________________^|
ping -n 1 127.1>nul
ping -n 1 127.1>nul
cls
echo ^|
echo ^|
echo ≤≥^|--^|
echo ^|
echo ^|
echo o ^|
echo /^|\ ^|
echo ______________________/_^>_o_________________________________________^|
ping -n 1 127.1>nul
ping -n 1 127.1>nul
ping -n 1 127.1>nul
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
cls
echo ^|
echo ^|
echo ≤≥^|--^|
echo ^|
echo ^|
echo o ^|
echo /^|-o ^|
echo __________________________^>\________________________________________^|
ping -n 1 127.1>nul
cls
echo ^|
echo ^|
echo ≤≥^|--^|
echo ^|
echo ^|
echo o ^|
echo /^|\ ^|
echo ____________________________/_^>_o___________________________________^|
ping -n 1 127.1>nul
cls
echo ^|
echo ^|
echo Here is the foul line: ≤≥^|--^|
echo ^|
echo ^|
echo o ^|
echo /^|-o ^|
echo ________________________________^>^>_________________________________^|
rem Well,this is the key screen,I'm trying to show you that Kobe Bryant starts jumping at the foul line,which is incredible.
ping -n 2 127.1>nul
ping -n 1 127.1>nul
ping -n 1 127.1>nul
ping -n 1 127.1>nul
ping -n 1 127.1>nul
ping -n 1 127.1>nul
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
cls
echo ^|
echo ^|
echo Start Jumping ≤≥^|--^|
echo o ^|
echo o/ ^|
echo /^| ^|
echo ^>\ ^|
echo _____________________________________________________________________^|
ping -n 1 127.1>nul
ping -n 1 127.1>nul
ping -n 1 127.1>nul
ping -n 1 127.1>nul
echo y|pause >nul
echo y|pause >nul
cls
echo ^|
echo ^|
echo o ≤≥^|--^|
echo o^| ^|
echo /^| ^|
echo / ^> ^|
echo ^|
echo _____________________________________________________________________^|
ping -n 1 127.1>nul
ping -n 1 127.1>nul
ping -n 1 127.1>nul
ping -n 1 127.1>nul
ping -n 1 127.1>nul
echo y|pause >nul
echo y|pause >nul
cls
echo ^|
echo o ^|
echo o^| ≤≥^|--^|
echo /^| ^|
echo ^>\ ^|
echo ^|
echo ^|
echo _____________________________________________________________________^|
ping -n 1 127.1>nul
cls
echo o ^|
echo Stagnate in the air for two seconds o/ ^|
echo /^| ≤≥^|--^|
echo / ^> ^|
echo ^|
echo ^|
echo ^|
echo _____________________________________________________________________^|
rem A delay of two seconds in order to make it look like Kobe Bryant is stagnating in the air for one second.
ping -n 3 127.1>nul
cls
echo o ^|
echo o/ ^|
echo /^| ≤≥^|--^|
echo / \ ^|
echo ^|
echo ^|
echo ^|
echo _____________________________________________________________________^|
ping -n 1 127.1>nul
cls
echo ^|
echo o ^|
echo Incredible Slam Dunk o/≤≥^|--^|
echo /^| ^|
echo // ^|
echo ^|
echo ^|
echo _____________________________________________________________________^|
ping -n 1 127.1>nul
ping -n 1 127.1>nul
cls
echo ^|
echo ^|
echo ≤≥^|--^|
echo o ^|
echo o ^|
echo -^|\ ^|
echo ^>^> ^|
echo _____________________________________________________________________^|
ping -n 1 127.1>nul
ping -n 2 127.1>nul
cls
echo ^|
echo ^|
echo ≤≥^|--^|
echo ^|
echo o ^|
echo o ^|
echo /^|\ ^|
echo _________________________________________________________________^>^>^|
ping -n 1 127.1>nul
cls
echo ^|
echo ^|
echo ≤≥^|--^|
echo ^|
echo ^|
echo o o ^|
echo /^|- ^|
echo ________________________________________________________________/_\_ ^|
ping -n 1 127.1>nul
ping -n 1 127.1>nul
ping -n 1 127.1>nul
ping -n 1 127.1>nul
ping -n 1 127.1>nul
ping -n 1 127.1>nul
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
cls
echo ^|
echo ^|
echo ≤≥^|--^|
echo ^|
echo Kobe Bryant ^|
echo o ^|
echo o /^|\ ^|
echo _______________________________________________________________/_\___^|
rem A delay of 3 seconds in order to show the last screen.
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
echo y|pause >nul
ping -n 3 127.1>nul
echo y|pause >nul
rem A Circle in order to run this batch file again and again ,press CTRL+C or just close the windows to stop the excution
slam_dunk.bat [ Last edited by dosmania on 2007-1-3 at 07:08 PM ]
|