DOS game with batch ?

Microsoft Windows vista home basic - 32-...
August 1, 2010 at 09:17:04
Specs: Windows Vista, 2.80GHz dual core 1 gb ram
Hello ,
I was wondering if i could make a batch game in notepad.Then saving as batch.Or does this reqire special software.I can not do choice.com in my games because i have vista.
But i want it like pacman you press the up arrow you go up etc... Or is this impossible

See More: DOS game with batch ?

Report •


#1
August 1, 2010 at 10:35:02
I don't believe you will be able to use the arrow keys, it would have to be done with the words "Up", "Down" etc.

It will still take a lot of coding for it to work, you will need to have a screen (couldn't think of a better word) with every position, and if you were to include the pacman ghosts you will need to include them in those screens to.

Here's what I mean

Screen 1:
ooooo
ooooo 5x5 quare with you being the x
ooooo
oooxo

Screen 2:

ooooo
ooooo move to the left you will have to have
ooooo a screen showing your new location
ooxoo

That would go on until you have every possible combination of screens, and then you will have to code for the user input.

like this:

 SET /p input=""
IF "%input%"=="Up" GOTO Screen1
IF "%input%"=="Down" GOTO Screen2
etc.

You would have to have that after every screen with the "GOTO" leading to the next appropriate screen.

----

Now, if you are still wanting to make a game like this, I'd recommend downloading Notepad++. It will help you keep organized and allow you to easily find any mistakes. All you have to do is select "batch" from the language selection screen.

Good luck!

*Sorry about using the word "screen" so much, I couldn't think of a better one!


Report •

#2
August 1, 2010 at 11:10:47
Ok i see hmm.... Could i have graphics in my game or will that have to be a text grapics like this

^*^
| |
<>
I don't know what the heck i just made LOL
Like when i mean grapics i mean this

http://www.discover-net.net/~dmkeil/coco/images/pacman.gif


Report •

#3
August 1, 2010 at 11:47:09
Windows batch (which is based off of MS-DOS) is text based, so no you can't include graphics.

Report •

Related Solutions

#4
August 1, 2010 at 11:54:14
Let me just put it this way:
A batch file does not have the ability to play sounds.
A batch file does not have the ability to display non-text graphics.
A batch file does not have the ability to display text graphics beyond clearing and redrawing from top left to bottom right.
A batch file does not have the ability to accept input beyond entering commands.

While it might be possible to implement the above with third party appliations, it's just much, much, much easier to use DirectX. If C/C++ is too much of a barrier to entry, there's always the .NET languages, Python, and other higher-level languages.

You could also go the web-route and make Flash or Silverlight games. I think Silverlight is free (MS is still trying to get anyone interested in it), but I think you'd have to pay for something capable of making Flash games.


Report •

#5
August 1, 2010 at 12:45:43
Ok i see. But is there a way to make dos games with software.

Report •

#6
August 1, 2010 at 13:27:34
I suppose? There's probably some [undocumented] way to force CMD to display graphics; NTVDM manages it well enough. Why would you want to? It'd be like digging a well with a garden shovel.

Report •

#7
August 1, 2010 at 13:36:46
Thanks !!!
But still is there software to make DOS games

Report •

#8
August 1, 2010 at 21:54:59
Well, DOS is a 16-bit OS, so you'd need a complier capable of producing 16-bit applications.

Again, DirectX or Flash is really the way to go. Name any PC game with the complexity of Pac-Man or up released in the past 15 years, and it uses DirectX.

Also, all official DOS support ends with Win64, so by the time you manage to make anything worth playing, no one will have the ability.


Report •

#9
August 2, 2010 at 06:01:27
You can create games that work under a DOS or command prompt with a program like BASIC (like when the PC was first introduced almost 30 years ago).

Report •

#10
August 2, 2010 at 08:23:29
Ok
I will start with directx

Report •

#11
September 11, 2010 at 22:29:35
Hey i think i have a question that might fight into this thred and here it is...

im wondering if it is possable to make a text-based RPG using only the text editor on MS-DOS in creating the batch file.
also, will coding like this work with this?

cls
@echo off
echo Welcome to My game!
echo.
echo What do you want to do?
echo 1) Start
echo 2) Exit
set /p ---=Enter command:
if %action%==1 goto Start
if %action%==2 goto Exit



Report •

#12
September 12, 2010 at 10:55:05
What you have written will work.

This is a link to one that I actually wrote a while ago. Game

Can I put a question here?


Report •

#13
January 17, 2011 at 13:23:47
Try This Code:

@echo off
set X=1
set Y=1
set value=(xy)
call :template
set g(%x%%y%)=@
Goto Display2

:template
set g(00)=
set g(10)=
set g(20)=
set g(30)=
set g(40)=_
set g(01)=
set g(11)=
set g(21)=
set g(31)=
set g(41)=_
set g(02)=
set g(12)=
set g(22)=
set g(32)=
set g(42)=_
set g(03)=
set g(13)=
set g(23)=
set g(33)=
set g(43)=_
set g(04)=
set g(14)=
set g(24)=
set g(34)=
set g(44)=_
set g(25)=
set g(26)=_
set g(27)=_
set g(28)=_
set g(29)=_
set g(210)=
set g(011)=
set g(012)=
set g(013)=
set g(014)=
set g(015)=
set g(111)=
set g(112)=
set g(113)=
set g(114)=
set g(115)=
set g(211)=
set g(212)=
set g(213)=
set g(214)=
set g(215)=
set g(311)=
set g(312)=
set g(313)=
set g(314)=
set g(315)=
set g(411)=_
set g(412)=_
set g(413)=_
set g(414)=_
set g(415)=_

goto :EOF
:Display
cls
echo Movement Simulator
echo 8=Up 2=Down 6=Left 4=Right 0=Close the program

echo _____ _____
echo I%G(00)%%G(01)%%G(02)%%G(03)%%G(04)%I I%G(011)%%G(012)%%G(013)%%G(014)%%G(015)%I
echo I%G(10)%%G(11)%%G(12)%%G(13)%%G(14)%I____I%G(111)%%G(112)%%G(113)%%G(114)%%G(115)%I
echo I%G(20)%%G(21)%%G(22)%%G(23)%%G(24)%%G(25)%%G(26)%%G(27)%%G(28)%%G(29)%%G(210)%%G(211)%%G(212)%%G(213)%%G(214)%%G(215)%
echo I%G(30)%%G(31)%%G(32)%%G(33)%%G(34)%I I%G(311)%%G(312)%%G(313)%%G(314)%%G(315)%I
echo I%G(40)%%G(41)%%G(42)%%G(43)%%G(44)%I I%G(411)%%G(412)%%G(413)%%G(414)%%G(415)%I
goto :EOF

:Display1
if %x% LSS 0 set /a X=0
if %y% LSS 0 set /a Y=0
if %x% EQU 1 if %y% EQU 6 set /a x=2
if %x% EQU 3 if %y% EQU 6 set /a x=2
if %x% EQU 1 if %y% EQU 7 set /a x=2
if %x% EQU 3 if %y% EQU 7 set /a x=2
if %x% EQU 1 if %y% EQU 8 set /a x=2
if %x% EQU 3 if %y% EQU 8 set /a x=2
if %x% EQU 1 if %y% EQU 9 set /a x=2
if %x% EQU 3 if %y% EQU 9 set /a x=2
if %x% EQU 5 if %y% EQU 0 set /a x=4
if %x% EQU 5 if %y% EQU 1 set /a x=4
if %x% EQU 5 if %y% EQU 2 set /a x=4
if %x% EQU 5 if %y% EQU 3 set /a x=4
if %x% EQU 5 if %y% EQU 4 set /a x=4
if %x% EQU 5 if %y% EQU 11 set /a x=4
if %x% EQU 5 if %y% EQU 12 set /a x=4
if %x% EQU 5 if %y% EQU 13 set /a x=4
if %x% EQU 5 if %y% EQU 14 set /a x=4
if %x% EQU 5 if %y% EQU 15 set /a x=4

if %y% EQU 5 if %x% EQU 0 set /a y=4
if %y% EQU 5 if %x% EQU 1 set /a y=4
if %y% EQU 5 if %x% EQU 3 set /a y=4
if %y% EQU 5 if %x% EQU 4 set /a y=4
if %y% EQU 10 if %x% EQU 0 set /a y=11
if %y% EQU 10 if %x% EQU 1 set /a y=11
if %y% EQU 10 if %x% EQU 3 set /a y=11
if %y% EQU 10 if %x% EQU 4 set /a y=11
if %y% EQU 16 if %x% EQU 0 set /a y=15
if %y% EQU 16 if %x% EQU 1 set /a y=15
if %y% EQU 16 if %x% EQU 3 set /a y=15
if %y% EQU 16 if %x% EQU 4 set /a y=15

call :template
set G(%X%%Y%)=@
goto display2

:Display2
call :display
goto prompt

:prompt
choice /c:82460 /N
if %errorlevel% EQU 1 set /a X=%X%-1
if %errorlevel% EQU 2 set /a X=%X%+1
if %errorlevel% EQU 3 set /a Y=%Y%-1
if %errorlevel% EQU 4 set /a Y=%Y%+1
if %errorlevel% EQU 5 goto END
goto display1

:END
cls
echo Are you sure you want to end the game?
echo (y/n)
choice /c:yn /N
if %errorlevel% EQU 1 exit
if %errorlevel% EQU 2 goto Display2

exit


Report •

Ask Question