Friday, May 1, 2009

It Lives! (...evil laugh)

I took back my KVM today and traded it in for a d-link switch and a couple cables. Then I fixed my desktop so the ethernet card actually works, set up my network and installed Input Director.

Everything today went easier than I expected. The switch worked out of the box, which surprised me - nothing is ever that easy. It was a piece of cake to set up my network... Then, input director was easy to install and set up, and the instructions were accurate. A rarity in my experience.

Input director works as it should, and better than I expected. I don't like the idea of adding overhead to my systems, but it so far isn't noticeable, and at last, I have one keyboard and mouse for two separate systems!

All I need is a dual monitor stand or wall-mount, and I'll have one seriously kick-ass workstation.
And now... to solve the mystery of the fn key...

Thursday, April 30, 2009

Time to Set Up The Network... And "Input Director"

I've been trying to solve my desktop problem for a while now. I have 2 computers, (a laptop and a desktop) and I use like to use them both simultaneously. Perhaps I'll be coding on one and reading the manual on the other, as an example. I find this way I am much more productive, and when I am in "the zone", I hate waiting for pages to load, or downloads, or compiles, or whatever.

The problem is that I have 2 monitors, 2 keyboards and 2 mice on my desk. This is easily fixed with a KVM, however they only work properly (apparently), with one monitor, unless I buy a really expensive dual monitor KVM... And what I want is to be able to use two monitors (one for each pc), and one keyboard and mouse to control them both.

Also, I haven't taken the time to set up a network between the two. Originally this is because I unintentionally uninstalled the network card on my desktop, and didn't have the original disk to fix it. So... Time to fix it!

After they are networked, apparently I can use a program called "Input Director", which should allow me to do exactly what I want, and is compatible with both XP and Vista. Perfect. "Synergy" is another program well known for the same functionality, but it is my understanding that it hasn't been updated for Vista.

Wednesday, April 29, 2009

Getting Caught Up, And Wii 3D Tetris


This is a screenshot I found that I believe is from an upcoming version of 3D Tetris for the Wii... (I got it from here, but haven't yet done any additional research to verify the validity of this)

This is the first screenshot I've seen that looks somewhat like what I've been thinking of creating in Ogre. Currently I am working in 3 dimentions, but keeping everything within a 2D plane. Once I have that working properly, it shouldn't be too difficult to add the third dimention.

I'm busy as heck getting caught up at school, but I'm almost there. So I'll be back hacking away at this Tetris program in no time.

I think I'm actually going to go back to the drawing board, as I already have created some messy code, and I am not a fan of messy code. It was an Ogre learning experience, so I won't beat myself up over it. It will probably take less time to start over with a cleaner and more focused design than it would to work with my existing code.

I think the answer to my rotation problem is to design it to work correctly for the rotation of a piece, and then go backwards from there.

I've learned a lot about how to rotate my piece (I use the word loosely, since you can pitch, roll or yaw an object in 3D space), but where the problem comes in is rotating it exactly like the original game; I need to rotate the piece around the center axis of the root block of the piece. Seems simple enough... I think there is a flaw in my game logic somewhere that is making this more difficult than it should be.

Friday, April 24, 2009

Radians and Quaternions


So... The Tetris coding continues... I'm working on rotating the pieces right now, which is a bit more complicated than I expected.

(all my quotes in this post are from Wikipedia... How would I survive without it?)

Radian:
"The radian is a unit of plane angle, equal to 180/π (or 360/2π) degrees, or about 57.2958 degrees, or about 57°17′45″. It is the standard unit of angular measurement in all areas of mathematics beyond the elementary level."

Interesting... I had to start video game programming to start learning mathematics beyond the elementary level. Seriously though, I never heard of a radian before tonight...

Quaternion:

1. "Quaternions, in mathematics, are a non-commutative number system that extends the complex numbers." 2. "Unit quaternions provide a convenient mathematical notation for representing orientations and rotations of objects in three dimensions."

While I might not need to know this stuff to program Tetris, this stuff is pretty common knowledge in the gaming world. So... I've got a bit of reading to do.

Tuesday, April 21, 2009

Tetris Lessons, and Advanced C++ Course Starts Tomorrow


I have made up my mind to finish this project... No matter how long it takes. It's been more time consuming and difficult than I imagined.

Why? Well, it's hard to say. Many things that seem that they would be easy are difficult, simply because I don't yet know many things about Ogre. I'm not having too much difficulty with C++, but I think if I knew more advanced topics I might have greater insight into what I'm doing... Maybe I would know tricks that I don't know now that would make it all easier.

Also, creating a decent Object Oriented design strategy when I haven't even figured out my design is proving to be difficult.

Sooner or later I'll start a new version from scratch, just to clean up some of my design flaws.

On the plus side, I am greatly enjoying the process. I'm learning at an amazing rate, and C++ is becoming really natural to me. These are the things I was looking for. I'm sure the satisfaction when I am finished will be something too.

Also, my home-made collision detection is working (not that it should be that difficult for Tetris...), so I'm happy about that.

Tomorrow is my first class in my advanced C++ course, and I'll be putting a lot of energy into that. I have more questions about design now... Man, I've got tons of questions. Hopefully my instructor will be interested in answering some of them!

Thursday, April 16, 2009

Tetris, Tetris, Tetris... And Bjarne Stroustrup

Tetris. I have been coding Tetris for 4 days straight. I'm sure I would be done by now, but I am having to teach myself some new C++ concepts. I'm really starting to see the benefit to Object Oriented design. Whenever I start to have problems, it seems to be because I haven't designed the previous step correctly.

Of course, I like all of this because I'm learning a lot. In addition, completion of my first game is not too far away. So, life is good.

Doing this with Ogre is quite an interesting challenge. And the final product looks pretty cool, it's smooth, and you can actually change the camera view as you are playing... And they are 3D blocks, not 2D like the original game.

Talking about C++, Bjarne Stroustrup (the original developer of C++), is speaking at SFU on the 30th. I'm looking forward to going, even though I might not understand a good portion of the material. The more I hang out around C++, the more I seem to understand.

Monday, April 13, 2009

Pipeline Problem #1 Solved!

And that solution is OgreMax. A set of tools that you plug into Max that allows you to do all kinds of things... My main concern right now is the ability of exporting Max files to Ogre .mesh.

And it works. Next, I have to find a .mesh viewer that works with the latest version of Ogre.