Blog: Keogh Code - Starting from batch
Surprisingly, Google can't solve every problem.Siobhan Keogh | Tuesday, May 29 2012 | 2 Comments
Over the past couple of weeks, I've been extremely busy - on deadline, prepping for a trip to E3, and dealing with an injury - so truthfully I haven't had a lot of time to code. When I picked up again, I felt like I had to do a refresher. Rather than skim the chapters I'd read of the book I've been using, I picked up a new book and started from scratch there.
Much of it has become second nature to me, and was rather easy. However, there were a couple of new tricks I hadn't learned yet, like creating batch files.
Batch files, the way the book explained it, are files you create in Notepad with the extension .bat, and they alter the way the .exe file you've produced is run. For example, the batch file I created was designed to pause after the program ran, so it wouldn't flash up on the screen and disappear again.
The problem, I found, was that using a batch file had the weird result of writing out the full path of the .exe file, as shown in the screenshot below:
Confused, I turned to Google. For the first time in quite some time, however, my Google-fu failed to turn up any results. Seasoned programmers - is there any way to use a .bat file to pause an application without showing the full file location?
I suppose, given that I know a couple of different methods for pausing a program anyway, that learning about this particular batch file isn't important.
By now I've gotten far enough that I'm on the verge of creating my first game. I've learned all of the code I'll need - in theory, anyway. How well I've learned it will quickly become apparent once I start. All I need to do now is write something, with some assistance from a handy-dandy textbook and my loyal Assistant, who has been talking me through all the complicated concepts and dropping hints for me when my code won't compile.
Making a little game might seem like a small thing, but it's kind of a big deal to me - being able to create something that works, that someone else can use and might even like - it's exciting to me. Of course, I've been doing this all along, but a game seems more complex and more interesting than a calculator that can only solve one or two equations.
The game will be a text-based adventure game, so obviously nothing too complex - I'm not making AAA titles just yet - but when I'm done (and it could take a while), I'll upload it so you guys can give it a crack. For those who are interested, I'll also upload the code for the game, and I'll try to annotate it in a way that makes it vaguely understandable. So far, though, my note-taking skills have not been great.
"echo off" prevents the path from being displayed, and @ ensures the echo command itself isn't printed.
Posted by Alex at 13:38:45 on May 29, 2012
Posted by Siobhan Keogh at 9:06:57 on May 30, 2012
How to choose the best tablet for you
101 great websites:
You haven't heard of yet
We ask the pros for building tips