how to make a object move in a batch file game

January 6, 2020 at 11:58:44
Specs: Windows 10
i have a problem i want to make a batch game i have the layout in a txt file but i have no idea how to make it move the object which is a '>'

See More: how to make a object move in a batch file game

Reply ↓  Report •

#1
January 6, 2020 at 16:28:40
I went through this many years back:
https://www.computing.net/answers/p...
and far as I know, the short answer's still the same (assuming console and not GUI-based):
:init
create/load a set of variables, one per "raster" (horizontal) line of the field
(the length of the variables will all be the same and marks the width of the field, the number of variables marks the depth of the field)
:repeat
display the variables
change one or more of them based on a user input, randomness, calculations
clear the screen (cls)
goto :repeat

I really don't want to dive back into that mess all over again. I think the samples from that thread may still work. regardless, the concept is the same.
And ok, I did check the current 'choice.exe' for win-7 and it differs from older versions. this line needed changed, otherwise it ran ok:
change from: set to=/t:5,%spd%
to: set to=/t:%spd% /d:5
OH! and VERY IMPORTANT, I strongly recommend you not use > as your protagonist. Batch "hates" these: & > < | % and usually !. They can be made to work, but only with much cussing, patience, and escapes. None of these should be anywhere in your map/field or characters.

message edited by nbrane


Reply ↓  Report •

#2
January 7, 2020 at 01:12:18
here is about the limit (see best answer):
https://www.computing.net/answers/p...

and this one i've worked for a few years on, might give you some insight and or inspiration to build your own:
https://pastebin.com/Rmf9t2Js

both wil only work if you save them with ANSI encoding

i5-6600K[delid]@4.9GHz Core/4.6 Cache@1.488v | 2x8GB DDR4-3333MHzCL13@1.49v | Sapphire Nitro+ SE RX 590 8GB@1615Mhz core@1.13v/2236MHz


Reply ↓  Report •
Related Solutions


Ask Question