2004-09-23

More PHP/MySQL

Hey, I got something working! :) I found another great tutorial, which you can look at here, and I talked to some of my #c-64 friends who know more about this stuff than I do.

Last time, I was wondering how to create the database that my PHP program would read from psw.ca. It ended up being really easy - my web host provides a control panel where I do things like create email accounts and stuff. Turns out I can just go in there and click "Databases" and make one in there! Then I was wondering about how to actually create the table and columns (like, the different fields that the data will go into, like MovieName, Description, etc.). My #c-64 friends suggested installing a program called PHPmyAdmin. I started working on that - it ate more than 6 MB of my web space - and then I realized it's already installed by my host. :)

PHPmyAdmin is a really nice GUI front-end where you can just click in fields and press buttons and make your database. Much much easier than writing little snippets of PHP code and uploading them and running them through the web browser.

So, I created the database and populated it with just the game names list I've compiled (I'll be adding more info later). Then I re-worked a PHP example from the tutorial I mentioned above, and here it is - the same list, but this time generated from a database! :)

Movie Games List

Yeah, yeah, it just looks like the same list from a couple blogs ago. The neat thing is all the potential this offers... next time I'll try to have it doing something slightly interactive.

2004-09-22

PHP, MySQL and more

There's a number of websites I'd like to make, but have held off because it seemed like maintenance would be way too much trouble. For example, this list of C64 games licenced from movies I mentioned last post - wouldn't it be great if each entry could have it's own page with information on both the game and the original movie - screenshots, reviews, links to IMDB.com and a place to download the game, etc.? But once you have a web site with dozens or hundreds of pages, each hand-coded in HTML, imagine wanting to make a change to the header or footer - going through each page on by one? Yuck.

Server-Side Includes (SSI) helps somewhat. If your server supports it, you can make your web page header or footer (for example) in a seperate file. That file can then be referred to in your actual page, and the server automatically inserts it when someone wants to view the page. This means you can make a change in one of these included files, and all your pages that refer to it will automatically include the new version.

Still, this doesn't help with other issues you might have in a bigger (and growing) website. Each time I want to add a new game to my movie game database, for example, I'd have to take a template file and fill in all the data in a text editor. And if I needed to make a change to a particular entry, I'd have to scan through the whole html file, looking for the particular bit I want to change - potentially a hassle, if the page layout is quite involved. And if I wanted to make a change to the way the data is laid out? Forget it - that's why I haven't done it :)

So, PHP is a programming language that you imbed in regular HTML - it can take input from the URL (for example, go to google, do a search, and look at the url - anything after the ? is a parameter that the server is passing on to the program), it can perform string and numerical operations, and probably coolest of all, it can talk to a MySQL database.

MySQL is a free system that allows databases to be created, manipulated, and queried. I think I'll start my project by creating a database, and then created the PHP code just to simply read the database and display it, and put that online, so people can just look through the entries. Then I'll add searching and sorting features, and maybe eventually a way to update the site through the site.

But first things first - right now I'm studying all this stuff. The best tutorial I've found so far is here. I know my host for psw.ca has PHP and MySQL support, so I should be set. In fact, I've already got a few little PHP programs working - it's as easy as BASIC. On the MySQL side, I assume I'll have to install it locally on my Windows machine, and then upload the database I create to my website afterwards.

2004-09-21

Licenced Movie C64 Games and More

Sorry I disappeared for so long folks - I was actually getting paid to do C64 programming and other related duties. Wow! And I was trying to do that and still hold on to my real job, and have my kids still recognize me ("Mommy, who's that man that's always in our basement?") so blogging lost out. That top-sekrit C64 job is (temporarily?) over, so now I can play around with a few other things.

I've now got that formerly-thought-lost C64 game "Blockade Runner" running in VICE from a .g64 image. I've made some progress in de-protecting it, and hope to release it soon.

I think I've decided to just skip the 2004 Minigame Compo this year - I've got a great idea that I think I could have won with, but there just isn't the time in the next 6 days to do it justice. Someone else can hold the trophy this year :)

I woke up this morning thinking about movies that were officially made into C64 games, and did some searching, and found some related threads over at the Lemon64.com forums. It doesn't seem like anyone's put together a definitive list, so I've done my best to piece together all the people's suggestions below.

So, all you bored readers out there, use Gamebase 64 and Internet Movie Database and find me some games that aren't on the list, or games listed that shouldn't be.

I only want games that are directly tied in (and licenced) with the film. The game based on the Batman movie is fine, but other Batman games aren't, because they're based on the comics. Wizard of Oz (the game) doesn't count, because it's based on the original (now, public domain) book. Got it? Thanks!

P.S. I don't have time now, but I suspect Teenage Mutant Ninja Turtles and the Frankenstein games listed should be kicked off.

Addams Family, The
Alien
Aliens (UK)
Aliens (US)
Alien 3
Arachnophobia
Back To The Future
Back To The Future 2
Back To The Future 3
Batman - The Movie
Beverly Hills Cop
Big Trouble In Little China
Biggles
Bill And Ted's Excellent Adventure
Blues Brothers
Cobra
Cool World
Darkman
Days of Thunder
Death Wish 3
Dick Tracy
Die Hard
Die Hard 2 - Die Harder
Empire Strikes Back
Evil Dead
Frankenstein
Frankenstein (Adventure)
Friday The 13th
Ghostbusters
Ghostbusters 2
Godzilla
Goonies
Great Escape (?)
Gremlins
Gremlins (Adventure)
Gremlins 2 - The New Batch
Highlander
Hook
Hudson Hawk
Hunt For Red October
Indiana Jones - Last Crusade
Indiana Jones - Temple Of Doom
James Bond 007
Labyrinth
Lethal Weapon
License To Kill
Live and Let Die
Living Daylights, The
Masters Of The Universe
Moonwalker
Navy Seals
Never Ending Story
Never Ending Story 2
Night Breed
Nightmare On Elm Street
Platoon
Police Academy 2
Predator
Predator 2
Rambo - First Blood Part 2
Rambo 3
Red Heat
Return Of The Jedi
Robocop
Robocop 2
Robocop 3
Running Man
Short Circuit
Spy Who Loved Me
Star Wars
Teenage Mutant Ninja Turtles
Terminator 2 - Judgement Day
Top Gun
Total Recall
Untouchables
View To Kill
Werewolves Of London
Who Framed Roger Rabbit
Willow

Removed:
Jetsons (no particular tie-in with 1990 movie)
Lord Of The Rings (based on the book)
Howard the Duck (no particular tie-in with 1986 movie)
Rocky Horror Show (this is based on the stage production)
Wizard of Oz (based on PD book)

This page is powered by Blogger. Isn't yours?