My Applications

These will be posts regarding the status of new or existing applications I am writing.


Back in high school, and friend and I wrote a 8-bit video game for our C++ class.  He wrote the graphics engine (this was Pre-DirectX/OpenGL technology), and I wrote the game engine.  I also did the graphics, but that’s not something I’m bragging about.  We tried to get a fried of ours who was studying to become a graphic designer to redo the images for us, but when we graduated high school we kinda lost track of the whole project.

Anyway,  armed with my 15-year old graphics, and nothing else, I decided to re-create the game in a modern setting (the old game doesn’t even run under DosBox 🙁 ).  Of course, being the genius that I am, I didn’t make a backup of the source code for the original game, literally all I have is the old graphics, the DOS-based map editor (which DOES run in DosBox), and a vague recollection of how the game worked.

I was going to use Microsoft XNA, but they stopped supporting that.  Instead I’m using C# and  MonoGame, a great open-source implementation of XNA functionality targeted for OpenGL (XNA is obviously DirectX).  And behold, the first screenshot is posted:

AgbarTest Level 1

AgbarTest Level 1

So, what does the game currently do?  It loads a pre-defined map, textures, sprites, etc…  Draws a world with the textures from the map.  Spawns our hero (Agbar, Sheep Destroyer, (nee Sheep Laser Tagger (long story) ) ), loads a couple of his most cunning adversaries (sheep), and lets you control the character.  Movement is with W A S D, firing left and right with Q and E respectively.  Jumping is the space bar.  The window scrolls with the character, missiles collide with bricks or sheep, sheep walk back and forth on platforms, character can climb ladders, and that’s it for now.

Video Demo:

In the original game, there were 4 types of enemies, landing on a potion bottle gave the hero magical flying/invincibility, and you could move through the doors (brown to brown to brown, etc…).  None of that is implemented yet, but I’ll work on it.  The original also drew everything palette-based (this was 8/16-bit DOS we’re talking about here), so the potions and candles used to blink thanks to palette-swapping.  That’s a thing of the past, so I guess I’ll need to draw more sprites.

The source is, of course, in my repository, so check it out (if you dare).  NOTES:  This needs .NET 4.0/4.5, OpenGL, OpenTK, and possibly OpenAL (though there is no sound).

Ok, so many of the jobs I am applying for now want C++ experience.  Problem is, none of the companies I have worked for in the past 8 years wanted me to write in C++.  The industry used to use Ada, and many legacy programs still have all their code in Ada.  Not only that, but the companies that use C++ often use model-based development suites, meaning they don’t write any actual code, the compiler does it all for them.

Anyway, I am quite familiar with C++.  It was the first real language I ever programmed in (not counting Quick Basic).  I took 3 years of C++ in high school.  I did all sorts of things in the days before Java, Python, Perl, .NET, etc…  Now days, I’m not even sure people know what C++ means.  They probably use so many libraries, they really only use C++ for the Syntax and wide array and industry tested (and free) compilers.

Long story a little bit shorter, I have started to upload some of my old C++ code to my SVN server.  The page describing it all is on my website here: C++ Code.

That is all.

So lately I’ve been working on updating a website I use to keep track of my movies.  The wife and I have collected over 1000 movies and TV show seasons, and it’s hard to remember what we have and don’t have, especially when we see a movie we like on sale.  So anyway, some years ago I created a website to keep track of these things.  At first, and for the last few years, it was very simple.  Each movie was a single row in a table, and the actors and genres and whatnot were just fields in that table.  Each movie basically lived in it’s own world, one movie might star “Samuel L Jackson”, and another could star “Samuel L. Jackson”.  Since it was just for my wife and I, we lived with these limitations, we could just be careful about how we entered movies.

Of course, early entries were done entirely by importing CSV files into the database directly, but eventually I added a web interface to add and edit movies in the database (since my wife is not very SQL knowledgeable).  Of course, this page was very limited.  You could enter whatever you wanted into text fields (title, starring, comments) and it had pre-determined check marks for genres and media (actually, I added media after we bought our first Blu-ray player, before then, everything was DVD).   When we were dating we had an “owner” field, but we’ve since abandoned that.

Anyway, my mother-in-law was commenting about their movie collection (maybe 500-600, and decent collection for sure).  My wife mentioned out database, and since it would only involve copying the source code to another directory and duplicating the structure of one MySQL table, I agreed to setup a website for the in-laws.  Five minutes after sitting down at my computer, and I had a website all ready to go, just needed the list of movies.  However, I examined the website, and determined it lacked panache.  Actually, it lacked usability, and I set myself to the task of re-working the website to make it more friendly.  The last such update, some months ago, was to pass around a validation key so that the password didn’t have to be re-typed when entering multiple movies at once, not a technological accomplishment by any means.

It began with a focus on the database itself.  It seemed pointless to me to have to re-enter the couple-hundred movies my in-laws and I surely have in common.   Especially so when my movies are already cataloged by genre and actor (where appropriate, seriously, can you name one actor from “Killer Klowns from Outer Space” without IMDB or Wikipedia?).  I split the single movie table into actors, media, genres, and movies, and created relational tables between them.  This, of course, made the SQL statements much more complex, where before it was simply “SELECT * FROM movie WHERE actor LIKE ‘Tim Robbins”, the code now involves multiple joins and grouping statements.  Still, once I optimized the query, it didn’t seem to take any longer than before.

Once the database was setup, I worked on improving the interface.  The page to add/edit movies, as stated before, was minimal.  You could enter any actor name you wanted, and title, and as long as the password was correct, you could insert that data into the database.  Now, it checks the title you have entered against the database (using AJAX) and offers suggestions (example:  “Tron Legacy”  –> “Tron: Legacy”, actually, we don’t own that, but anyway…).   It also has a browse-able list of actor name, and click on the name adds it to the movie.  No more typos leading to duplicated actors.  Anyway, it was much more user friendly now, but these changes could only be demonstrated when adding a new movie.  My next task was to update the display pages.

Well, actually, updating the display pages had to be done after I updated the database, since my tables were now different, but it looked exactly the same, which isn’t very fun.  I decided to clean-up the clutter (and reduce my database hits) by removing the actors and genres from the main display page.  Some movies (*cough* Ocean’s 13 *cough*)  had a lot of actors and were cluttering up the screen.  However, in order to determine the difference between “Alice and Wonderland” and “Alice in Wonderland” (one the animated Disney classic, the other the live-action movie directed by Tim Burton), I still needed to display the genres and actors.  I wrote-up a little AJAX query, and soon enough, clicking on a movie title pops-up a box with all the movie details.

Finally, I figured I wanted a faster way to find a movie than by clicking on the starting letter and scrolling through the list.  I implemented a final AJAX query and now have a search field on every page.  This way, if I’m at the store and want to know if I already own “The Dark Knight”, I can be reminded that we already own 2 DVD copies and 1 Blu-ray copy without having to scroll through all the movies staring with D.

Of course, there were many other changes to get my website to conform to HTML5 and CSS3, but I think the website should now be much more user-friendly (so I don’t have to answer too many question from my MIL).  Next on my plate is an Android app that will interface with the website and allow caching of movies (when you’re at the back of Target and can’t seem to get a data connection) and searching for quick lookups.  Luckily the in-laws didn’t go with iPhone’s, cause I couldn’t help them there.

Oh, hah, here’s the link to the movie website.  It’s open for browsing, but no editing without the password.

So Tuesday night I “finally” wrapped up development on my first Android app, my very own TipCalculator.  I uploaded and branched the source, copied the binary to my webpage, created a TipCalculator page on this blog, and downloaded it to my own phone (to make sure that worked).  It was all good and well until… I realized that I forgot to fix something after I moved some code around, and now I could no longer delete Tips.  Oh boy.

So anywho, more debugging, fixed a couple other issues (my rounding was bad, oops), and finally: TipCalculator version 1.1 was born!  You can check out more info if you care to on the TipCalculator page.   It’s nothing spiffy, but I figured I can add it to my portfolio if nothing else.