UK Chirstmas 2008 Trip

Photos from my UK 2008 trip home to Carlisle are now available on my flickr account:
http://www.flickr.com/photos/matthewtuffin/

Connection Library Quick How-To

Well I placed the library up for download on the codeplex website a week or two ago now and have yet to supply any sort of details on how to use this great tool.

So say you need to access rows in a database table which we will call tblPerson. In this table we have a first name column we want to grab and do some processing, altering the data so we modify some rows of data and then upload the change back to the database.

We want to access an microsoft sql-server located at the following hostname: Test-SQL

How can the library help, well I will go through the stages of how to use it and you can find out why.....

1. Download the library
2. Compile it to the .dll file

3. In a new project or the database one you are working on. Copy the dll to the project and add a reference to its location.
4. Add using DBConnection; to the top of the source file
5. Create a new object of CDataSource
6. Pass the constructor the type of database connection currently MSSQL, ODBC, OLE are the only ones supported, also pass a connection string in pointing to the database and then give the connection a meaningful name. For Example:

private CDataSource DS = new CDataSource(DataBaseType.MSSQL, "Driver={SQL Server};Server=Test-SQL;Database=TestDB;Uid=test;Pwd=test;", "TestDB");

7. Now add a table to the datasource:

DS.AddTable("tblPerson", "PersonQuery", "Select * from tblPerson", true, true);

The first parameter is the ACTUAL table name if you intend to do any Update/Delete/Inserts you need this
The second is a meaningful Name we can assign to that table
The last two parameters only work for MS-SQL. The first one uses the microsoft internal command builder the other one uses a custom command builder to generate update delete and insert statements

8. It might be wise to call a removetable before an addtable to make sure you have removed the table if it exists:

DS.RemoveTable("PersonQuery");

New Version of Tetrix DX10

I managed to put a few more things into the mix:

> A proper score
> A leveling up system
> Number of lines completed
> There is now music and sound effects
> I have made the grid bigger for larger games.

I still have to:

> Make a better time dependent render loop
> Add a top score feature
> Deal with End Game better
> Add a render of the next block to come falling down to the side

Here is the source download

Tetris in less than 48hours

Is it possible for one person to program a fully working game in less than 48hours?

The answer to this is a most resonding Yes with some catches....
> The definition of 'works' can varries
> We are also talking about a simple games here because as complexity increases so does the required amount of time need to be invested

So in less than one weekend I was able to from a blank page, program a fully working version of Tetris.

Okay so by the end of the weekend it did not look great but it did work. It then only took me a further two days to add some more bells and whistes to the game to make it look and feel more like Tetris.

With coloured blocks:

and an added Transparent effect when blocks disappear:

I will hope to continue working on this project and I have offered up the source code available for download here. At the moment the game only runs under directx10 and probably only in debug mode until I can figure out how to compile it for end user. I am looking to incorporate directx9 into the mix when I have time.

DBConnection Library

I have released my ADO .Net Database Library. The download is available on the codeplex website available on the link below:
http://www.codeplex.com/DBConnectionLibrary

Please forward all comments to matthew@matthewtuffin.com

Thanks

Upgraded

I upgraded my version of drupal from 5.2 to 6.2 and everything seems to be working 100%

Nucleus Retired

My previous blog website has been retired. The old blog that was running on nucleus content management system stopped working after a systems upgrade by my hosting company to a newer version of php. I am reluctant to go back and upgrade/fix nucleus as:
a. I made custom modifications to the core nucleus files to get what I wanted out of it. Upgrading would mean going back and fixing the same files if they still exist in the new version.
b. I was in the process of testing and moving to drupal anyway. So this gives me cause for swapping over fully.

I just now have to pull my finger out of my arse and sort out drupal to where I want it.

More Photos of Oz

This time I visited my father up in the alpine region of Victoria. Can you believe Australia has snow!!!

Anyway here are the PHOTOS

There are also three videos available

Looking at the Valley:

Testing Drupal

Syndicate content