Wednesday, September 28, 2011

Connecting to a MySQL Database with VB.NET Using ADO.NET



In this Visual Basic 2010 programming tutorial, we'll be connecting to and pulling data from a MySQL database, utilizing the ADO.NET connector provided at http://www.mysql.com/products/connector/

In this video, we will perform the following tasks:
1.) Creating the Connection Objects, a Connection String, and a Query String
2.) Connecting to our MySQL Database
3.) Drawing Data from our Database to our Windows Form
4.) Filtering our query results, and sorting the data
5.) Creating a Table Relationship to pull data from multiple tables
6.) Disconnecting from the Database

This tutorial assumes that you already have an operable MySQL database, access to the database, and a basic working knowledge of your database.

Tuesday, September 27, 2011

Trying to stay on task...

Wow... So many new goodies to play with and so very little time.

Sorry, if the updates are coming a bit slowly. The four dollars I've made via Google over the past few years just isn't quite enough to allow me to quit my day job. ;-)

So, work has had me really busy, and in my little bit of spare time I've been trying to diversify my talents by learning PHP with MySQL, exploring XNA with VB and trying to memorize the basic configuration, trying to support old tutorials, and considering ideas for new tutorials.

I know, I know... Just more excuses, right? :-P

Well, I have been working on another tutorial, though it's not quite as "game-centric" as the others. Actually, it is - but it isn't. I'll be outlining the very, very basics of employing a database (MySQL) for things like user account storage. While it promises to be a very elementary video, I will not be outlining MySQL configuration, and will expect that you already have an operable database and know how to create and manage your own tables. All I will be demonstrating is how you can connect to it with VB.NET using the ADO.NET driver.

In the first video we'll focus on:
1.) Establishing a connection to a MySQL database with Visual Basic 2010
2.) Accessing table data
3.) Joining two tables with SQL to access relational data (TOONS by USER ACCOUNT)
4.) Closing the connection

Depending upon how this tutorial is received, future videos may go a bit deeper and may include record insertion and whatnot.

Sooo, that's where I'm at, right now.

Take care, and thank you for stopping by! :-)

Aardaerimus

Saturday, September 24, 2011

XNA is on the way!!! *HAPPY HAPPY, JOY JOY*

The XNA over VB barrier has finally been shattered - many thanks to Kalamus1 for his demonstration and for pointing me to a tremendous new resource by rm2kdev: http://www.xnatutor.com/


I still have a long road of learning ahead of me to fully understand and transition my older works to XNA, but I'm thinking that it will be a huge benefit to us all.

With GDI+ I was putting up with frame rates of around 22FPS - at super low resolution even - and many users were bogging down to around 1FPS... When Kalamus1 sent me my own tutorial source adapted to XNA, I totally freaked! My shoddy 22 FPS had exploded to nearly 4000FPS!

The next test was to run the project at full screen. It scaled up very nicely and was still blazing along at around 3000FPS.

Mind you, this was on my monster quad-core workhorse computer at work. The next test would be to execute the project on my older dual-core laptop, at home. The results were still a screaming 2400 FPS!

Keep in mind that most production games will be ticking along at significantly slower speeds. Playing World of Warcraft, for instance, I'm lucky to be getting between 25-35 FPS, and it's still smooth. People with souped up machines and high-end video cards might be enjoying between 60-120 FPS on modern games.

With that in mind, even 1000 FPS would be ridiculous. Of course, this should decline steeply as the complexity of  our code routines grow, and in some instances we might even be forced to limit the FPS to a fixed rate, but at least we can shed the nagging concern that our apps may well give an abysmal performance on machines that may not have been as gutsy as the primary development environment.

Thursday, September 22, 2011

Another VB Game Programming Tutorial ~ Creating Classes and Managing Object Arrays



This Visual Basic programming tutorial is designed to complement my Visual Basic Game Programming series, but is not limited to game design. It is designed to teach you how to create a custom VB Object Class, store your class to an object array, then create and delete multiple instances of that class on the fly.

In this VB programming video, we will be performing the following tasks:
1.) Building a simple game/application loop
2.) Build a (GDI+) graphical interface for painting objects to the main form
3.) Build a custom class with graphical properties and embedded timer objects and self-contained events
4.) Teach the objects to interface with the form environment while remaining autonomous
5.) Create a class/object array to store a desired number of objects from our class
6.) Use random numbers to dynamically generate new and diverse instances of our custom class
7.) Destroy specific objects by deleting them from our array when certain conditions are met.

PROJECT SOURCE CODE: http://www.aardaerimus.com/downloads/classtutorial/