Monday, October 31, 2005

Big advances on the game

I made large strides in the game today. Now, I have a ship that shows up on the screen (with transparency), as well as asteroids. To get the game a little more interesting, I set up basic keyboard interaction (using keypress events). This is limiting, because you can only send one message at a time, so hitting two keys (like rotate left and thrust) has only one key's effects.

I created a little extra line, too, to show the ship's current velocity vector. I almost have the physics for the game complete. The ship can thrust and rotate. The asteroids can be set with a given velocity, and they keep that. The only additional physics concept I want to model for v1 is friction; objects will slowly decelerate, with the idea being that they are being affected by space dust or super small asteroid chunks or something.

I started working on the bullet class, because I want to shoot stuff. I guess first I should get collision detection set up for the ship and asteroids, though.

I also got more cool tools for Visual Studio that relate to Test Driven Dev installed. I can now see my code coverage, and run tests from within Visual Studio. Both of these are huge advances. The code coverage will help me design better unit tests. The ability to run tests from within the IDE will greatly increase my productivity.

I also messed with the inheritance chain now. The chain for the player's ship now looks like this:
PlayerShip->Ship->SpaceRockObject->BasicSprite. Getting deep, isn't it?

Friday, October 28, 2005

Got the player's ship on the screen!

Today, I fixed a pretty stumping problem. You'll never guess how I did it. I read the manual. Can you believe that? I am a male man, and I read the manual! So, I was having a real hard time getting my ship to show up on screen. I thought I had thoroughly examined my example code, but I missed two lines somewhere.

Here's what I had to begin:

//Spin, Shift, Stretch :-)
d3dSprite.Transform = Matrix.RotationZ(visualAngle) *
Matrix.Translation(center) *
Matrix.Scaling(scale,scale,1.0f);

//Draw the sprite
d3dSprite.Draw(tiles.Texture, tilePosition, center,
position, Color.FromArgb(255,255,255,255));



Here's what I needed to have:

//Spin, Shift, Stretch :-)
d3dSprite.Transform = Matrix.RotationZ(visualAngle) *
Matrix.Translation(center) *
Matrix.Scaling(scale,scale,1.0f);

//Tell DirectX we are about to start drawing sprites
d3dSprite.Begin(SpriteFlags.None);

//Draw the sprite
d3dSprite.Draw(tiles.Texture, tilePosition, center,
position, Color.FromArgb(255,255,255,255));

//Tell DirectX we're done.
d3dSprite.End();


Here's what it looks like:

Player ship on screen

Sunday, October 09, 2005

The funniest bloggers I have ever met

So, there's these two people. Between the two of them, they have three blogs. You have got read these.

Oh yeah, I used to be really mad at Brian, but Courtney said to let it go, so I did. Damn, that woman can crack the whip.

Here you go:

http://HollyAndBrian.blogspot.com
http://primatebuddy.tesx.com/
http://neonalune.blogspot.com

Technical Pop Quiz

Alright, here's a pop quiz. And, it has a prize. If you can answer this question correctly, and live in Jax, I will get you an interview for a technical position that requires mad SQL skillz(you should be thinking Napoleon Dynamite right now).

There's a database. It has several tables. I need information from one primary table, a related detail table, and two lookup tables. The linked image below is a diagram of the database.


ERD for the quiz

Write me some stored procedures:

  1. Get all customers
  2. Get all customers whose customer name starts with 'Johnson'
  3. Get all customers whose address contains 'FL'
  4. Return a count of the number of orders per customer. I want the complete list of customers, even if they have zero orders.
  5. Get me all of the details about an order. If there is an id field, return the description from the related table, instead of the ID. I will provide the order ID I am interested in.

Seriously, there is a junior dev position open at my work. They are looking for someone with strong sql skills. This position will eventually grow into a development position. There aren't really any requirements (i.e. college degree); other than being pretty good at SQL.

If you are interested, leave a comment with your stored procs, or link to a text file that contains your stored procs.

Job Digest #2 & 3

Digest 2
The day after I told Steve I was going to have to start looking for another job, he and Chuck came back with a plan to make things better. Now, the dev team is on "Flex Time". We have to be at work from 9 until lunchtime. The rest of the day, we can work or not, as we desire; as long as the work gets done. So, now, I can come home and work from home from 1 until Courtney gets home, then spend time with her and Mik till Mik goes to bed, and then work more if necessary. So, that is basically the most flattering thing(professionally) that has ever happened to me. Plus, it helped everyone else on the team too.

They also pushed back the next conversion by two weeks. That was about more than just me, but the timing made it feel pretty personal. Since then, things have been great at work. Coming home every day is the cat's meow. I get a lot more work done, because I don't have people to chat with, and don't get interrupted every 5 minutes.

Digest 3
There once was a developer named Scott. He didn't know shit. He also sucked as a supervisor, and was the laziest dev I ever met. He was skilled at backpedalling, and looking busy, but not at producing results. This idiot was hired to be my lead, and sucked big fat hairy ass at it.

Scott came to me a few days after I spoke with Steve, and let me know that he was looking for another job, because he hated everything about our product. I can't tell you how much of a jackass he was. It still irritates me(because I'm still trying to fix the crap that he messed up). He was such a bad dev, he introduced more bugs than he fixed.

I did everything I could to help Scott find a job where he would be more happy. I put him in touch with several recruiters. I gave him a couple of job leads. What a helpful guy, right?

Well, finally, last Thursday, he made the announcement I had been yearning for. He quit. And, being the asshat that he is, he quit with no notice. He came in at like 6:30, and was walked out at like 10. Seriously, I grinned until the next day at 5 pm. I still get happy any time I think about never having to work with Asshat again.

I have once again expressed my desire to lead the dev team for this project. I also gave Steve a couple of other options, that he will probably find more agreeable.

Monday, October 03, 2005

Sparkle Timeline Performance

Found this interesting post with the title "Sparkle Timeline Performance" on Tales from the Smart Client.

Read the post, and check out the performance times at the bottom. Going from 12.2 seconds to 4 seconds is GREAT. Going from 8.3 seconds to .379 seconds is REALLY, INCREDIBLY great. That is going from a time span that is going to irritate your users to a time span that most users won't even notice, except perhaps as a flicker of the screen.

I love to read stories where developers stepped back from an issue, and went a new way to tackle the problem, and greatly enhanced their product in the bargain. Good job, Sparkle team.