Advertisement

The MySQL screensaver tutorial

Started by July 30, 2003 07:31 AM
1 comment, last by Crispy 21 years, 7 months ago
It's posted and here's a few directions for what you can do with it. I'm trying to provide living proof that it works, but unfortunately it's not all up to me (as can be seen below) First off, if you're interested in downloading the screensaver tutorial, NeHe created a new section for it on the main page on the left (it should be visible if you type in nehe.gamedev.net) - big cheers to him for bearing with it. The code, as always, can be downloaded at the bottom (Visual C++ only at this point - big thanks to Brian Tegart for doing the conversion (originally the code was for Borland C++ 5.02 - if anyone's interested in it, they can email me!)).

Here's how to make the screensaver access an online database

Unzip the file. Prior to running the screensaver (the .scr file) you should right-click on it and choose Configure. There are several fields that need to be filled in; here's the information you should use: Server IP: frontier.dynserv.net Server port: 8889 Database name: GLPoem Username: Saver Password: password SQL statement: SELECT DataText, DataType FROM Data WHERE Data.DataID > 3 Now press Save and Exit. Note that pressing Save and Exit will create a registry entry in your Windows Registry! You can click "Remove all registry entries" at any time to remove it. You can try modifying the SQL statement to access the other two poems in the database (there are four in total, one of them being Funeral Blues) . The above configuration should force the screensaver to display Jabberwocky by L. Carroll instead of Funeral Blues by W.H. Auden (which is the default offline poem to display).

Notes about the server

I am not hosting the database server and have virtually no control over it (sorry!) - this means that the server can be down at any time (it will be down for the upcoming weekend, that much I know). If you've tried at various times of the day and still can't establish a connection, please email me after you've made sure that a firewall on your end isn't the cause (firewalls can be resposible for the MySQL database engine not being able to connect to the server) and I'll see what I can do about it. Undocumented: mouse movement won't close the screensaver, press any key! To run the screensver, click on the .scr file (no real need to install it!) As always, if you spot a bug or have any questions that you can't figure out, my email is at the bottom of the tutorial. I hope this tutorial will be useful at to least someone (it's a huge one and covers quite a bit of ground) - any positive/negative feedback is much appreciated as well! Cheers! edit: fixed nehe clicky [edited by - crispy on July 30, 2003 8:33:14 AM]
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
Had a quick look over the tut this morning (I''m supposed to be working!) It looks great, nice to have a new thread of tuts on the site. OOP is something I''m quite new to so the more code I have to look at the better, especially if it''s OpenGL related! In addition I''ve always wanted to know how to make a screensaver! The registry access stuff is also very useful, I''m sure a lot of us will be able to make use of it. Database access is also interesting.

All in all, looks like a great tut, crammed with useful info. Well done to those involved in making it, and thanks to NeHe for making it available to all of us!
Advertisement
Oh My God! I just got the time to read the first few pages of it and I noticed at least 10-15 typos and grammar mistakes. I mean, I specifically went over the whole tutorial two times to eliminate all grammar mistakes, but still they''re there! I guess that''s why newspapers have at least two validators who read your articles and check them for mistakes before the article is published... pleeh...

Just wanted to add that the info in the OP is temporary - the server will be up for a limited time (I''m trying to make it at least 2 weeks or a month).

alex997: it''s knowing how to incoprorate OOP into C and maintain a good equilibrium between the two that makes a good C/C++ programmer. Nothing would please me more if you got a sense of that from this tutorial (it''s not 100% OOP!).
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared

This topic is closed to new replies.

Advertisement