< >
Hello, guest! Please log in or register.

The PokéCommunity

Go Back     The PokéCommunity Forums > Create & Discover > Game Development > Scripts & Tutorials Guide How to use batch files to attempt to make a Pokémon game

Notices

Scripts & Tutorials This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.

Reply Post Reply
 
Thread Tools
  #1    
Old January 4th, 2015 (10:45 AM). Edited January 6th, 2015 by NICKSID14.
NICKSID14's Avatar
NICKSID14 NICKSID14 is offline
 
Join Date: Aug 2014
Location: In your closet...
Gender: Male
Nature: Naughty
Posts: 44
As i wrote on the title of the thread here we will discuss how we could develop a pokemon game engine on batch,at one of the older command execute program files!I wroted a tutorial so you can take a taste of the batch scripting that everyone should know even and 3 commands.

1. WTF IS BATCH

For those who don't know, a Batch file is a text file containing a series of commands to be executed by Command Prompt (CMD) or (DOS) . When a

batch file is run, CMD/DOS reads the file and executes its commands.

2. BASIC COMMANDS STUFF
________________________________________________________________________________________________________________________________________________

echo off:
This command will disappear the path location,something like this for ex.C:\Users\Administrator>.........
Use it to the first line of your batch

______________________________________________________________________________________________________________________________________________

echo:
It will print a message to the screen,ex. echo Hello World!

________________________________________________________________________________________________________________________________________________

pause:
Pause will pause the execute of the file commands untill you press any button,on the screen it will display press any key to continue......

_______________________________________________________________________________________________________________________________________________

color:
Color will change the color of the screen and the fonts of (CMD),to use it you need to write this,leave a gap and write a hex number,so this

number will have two digits,the first one changes the font color and the second the fonts one,ex. color 0c will give you black screen with red

fonts,here is the list of the usable colors

Usable colors list:


0 = Black 8 = Gray
1 = Blue 9 = Light Blue
2 = Green A = Light Green
3 = Aqua B = Light Aqua
4 = Red C = Light Red
5 = Purple D = Light Purple
6 = Yellow E = Light Yellow
7 = White F = Bright White

_____________________________________________

goto:
Goto will jump you to another part of the batch script,usage example:

@echo off
:again
echo This is a loop,ha..ha,ha!
pause
goto :again

As you understood from the example,you must 'nickname' a point of the script and write in the goto that in witch part it should go,simple,ha :D

________________________________________________________________________________________________________________________________________________

cls:
cls will clear any text that it currently typed on the screen of CMD,DOS

________________________________________________________________________________________________________________________________________________

start:
Start it's a very pretty and usefull command(at least for me ),with this command you can run any typle of file and program,in windows is

connected and with the open of a image,music and video file,in dos start's abilites are limitaded from window's,but it can do the stuff as those

at the first line of my explanation.

example for the both operating systems:

@echo off
echo Your pac-man game will begin!...
pause
start pac-man.exe
exit

In the bellow example the program file that i runed was in the same path with the batch,but if the file is in my documments for ex. then i must

put the path of it.

@echo off
echo Your pac-man game will begin!...
pause
start C:\Users\Administrator\Documents\pac-man.exe
exit

(never forget the file's extension)

Example only for windows:

@echo off
echo I'll open google with your main browser!
start https://www.google.fr/?gws_rd=ssl
pause-->(with this way you don't need to press anything to run mozilla and etc.,it prints the text and it opens google at the same time and then

it pauses so you can see the text while your browser is opening

________________________________________________________________________________________________

exit:
You exit from the batch,that's all. O_O

_______________________________________________________________________________________________________________________

3.ADVANCED COMMANDS

I think that you played with those commands for 30 min. and now if you're pation with it you're thirsty for advance stuff .

set /p :
This commands prints a text and waits for you to write something and press ENTER,after this it keeps the text you wroted in a pointer untill you

close the batch.The batch can take every name you want,like potato,password and etc,you will not be able to use it if you don't see the example

of it and read why this muk is usefull .

example:

@echo off
set /p password=PASSWORD:
if %password% == baragouda ( goto :bravo )
if not %password% == baragouda ( goto :ppp )
:bravo
echo CONGRATULATIONS!
pause
exit
:ppp
echo LOOOOOOOSER!
pause
exit

Don't worry,i'll explain,our command have been used in the 2st line.set /p password=PASSWORD:,the password is the pointer's name that we said

before,if you READ it then you know that it can be everything.The command won't work without =.The PASSWORD: is the text string that the screen

prints on,i said it bellow.
All the uknown commands of the example will be explained

___________________________________________________________________________________________________________________________________________

if:
If can be used with a bunch of ways,i'll explain the most important for now with the bellow example.this checks if a pointer contains the same

things as you want to have in,in the bellow example the pointer is password but to work i puted % at it.And baragouda is the text i wanted to

check if the password is like this.In the ( ) you can put every command you want to run(only one).
Result of explanation:It checks if password pointer is baragouda and if it is then it runs the command goto:bravo!

if not:
I don't need to describe it,i'll only write the explanation result:
If the pointer password is not baragouda then run goto :ppp

________________________________________________________________________________________________________________________________________________

Pointers as password at the example can be used in almost every command of batch.examples:

@echo off
set /p name= What is you're name?
cls I'm glad to meet you %name%
pause

@echo off
set /p clr= Write a hex number of dos colors to change color
color %clr
cls
echo Those colors are way better :D
pause

@echo off
:start
set /p what=Write the path of a file that you want to run
start %what%
cls
goto :start

and etc.

_________________________________________________________________________________________________________________________________________________

ping localhost -n (insert number) >nul:
It waits,analogic with the number you'll put,if you put 1,then it will wait for 1 sec.

_________________________________________________________________________________________________________________________________________________

C:\Windows\System32\shutdown.exe -s -t (insert number) -c "(string text):Only for Windows
It activates the system's shutdown,in the insert number you'll put the secs that your pc will shutdown and on the string text you'll put every

message you want to see windows displaying when the batch activates shutdown.

_________________________________________________________________________________________________________________________________________________

shutdown -a:
Cancels the shutdown,nothing more.

_________________________________________________________________________________________________________________________________________________

netstat -ano:
Prints you a list with the hide processes of your computer,it can be used as.....let's say a prosper anti-virus by checking the pid of the active

connections that the status is enstabilesh,then go to your task manager,go to services and found the procsses with the pid i said and delete it!
Be sure that you have closed all your programs before do that :D

_________________________________________________________________________________________________________________________________________________

type:
This command will print the contained text of a file,it can be a text,a batch and etc.

example:

@echo off
type tutorial.txt
pause

If you want to print a text as bellow then your file must not have the extesion on,what i mean,if you see at your desktop tutorial.txt for ex.

then batch will not find it because it's tutorial.txt.txt so be sure that the text at your desktop or anywhere else is just tutorial for ex.
You can save it everywhere if you put a path

_________________________________________________________________________________________________________________________________________________

2st use of echo:
echo.
If you want to leave a gap beetween lines on the screen then you put the echo. example:

@echo off
echo.
echo This text is at the 2st line ]
echo.
echo And this one at the 4st
pause

_________________________________________________________________________________________________________________________________________________

3st use of echo:
1.echo (string text) > (name of file)
2.echo (string text) >> (name of file)
The 1st will save file with a certain text at his first line,if the file is exist the the first line will be overwrited.
example:

@echo off
echo this is a text > test.txt
pause
So this batch will save a text that it says this is a text,(NEVER PUT GAPS AT THE NAME OF THE FILE!)

The 2st from the other side saves text at the next line of a file,it's way better from the 1st because if there exist text at the 1st line then

it save the new at the 2st line,if there exist at the 2st line then at the 3rd line...etc.

You can pointer and on this commands,in the both parts of them

________________________________________________________________________________________________________________________________________________

del:
delete's files,if they are in the same folder tou need only the name,if somewhere else then it needs path

_________________________________________________________________________________________________________________________________________________
Time system pointers:
date,time (they don't need explanation,and they can be used like all the other pointers)

_________________________________________________________________________________________________________________________________________________

Those commands are just the top of the iceberg!With those commands you can make simple and pretty applications like notepad's,batch compiler's,and from the most simple to the most synthertic game engines!

The thread isn't completed,after times i'll updating it...............

I think that if batch and c combined it can simulate a pokemon engine very well,what do you think,POST!!!
(i'm saying pointer to some sections to make understood that is a point that data are saved,the right word is variable)
**Espeon is love!Espeon is life!


________
I currently make my own pokemon engine in batch,and is a huge challenge!
Learn some basics on my thread http://www.pokecommunity.com/showthread.php?t=341773
I'll soon upload screenshots and videos about my wip engine.
Reply With Quote

Relevant Advertising!

  #2    
Old January 6th, 2015 (11:00 AM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is online now
Mr Moderator
ModeratorCS
 
Join Date: Nov 2007
Location: Leicester, UK
Age: 18
Posts: 4,405
I've moved this over to Game Development because it isn't hacking at all, but if I've moved it to the wrong section I'm sorry Maruno D:
Reply With Quote
  #3    
Old January 6th, 2015 (11:42 AM).
NICKSID14's Avatar
NICKSID14 NICKSID14 is offline
 
Join Date: Aug 2014
Location: In your closet...
Gender: Male
Nature: Naughty
Posts: 44
Quote:
Originally Posted by Spherical Ice View Post
I've moved this over to Game Development because it isn't hacking at all, but if I've moved it to the wrong section I'm sorry Maruno D:
No problem,it's better here
**Espeon is love!Espeon is life!


________
I currently make my own pokemon engine in batch,and is a huge challenge!
Learn some basics on my thread http://www.pokecommunity.com/showthread.php?t=341773
I'll soon upload screenshots and videos about my wip engine.
Reply With Quote
  #4    
Old January 6th, 2015 (12:29 PM).
tuxintuxedo's Avatar
tuxintuxedo tuxintuxedo is offline
 
Join Date: Nov 2014
Gender: Male
Posts: 21
Need to ask. What exactly do you mean? Batch's use is quite limited, you can't really use it to program a game engine (it is not even appropriate for common programming tasks). Just saw C mentioned. That makes it different. Even with C, you need knowledge on DirectX, OpenGL, to develop something like a game engine.
Reply With Quote
  #5    
Old January 6th, 2015 (1:36 PM). Edited January 7th, 2015 by NICKSID14.
NICKSID14's Avatar
NICKSID14 NICKSID14 is offline
 
Join Date: Aug 2014
Location: In your closet...
Gender: Male
Nature: Naughty
Posts: 44
Quote:
Originally Posted by tuxintuxedo View Post
Need to ask. What exactly do you mean? Batch's use is quite limited, you can't really use it to program a game engine (it is not even appropriate for common programming tasks). Just saw C mentioned. That makes it different. Even with C, you need knowledge on DirectX, OpenGL, to develop something like a game engine.
Yes i know that batch is limited,with batch only you can make a prosper game engine that have many bugs ,this is why it's better be done and with a push of c,if it was need to make only to c then yes,you need the stuff you said 80% sure,but if it's at the main batch with some c calls it won't need, some people who designed complicated games on batch used and c.I'm making a test engine only with batch just to see my know on and how functional it will be,in the next videos i'll upload the alpha's -0.5 videos(with the intro,oak,pokemenu,save data and maybe with maps.)I don't know c,so i can't put ,also the titlescreen will be a little bit ugly,i'ts boring make a proffesional looking one!
Also i'm using many stuff that i didn't puted in the thread yet,as i said:those are only the top of the iceberg
**Espeon is love!Espeon is life!


________
I currently make my own pokemon engine in batch,and is a huge challenge!
Learn some basics on my thread http://www.pokecommunity.com/showthread.php?t=341773
I'll soon upload screenshots and videos about my wip engine.
Reply With Quote
Reply Post Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


  All times are GMT -8. The time now is 1:02 AM.


Contact Us Archive Privacy Statement Terms of Service Top