Programming (Part 2)

I promised a part two so here it is…

The first post can be found here.

As previously mentioned, my previous self taught programming experience involved BASIC and whatever the TI-85 uses.  I had my first official taste of taught programming in College a couple of years after High School with C.  My Engineering degree required I take “Programming for Engineers” which was basically C programming to solve iterative math problems.  Most of the programs we did were by the book style involving arrays and graph style equations.  The book for the course was actually two books and we only got through maybe one of them since Engineers aren’t computer programmers.

This was fun but at the time I was rather busy with school so I didn’t to doo much beyond what was required for class.  A couple semesters later however was different.  I finished my Associates in 2.5 years meaning I finished in December.  I wanted to start the Bachelor’s track in the Fall since it makes all of the class schedules work out better so I had a semester to kill.  So in addition to working a whole bunch, I took two classes just for fun, Basic electronics and Computer Science 101.

CS101 was essentially C++ Programming for beginners.  There are some keys here.  I’ve had experience with C, which is very similar to C++, especially at this level of programming.  Also The TI-85 language is reasonably similar to C at this level of programming.  Basically, I’ve had a decent amount of experience at this.  The end result was that I excelled in this class, I did better than everyone else (most of which were actual Computer Science Majors).  The teacher also set up a side class for whomever wanted to attend learning some visual windows based elements.

The fun was in the larger assignments though.  Most of the quick assignments didn’t leave much room for creativity.  “Mr. Shopkeeper needs a program that will calculate 7% sales tax for his sales.  Make a program that takes the total bill in and outputs the total with tax” doesn’t leave much room for expansion.

The larger assignments were all simple games with variable elements that allowed for much more fun.  We also got more time to work on these, maybe a week or two.  I could easily code the basic assignment in a day leaving me, well, a week or two, to code “extras”.

This is where I created my first three “real games”.  Note the scare quotes.  Truth is, these are all rather buggy as evidenced by the fact that they don’t like unexpected input and are generally pretty crummy.

So I present to you, Tug of War, Pearl Diver, and Let’s Win at the Races.  All of these titles were given out by the class as was the basic premise of the game.

The parts that I added was anything graphical, even if it is ASCII graphics.  The requirement was only for a text based input and output.  Ok, yeah, it’s pretty simple, big deal.

I’ve done a few other projects that never got completed, the most ambitious was a PC based sequel to my previously mentioned Dragon Quest series.  This one was somewhat Zork like with a text based interface only it added a one on one random battle system like Final Fantasy and a level up system similar to Final Fantasy 2 where skills build as you use them and class is based on your skills.  I got as far as completing the map (without descriptions).  So you can wander around an empty world in it’s current state.  One day I hope to get back to it.

My other self taught programming project involves HTML, if you want to call it programming.  A better word is probably “coding”.  Back in 1998 when I first started building webpages I started in MS Frontpage.  I noticed there was a lot of flack for people who used Frontpage so I bought this big fat HTML book (HTML Complete, $20, great value).  So I taught myself basic coding of HTML.  These days I don’t use this skill as much since blogs make things much much easier but this skill does come in hand a lot when I’m trying to manually tweak my WordPress templates.

Programming is something I enjoy when I have time though my main complaint is always finding a decent free compiler.  The only free C++ complier I’ve ever found was by Borland and it is absolutely TERRIBLE for user friendlyness.  I plan to do some additional programming in the near future for fun it’s mostly a matter of finding time.  I’d love tog et into more visual element and make actual graphics and program that run in Windows.  Also there are quite a few more modern languages out there now.

Anyway, if I build anything new, you’ll be surely seeing it here.

Programming (Part 1)

Hey, it’s pointless personal trivia day!  Hooray.

Anyway, I’ve never taken up computer programming in any official “this is what I’m going to do for work” sort of level but it’s off and on been a background hobby of mine.  I’ve been considering getting back into it lately which has inspired this historical blog post.

The first programming language I ever learned any part of was BASIC.  This was around 1987-1988 when I was 7 or 8 years old.  I know this because, at the time, my dad had gone back to school to finish his degree in Computer Science and I learned a bit of Basic from him based on what he was learning at the time in college.  I never used it for anything super elaborate.  The most complicated piece of code I ever created involved a simple password that would then display a bunch of text or ask questions that would display different text based on the user’s response.  Simple “If Else” style programming.

This “If Else” method of programming is very simple but it’s a set up that can be used for a lot if managed properly.  It’s a method that would translate over tot he next segment of my programming years in High School.  Because I was in Advance Math, I was required to own a fancy TI-85 Graphic Calculator.  The most exciting thing any of us ever did on these calculators was to program little games and programs.

I had two major programming projects I created for the TI-85 and irritatingly, both have been completely lost to the throws of time.  I didn’t get a PC link cable until well after High School so I had no effective way to back up my hard work.  The first and main undertaking I ever had was a pair of games called “Dragon Quest”.

The name Dragon Quest was chosen in tribute to Dragon Warrior, before I knew Dragon Warrior was in fact also secretly called Dragon Quest in Japan.  The first game was a very simple RPG, all contained in one saved file.  You would exist at the town most of the game.  You could buy potions to heal in this town or stay at the inn to heal.  You also ha the option to “explore”.  Exploring would result in one of two encounters, a small dragon or a wizard.  Everything did a set amount of damage so the whole game was extremely predictable.  After 20 battles, exploring would result in an encounter with the “Dragon Lord” who was a much tougher dragon.

The battles were the shinning point in this game.  It took a ton of memory but the battles were all graphical.  You’d see a wizard, dragon, or Dragon Lord graphic on screen to indicate the type of encounter.  Your two attacks, slash and stab, would overlay a different graphic depending on which was used.  These were basic black and white images created in the calculator’s Graph Drawing function.

Many people liked this game in my High School and it was generally pretty distributed among people who had graphic calculators.

So I created a sequel.  The sequel dropped all graphics in the interest of saving memory.  However, this memory saving allowed for a TON more features.  The player could now learn 4 different spells over town, a fireball, healing, nuke and better healing.  You could also spend money from encounters on new weapons to do more damage.  All damage was now variable. The encounters were much more varied with two dozen types of enemies that would randomly show up.  Halfway through you’d be given the option to solve a series of riddles and fight the mighty White Dragon in order to earn the best Sword, Xcalubur.  Instead of 20 encounters the number was increased to 50.  There was also the addition of a menu driven system since I had figured out how to work this function.  Lastly, since 50 battles was a lot to make it through, the game featured a three file save system that would write everything to a file.

The next best feature, which was highly underlying and not visible to the player, was that the game was broken up into a series of modular files.  I had learned how to call one file within another.  This meant that the main game was in fact, nothing but a series of calls to other files.  It also meant one part could be much more easily tweaked as needed.

The most impressive part of all this really was that I’d never had any level of education in how the TI-85 was supposed to be programmed.  I had the manual, which described the available functions and commands, and the rest as all trial and error or luck.

I mentioned that I had created two major projects.  Dragon Quest was the first, the second was “Windows for the TI-85”.  At least that’s what I called it.  It wasn’t really very Windowsish.  Basically I created a menu based graphical icon based system for launching the programs on my Calculator.  Unfortunately the icons were part of a static background and the menus were all hard coded so it wasn’t portable to anyone else’s calculators.  It was more of an experiment than anything.

Next… Part 2: The HTML, C, and C++ Years….