China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-28 23:05
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Initial version of space random walk particles + snake game View 2,168 Replies 7
Original Poster Posted 2008-09-21 09:06 ·  中国 广东 揭阳 电信
银牌会员
★★★★
SuperCleaner
Credits 2,362
Posts 1,133
Joined 2008-02-02 21:36
18-year member
UID 110072
Gender Male
Status Offline
-----------------------Spatial Random Walk Particles----------------------------
@echo off
setlocal enabledelayedexpansion
mode con cols=60 lines=30
for /l %%a in (1,1,60) do (set space= !space!)
set /a line=14,col=29
:loop
set /a linenext=%random%%%30
set /a colnext=%random%%%60
for %%a in (line col) do (
if !%%a! lss !%%anext! (set %%aadd=+) else (set %%aadd=-)
)
:loop-1
if %line% neq %linenext% (
set /a line%lineadd%=1
) else (
set /a col%coladd%=1
)
cls
for /l %%a in (1,1,%line%) do echo,
echo,!space:~0,%col%!*
for /l %%a in (1,1,200) do (echo,>nul)
if %col% neq %colnext% (goto :loop-1)
goto :loop


----------------------Similar to Snake

@echo off
title made by 523066680
setlocal enabledelayedexpansion
mode con cols=61 lines=31
for /l %%a in (1,1,60) do (set space= !space!)
for /l %%a in (1,1,30) do (set L%%a=%space%)
set /a line=15,col=29,i=0
:loop
set /a linenext=%random%%%30+1,colnext=%random%%%60
for %%a in (line col) do (
if !%%a! lss !%%anext! (set %%aadd=+) else (set %%aadd=-)
)
:loop-1
if %i% lss 20 (set /a i+=1) else (set i=1)
if defined cut%i% (
!cut%i%:"=!
set "L%a%=!L%a%:~0,%b%! !L%a%:~%c%!"
)
set /a C2=col+1
set "L%line%=!L%line%:~0,%col%!*!L%line%:~%C2%!"
set cut%i%="set /a a=%line%,b=%col%,c=%C2%"
cls
for /l %%a in (1,1,30) do echo,!L%%a!
for /l %%a in (1,1,300) do (echo,>nul)
if %line% neq %linenext% (
set /a line%lineadd%=1
) else (
set /a col%coladd%=1
)
if %col% neq %colnext% (goto :loop-1)
goto :loop


[ Last edited by 523066680 on 2008-10-1 at 08:38 ]
Recent Ratings for This Post ( 5 in total) Click for details
RaterScoreTime
BC +1 2008-09-21 09:09
pusofalse +7 2008-09-21 09:21
zqz0012005 +3 2008-09-28 23:21
radem +2 2008-09-30 21:16
netbenton +8 2009-05-07 09:11
Floor 2 Posted 2008-09-21 09:09 ·  中国 广东 江门 电信
中级用户
★★
Credits 338
Posts 175
Joined 2007-10-21 15:30
18-year member
UID 100351
Gender Male
Status Offline
exist comes in and immediately makes such a powerful animation... support!
Floor 3 Posted 2008-09-28 22:25 ·  中国 浙江 宁波 慈溪市 电信
初级用户
Credits 62
Posts 24
Joined 2008-09-17 19:59
17-year member
UID 125888
Gender Male
Status Offline
Even in the cmd window, even making a small special effect, the CPU is at 100%. This is probably the most disappointing thing for experts about cmd; otherwise, more wonderful things would definitely be seen~
Floor 4 Posted 2008-09-30 09:07 ·  中国 广东 揭阳 电信
银牌会员
★★★★
SuperCleaner
Credits 2,362
Posts 1,133
Joined 2008-02-02 21:36
18-year member
UID 110072
Gender Male
Status Offline
The code in the post on the first floor has been updated
Floor 5 Posted 2008-10-01 00:27 ·  中国 浙江 宁波 慈溪市 电信
初级用户
Credits 62
Posts 24
Joined 2008-09-17 19:59
17-year member
UID 125888
Gender Male
Status Offline
This code is really wonderful. The owner should make some text effects to be more eye-catching. The practicality is insufficient~~~
Floor 6 Posted 2008-10-01 08:05 ·  中国 广东 揭阳 电信
银牌会员
★★★★
SuperCleaner
Credits 2,362
Posts 1,133
Joined 2008-02-02 21:36
18-year member
UID 110072
Gender Male
Status Offline
Do you know that I learned batch processing precisely for the sake of special effects?
I learned batch processing entirely because I like the special effects made by seniors and I also hope to have original ones.

Regarding practicality, there are already many practical codes in the forum, and I can't think of any innovative things to come up with, so I chose to develop in the special effects category.

[ Last edited by 523066680 on 2008-10-1 at 08:06 ]
Floor 7 Posted 2008-10-01 16:27 ·  中国 福建 三明 电信
中级用户
★★
Credits 458
Posts 211
Joined 2006-07-26 19:42
20-year member
UID 59307
Status Offline
It's quite good from special effects to games, and it has also become practical.

Can't science also turn useless tricks into powerful weapons?

You're so amazing.
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
523066680 +5 2008-10-12 10:12
┌───────┐
├→学习→实践→┤
└───────┘
Floor 8 Posted 2008-10-12 10:12 ·  中国 广东 揭阳 电信
银牌会员
★★★★
SuperCleaner
Credits 2,362
Posts 1,133
Joined 2008-02-02 21:36
18-year member
UID 110072
Gender Male
Status Offline
Deeply grateful for the support from wxcute!
Forum Jump: