Solved How To Make a Batch Game Have Movement

June 20, 2014 at 07:41:55
Specs: Windows 7
I know you have to make a grid and set x and y to something, but I don't know how to do it.
I want to make a game that has an object bouncing off of the walls and a little platform that the player would control, and when the ball hits certain objects those objects will disappear and all that stuff. I'm really lost here and would greatly appreciate some help.

I'm talking about a game like this:

_________________
|............................| The O would be the ball.
|....###.................| and it would be able to
|......#................... | bounce off of the walls
|............................| and break the objects
|...................O...... | (#) when it hits them.
|............................|
|......------...............| ------ = platform
|________________|

message edited by Person23


See More: How To Make a Batch Game Have Movement

Report •


✔ Best Answer
June 22, 2014 at 21:52:33
Man, you have a lot of patience! But you need to study and learn to use loops and subroutines to your advantage. Also, in my opinion, you're way overcomplicating things. You had the right idea, with the "f" variable series. All you needed to do was build a "cieling" (north wall) and a "floor" (south wall) as "f" vars, then for each line of vars between, start and end with vertical wall char.s. I don't know where this "boundary" stuff came in, but it's not necessary.Anyway, I cannot work with your code, as I don't have the patience, so i can only supply my version (including rudimentary "move" analysis):
@echo off & setlocal
::dimensions of room - vary to suit!
set width=12
set depth=10
set /a q=depth+1
::initial location x-y coordinates of character {x=row="r", y=col="c"}
set r=3
set c=1
set a%r%_%c%=@
:: random block(s) - vary as needed!
set a6_4=°
set a9_7=#

::build room - cieling {x=0, north wall}
set left=É
set right=»
set mid=Í
call :line 0
:: - floor {x=depth, south wall}
set left=È
set right=¼
call :line %q%


set beg=1
set end=%depth%
set step=1

:refresh
:: - x=1..depth-1, central arena
set left=º
set right=º
(set mid= )
for /L %%a in (%beg% %step% %end%) do call :line %%a

:: display room
cls
for /L %%a in (0 1 %q%) do echo !line%%a!

:move
set tc=%c%
set tr=%r%
:: why do you guys always insist on these instead of numeric keypad? Oh well...
choice /c:wasd /n
if %errorlevel%==4 set /a tc+=1
if %errorlevel%==3 set /a tr+=+1
if %errorlevel%==2 set /a tc-=1
if %errorlevel%==1 set /a tr-=1
if "!f%tr%_%tc%!" neq " " goto :move

set beg=%r%
set end=%tr%
set /a step=tr-r
if %step% equ 0 set step=1
set a%r%_%c%=
set r=%tr%
set c=%tc%
set a%r%_%c%=@
rem echo refreshing %r% %step% %end%
goto :refresh

:line
::build the map into sequential {array} var. Fx_y where x is vert, y is horiz
set f%1_0=%left%
set f%1_%width%=%right%
set /a k=width-1
for /L %%b in (1 1 %k%) do if defined a%1_%%b (set f%1_%%b=!a%1_%%b!) else (set f%1_%%b=%mid%)

::build lines for display
set line%1=
for /L %%b in (0 1 %width%) do set line%1=!line%1!!f%1_%%b!
::====== end
I don't think you will ever make any significant progress using your current technique (brute force). You need to think in terms of loops and subroutines. Loops require knowledge of variable expansion (echo !f%r%_%c%!) At any rate, the above 72 lines of script effectively replace the 167 lines of "brute force" and work much better in all respects - not to brag, just to demonstrate the difference in approach.



#1
June 20, 2014 at 20:40:19
well, for one thing, your temporal resolution is limited to "CHOICE.EXE", which is limited to one action per second, so the player can only make one move per second (unless you harness a third-party keyboard sampler). Also, your angles of ricochet are limited to increments of 45 degrees from zero, due to text display restrictions (unless you work in finer angles by jumping greater increments in one dimension than the other, which would make the display jumpy.) I highly dis-recommend batch-video approach to real-time games,
(if you want a cheap-and-easy lang, use a BASIC derivative)
although I did succumb to the batch tempatation once, on which I wasted way too much time:

@echo off & setlocal enabledelayedexpansion
:: allowable spaces for moves {not "walls" or obstacles}
set mov=@[]._V+
set @h=.
set zi=0
::speed, or frequency of random moves, in seconds - minimum one
set spd=1
cls
:: load ascii "painting" or map of a room stored as text
set room=room2
call :loadroom
goto :input

:loadroom
set I=-1
for /f "tokens=*" %%a in (%room%) do (
set /a I+=1
set line!I!=%%a
)
:: setting blox to 1 disables random blockads, higher values will enable
set /a blox=I*3
set blox=1
set r=
:: allow for variable widths of rooms
for /L %%a in (0 1 %I%) do (
for /L %%b in (0 1 80) do (
set a%%a_%%b=!line%%a:~%%b,1!
:: determine horiz. max since it's variable
if %%a equ 0 (
if defined a0_%%b set J=%%b
) else (
if !a%%a_%%b! equ . (
set /a x=!random!"%%"blox
if %%b equ !x! set a%%a_%%b=#& set r=%%a
)
)
if /i !a%%a_%%b!==Z (
set /a zi+=1
set z!zi!r=%%a
set z!zi!c=%%b
set z!zi!h=.
)
if !a%%a_%%b!==@ (
set @r=%%a
set @c=%%b
)
)
if defined r call :update
echo !line%%a!
)
set zs=%zi%
echo use numeric keypad for moves
set to=/t:5,%spd%
goto :eof

:input
set ix=@
set id=@
set r=%@r%
set c=%@c%
set test=
choice /c:123456789qe /n %to%
set test=%errorlevel%
if %test% gtr 9 goto :goodbye
call :move
rem if %test% equ 5 (
rem goto :zpass
rem ) else (
rem call :move
rem )

:: zombie match player, end game
if defined f goto :goodbye
rem call :%x% 2>nul
set @r=%r%
set @c=%c%

:zpass
:: lazy player, pass move to zombie random
set ix=Z
for /L %%a in (1 1 %zs%) do (
set id=z%%a
set f=
call :zombie z%%a
if defined f goto :goodbye
)
call :refresh
goto :input

:move
set f=
if %test% equ 5 goto :eof
set /a fwd=test"%%"3
set /a bck=(test-1)"%%"3
set tr=%r%
set tc=%c%
if %test% lss 4 set /a tr+=1
if %test% gtr 6 set /a tr-=1
if %fwd% equ 0 set /a tc+=1
if %bck% equ 0 set /a tc-=1
rem echo one: %tr% %tc% !a%tr%_%tc%! r:%r% c:%c%

set x=!a%tr%_%tc%!

set movtest=!mov:%x%=!
rem echo two: x[%x%][!x!] %mov% %movtest% id:%id%
:: enable the following to allow zombie wall penetration
rem if %id% equ @ if %movtest% equ %mov% goto :eof
if %movtest% equ %mov% goto :eof
if /i %x% equ @ set f=1
rem if /i %x% equ Z set f=1
set a%tr%_%tc%=%ix%
set a%r%_%c%=!%id%h!
set %id%h=%x%

call :update

set c=%tc%
if %tr% neq %r% (
set r=!tr!
call :update)
set r=%tr%
rem if defined f goto :eof
goto :eof

:refresh
cls
for /L %%a in (0 1 %I%) do echo !line%%a!
goto :eof

:update
set line%r%=
for /L %%a in (0 1 %J%) do (
set line%r%=!line%r%!!a%r%_%%a!
)
goto :eof

:zombie
set id=%1
rem echo zombie===========%id% !%id%r! !%id%c!
rem pause
rem set to=/t:5,%spd%
set /a test=%random%"%%"10
rem goto :z
set /a rr=%id%r-@r
set /a cc=%id%c-@c
set dx=%rr:-=%
set dy=%cc:-=%
if %dx% gtr 4 goto :z
if %dy% gtr 4 goto :z
set to=
set zlr=2
set zud=3
set test=5
if %rr% gtr 0 set test=8
if %rr% lss 0 set test=2
if %cc% lss 0 set /a test+=1
if %cc% gtr 0 set /a test-=1
:z
set r=!%id%r!
set c=!%id%c!
call :move
if /i %x% equ @ goto :eof
echo [%@r% %@c%][!%id%r! !%id%c!]
rem pause
rem if "%@r% %@c%" equ "!%id%r! !%id%c!" goto :goodbye
:: zombie intelligence very tedious. Try certain moves if no movement
rem if !zr%zi%!!zc%zi%! equ %r%%c% (
rem call :brains
rem goto :z
rem )
set %id%r=%r%
set %id%c=%c%
goto :eof

:brains
:: all zombie intelligence stored here.
goto :eof
if %test% gtr 6 (
set /a test-=3
if %test% equ 5 if %zlr% neq 6 (
set /a zlr+=2
set test=%zlr%
goto :z
)
)
if %test% lss 4 (
set /a test+=3
if %test% equ 5 if %zlr% neq 6 (
set /a zlr+=2
set test=%zlr%
goto :z
)
)
if %zud% neq -1 (
set /a test+=zud
set /a zud=-zud
if !zud! equ -3 set zud=1
goto :z
)
goto :eof

:chk
if %x% equ @ echo x: %x% & goto :goodbye
if %x% equ Z echo x: %x% & goto :goodbye
goto :eof

:goodbye
call :refresh
echo goodbye!
pause>nul
exit /b

::=========== END BATCH ---- CONTENTS OF "ROOM2" TEXT FILE:
The room design determines initial location and number of zombies, as well as initial location and predicament of player. Add or remove Z's for Zombies, add or remove walls, obstacles etc for room dynamics.

####################
#........_.........#
#.......#V#........#
#.......###........#
#..................#
#._................#
#[.]...............#
#[@]............Z.Z#
####################

message edited by nbrane


Report •

#2
June 20, 2014 at 23:49:40
Thanks, but I figured out how to make a character move and now I would like to know how to do this:

How do I make a block that the character cannot go through?

Also, how do I make it so the character cannot go outside of the walls?

Here's my code:

@echo off

:setup
set x=0
set y=9
set p=%x%.%y%
set texture=
set block=2.3
for /l %%a in (0,1,9) do (
for /l %%b in (0,1,9) do (
set f%%a.%%b=%texture%
)
)

:grid
set f%p%=@
set f%block%=°
cls
echo ÉÍÍÍÍÍÍÍÍÍÍ»
echo º%f0.9%%f1.9%%f2.9%%f3.9%%f4.9%%f5.9%%f6.9%%f7.9%%f8.9%%f9.9%º
echo. º%f0.8%%f1.8%%f2.8%%f3.8%%f4.8%%f5.8%%f6.8%%f7.8%%f8.8%%f9.8%º
echo. º%f0.7%%f1.7%%f2.7%%f3.7%%f4.7%%f5.7%%f6.7%%f7.7%%f8.7%%f9.7%º
echo. º%f0.6%%f1.6%%f2.6%%f3.6%%f4.6%%f5.6%%f6.6%%f7.6%%f8.6%%f9.6%º
echo. º%f0.5%%f1.5%%f2.5%%f3.5%%f4.5%%f5.5%%f6.5%%f7.5%%f8.5%%f9.5%º
echo. º%f0.4%%f1.4%%f2.4%%f3.4%%f4.4%%f5.4%%f6.4%%f7.4%%f8.4%%f9.4%º
echo. º%f0.3%%f1.3%%f2.3%%f3.3%%f4.3%%f5.3%%f6.3%%f7.3%%f8.3%%f9.3%º
echo. º%f0.2%%f1.2%%f2.2%%f3.2%%f4.2%%f5.2%%f6.2%%f7.2%%f8.2%%f9.2%º
echo. º%f0.1%%f1.1%%f2.1%%f3.1%%f4.1%%f5.1%%f6.1%%f7.1%%f8.1%%f9.1%º
echo. º%f0.0%%f1.0%%f2.0%%f3.0%%f4.0%%f5.0%%f6.0%%f7.0%%f8.0%%f9.0%º
echo ÈÍÍÍÍÍÍÍÍÍͼ

:controls
choice /c:wasd /n
if %errorlevel%==4 set face=right
if %errorlevel%==3 set face=down
if %errorlevel%==2 set face=left
if %errorlevel%==1 set face=up

:move
set f%p%=%texture%

if %face%==right set /a x+=1 y=%y%
if %p%==%block% set /a x=%x% -1

if %face%==down set /a y-=1 x=%x%
if %p%==%block% set /a y=%y% +1

if %face%==left set /a x-=1 y=%y%
if %p%==%block% set /a x=%x% +1

if %face%==up set /a y+=1 x=%x%
if %p%==%block% set /a y=%y% -1

set p=%x%.%y%
goto grid


If you save that as a batch file, you'll notice the character just goes behind the obstacle instead of being blocked by it, and that the character can just go outside of the walls.


Report •

#3
June 21, 2014 at 12:47:03
extract from the previous response:
:: allowable spaces for moves {not "walls" or obstacles}
set mov= @[]._V+
...
...
::load the character from the intended target coordinate of the map
set x=!a%tr%_%tc%!

:: test the target coordinate value to see if it's permissable (penetrable or not)
:: BEFORE moving the character
:: this is done by comparing against a set of allowable chars stored in %mov%
:: it could more simply be done with a series of IF statements, but I chose this way
set movtest=!mov:%x%=!
:: enable the following to allow zombie wall penetration
rem if %id% equ @ if %movtest% equ %mov% goto :eof
:: if the replacement is unchanged, the intended target is impermeable
if %movtest% equ %mov% goto :eof


Report •

Related Solutions

#4
June 21, 2014 at 17:18:57
Sorry, I know I'm probably annoying you but I don't really understand the code you wrote.

Report •

#5
June 21, 2014 at 18:48:29
Nah. If i wasn't inclined to respond, I would not have "taken the bait". Your work is close, but no cigar. You need an "fully active" map. Instead, you are setting the boundaries using constants, when they should be part of the map. (It's either that or "count steps", which is a MAJOR pita. I would never recommend that approach,: Example: IF X=10 IF Y=10 GOTO :FORBIDDEN MOVE
I recommend you load your complete map into variables, not just the "interior". This will allow you to build walls and obstructions, as well as place "pits" and "ladders" to other levels (rooms). That's why I used the approach I did in my script. The room design is purely text, inluding the initial placement of the character and the antagonists. Each room is fully active, so I can test for barriers by testing the variable representing the contents of any given coordinate. You already have the idea, using a var. set based on rows and columns. You just need to include the walls etc.

Report •

#6
June 21, 2014 at 19:06:35
Oh, ok. I get it now, thanks!

message edited by Person23


Report •

#7
June 21, 2014 at 21:30:46
Wait, you said to make my map "fully active" and to include the boundaries as part of my map, and I did that. But I still don't know how to make it so that the character cannot pass through the "walls". I tried saying that if the character's position on the map is equal to the wall's position on the map, to set the character's position to where it was before it tried passing through the wall, but all that happens is the character disappears behind the "wall" and when I try to bring it back inside of the boundary (wall) it comes back in.
Not really sure how to fix that.....If you know how to fix that can you please "dumb it down" for me? As you've probably noticed I'm not the great at understanding your scripting.

message edited by Person23


Report •

#8
June 22, 2014 at 13:03:06
Well, your set of "f" variables should now be extended by two elements in both dimensions (vert. and horiz) and the end-elements should now contain the wall/corner characters. With that understood, it's very simple: after calculating the intended target (row, column) of the move, but before moving, test the contents of the intended coordinates to see if it's a space. If it's not a space, don't move the character, otherwise proceed with the move.

Feel free to post your current script if you can't fix this and I'll try to help with this problem (but not necessarily other problems!)


Report •

#9
June 22, 2014 at 14:32:07
Thank you, but I've only done the actual "wall" part for the top part of the top left corner, as I want to make sure it works before I do it for all of it.


@echo off

:setup
set x=1
set y=8
set p=%x%.%y%
set texture=
set block=2.3
set boundary1=0.9
set boundary2=1.9
set boundary3=2.9
set boundary4=3.9
set boundary6=4.9
set boundary7=5.9
set boundary8=6.9
set boundary9=7.9
set boundary10=8.9
set boundary11=9.9
set boundary12=9.8
set boundary13=9.7
set boundary14=9.6
set boundary15=9.5
set boundary16=9.4
set boundary17=9.3
set boundary18=9.2
set boundary19=9.1
set boundary20=9.0
set boundary21=8.0
set boundary22=7.0
set boundary23=6.0
set boundary24=5.0
set boundary25=4.0
set boundary26=3.0
set boundary27=2.0
set boundary28=1.0
set boundary29=0.0
set boundary30=0.1
set boundary31=0.2
set boundary32=0.3
set boundary33=0.4
set boundary34=0.5
set boundary35=0.6
set boundary36=0.7
set boundary37=0.8
for /l %%a in (0,1,9) do (
for /l %%b in (0,1,9) do (
set f%%a.%%b=%texture%
)
)

:grid
set f%p%=@
set f%block%=°
set f%boundary1%=É
set f%boundary2%=Í
set f%boundary3%=Í
set f%boundary4%=Í
set f%boundary5%=Í
set f%boundary6%=Í
set f%boundary7%=Í
set f%boundary8%=Í
set f%boundary9%=Í
set f%boundary10%=Í
set f%boundary11%=»
set f%boundary12%=º
set f%boundary13%=º
set f%boundary14%=º
set f%boundary15%=º
set f%boundary16%=º
set f%boundary17%=º
set f%boundary18%=º
set f%boundary19%=º
set f%boundary20%=¼
set f%boundary21%=Í
set f%boundary22%=Í
set f%boundary23%=Í
set f%boundary24%=Í
set f%boundary25%=Í
set f%boundary26%=Í
set f%boundary27%=Í
set f%boundary28%=Í
set f%boundary29%=È
set f%boundary30%=º
set f%boundary31%=º
set f%boundary32%=º
set f%boundary33%=º
set f%boundary34%=º
set f%boundary35%=º
set f%boundary36%=º
set f%boundary37%=º
cls
echo Controls: W=up A=left S=down D=right
echo.
echo. %f0.9%%f1.9%%f2.9%%f3.9%%f4.9%%f5.9%%f6.9%%f7.9%%f8.9%%f9.9%
echo. %f0.8%%f1.8%%f2.8%%f3.8%%f4.8%%f5.8%%f6.8%%f7.8%%f8.8%%f9.8%
echo. %f0.7%%f1.7%%f2.7%%f3.7%%f4.7%%f5.7%%f6.7%%f7.7%%f8.7%%f9.7%
echo. %f0.6%%f1.6%%f2.6%%f3.6%%f4.6%%f5.6%%f6.6%%f7.6%%f8.6%%f9.6%
echo. %f0.5%%f1.5%%f2.5%%f3.5%%f4.5%%f5.5%%f6.5%%f7.5%%f8.5%%f9.5%
echo. %f0.4%%f1.4%%f2.4%%f3.4%%f4.4%%f5.4%%f6.4%%f7.4%%f8.4%%f9.4%
echo. %f0.3%%f1.3%%f2.3%%f3.3%%f4.3%%f5.3%%f6.3%%f7.3%%f8.3%%f9.3%
echo. %f0.2%%f1.2%%f2.2%%f3.2%%f4.2%%f5.2%%f6.2%%f7.2%%f8.2%%f9.2%
echo. %f0.1%%f1.1%%f2.1%%f3.1%%f4.1%%f5.1%%f6.1%%f7.1%%f8.1%%f9.1%
echo. %f0.0%%f1.0%%f2.0%%f3.0%%f4.0%%f5.0%%f6.0%%f7.0%%f8.0%%f9.0%

:controls
choice /c:wasd /n
if %errorlevel%==4 set face=right
if %errorlevel%==3 set face=down
if %errorlevel%==2 set face=left
if %errorlevel%==1 set face=up

:move
set f%p%=%texture%
if %face%==right set /a x+=1 y=%y%
if %face%==down set /a y-=1 x=%x%
if %face%==left set /a x-=1 y=%y%
if %face%==up set /a y+=1 x=%x%

if %p%==%boundary1% goto forbiddenmove
if %p%==%boundary2% goto forbiddenmove
if %p%==%boundary3% goto forbiddenmove
if %p%==%boundary4% goto forbiddenmove
if %p%==%boundary5% goto forbiddenmove
if %p%==%boundary6% goto forbiddenmove
if %p%==%boundary7% goto forbiddenmove
if %p%==%boundary8% goto forbiddenmove
if %p%==%boundary9% goto forbiddenmove
if %p%==%boundary10% goto forbiddenmove
if %p%==%boundary11% goto forbiddenmove
if %p%==%boundary12% goto forbiddenmove
if %p%==%boundary13% goto forbiddenmove
if %p%==%boundary14% goto forbiddenmove
if %p%==%boundary15% goto forbiddenmove
if %p%==%boundary16% goto forbiddenmove
if %p%==%boundary17% goto forbiddenmove
if %p%==%boundary18% goto forbiddenmove
if %p%==%boundary19% goto forbiddenmove
if %p%==%boundary20% goto forbiddenmove
if %p%==%boundary21% goto forbiddenmove
if %p%==%boundary22% goto forbiddenmove
if %p%==%boundary23% goto forbiddenmove
if %p%==%boundary24% goto forbiddenmove
if %p%==%boundary25% goto forbiddenmove
if %p%==%boundary26% goto forbiddenmove
if %p%==%boundary27% goto forbiddenmove
if %p%==%boundary28% goto forbiddenmove
if %p%==%boundary29% goto forbiddenmove
if %p%==%boundary30% goto forbiddenmove
if %p%==%boundary31% goto forbiddenmove
if %p%==%boundary32% goto forbiddenmove
if %p%==%boundary33% goto forbiddenmove
if %p%==%boundary34% goto forbiddenmove
if %p%==%boundary35% goto forbiddenmove
if %p%==%boundary36% goto forbiddenmove
if %p%==%boundary37% goto forbiddenmove
if %p%==%boundary38% goto forbiddenmove

set p=%x%.%y%
goto grid

:forbiddenmove
if %p%==%boundary2% (
set x=1
set y=8
)
set p=%x%.%y%
goto grid


Report •

#10
June 22, 2014 at 21:52:33
✔ Best Answer
Man, you have a lot of patience! But you need to study and learn to use loops and subroutines to your advantage. Also, in my opinion, you're way overcomplicating things. You had the right idea, with the "f" variable series. All you needed to do was build a "cieling" (north wall) and a "floor" (south wall) as "f" vars, then for each line of vars between, start and end with vertical wall char.s. I don't know where this "boundary" stuff came in, but it's not necessary.Anyway, I cannot work with your code, as I don't have the patience, so i can only supply my version (including rudimentary "move" analysis):
@echo off & setlocal
::dimensions of room - vary to suit!
set width=12
set depth=10
set /a q=depth+1
::initial location x-y coordinates of character {x=row="r", y=col="c"}
set r=3
set c=1
set a%r%_%c%=@
:: random block(s) - vary as needed!
set a6_4=°
set a9_7=#

::build room - cieling {x=0, north wall}
set left=É
set right=»
set mid=Í
call :line 0
:: - floor {x=depth, south wall}
set left=È
set right=¼
call :line %q%


set beg=1
set end=%depth%
set step=1

:refresh
:: - x=1..depth-1, central arena
set left=º
set right=º
(set mid= )
for /L %%a in (%beg% %step% %end%) do call :line %%a

:: display room
cls
for /L %%a in (0 1 %q%) do echo !line%%a!

:move
set tc=%c%
set tr=%r%
:: why do you guys always insist on these instead of numeric keypad? Oh well...
choice /c:wasd /n
if %errorlevel%==4 set /a tc+=1
if %errorlevel%==3 set /a tr+=+1
if %errorlevel%==2 set /a tc-=1
if %errorlevel%==1 set /a tr-=1
if "!f%tr%_%tc%!" neq " " goto :move

set beg=%r%
set end=%tr%
set /a step=tr-r
if %step% equ 0 set step=1
set a%r%_%c%=
set r=%tr%
set c=%tc%
set a%r%_%c%=@
rem echo refreshing %r% %step% %end%
goto :refresh

:line
::build the map into sequential {array} var. Fx_y where x is vert, y is horiz
set f%1_0=%left%
set f%1_%width%=%right%
set /a k=width-1
for /L %%b in (1 1 %k%) do if defined a%1_%%b (set f%1_%%b=!a%1_%%b!) else (set f%1_%%b=%mid%)

::build lines for display
set line%1=
for /L %%b in (0 1 %width%) do set line%1=!line%1!!f%1_%%b!
::====== end
I don't think you will ever make any significant progress using your current technique (brute force). You need to think in terms of loops and subroutines. Loops require knowledge of variable expansion (echo !f%r%_%c%!) At any rate, the above 72 lines of script effectively replace the 167 lines of "brute force" and work much better in all respects - not to brag, just to demonstrate the difference in approach.


Report •

#11
June 24, 2014 at 04:40:25
Thanks, um before you mentioned that you don't recommend batch for these types of games. What basic language do you think I should learn? (I've been doing batch for about 4 weeks).

Report •

#12
June 24, 2014 at 18:40:24
"What basic language do you think I should learn?" Ha ha! What's more basic than BASIC? But that ("what language") is a highly opinionated topic. Fwiw, I recommend QBASIC for a "starter kit", as long as you have the help-structure functional (or a book). Next step up is visual basic, which can mostly run straight QB, but also a whole lot more that doesn't pertain to your game. Oh, and forget anything I said as per 64-bit systems, which won't be supported. QB is compileable for 16/32 bit systems (you can make into a "executable" .exe file), and has plenty of power (actually far more) for what you're doing, and it prints to the "dos" screen. At any rate, you probably need a good "primer" to help you with programming concepts (or a tutor/geek-friend etc). Mostly, in this case, how to use 2-dimensional arrays, and efficient use of subroutines and looping technique. The language is far less important than the concepts, which apply to most all languages. Hope this helps.

Ps: if you want QB and can't find it, I can prob'ly get it to you. I don't think it's protected anymore. Other languages also available for free: Pascal, Perl, Python, C various, via the internet.


Report •


Ask Question