Monday, October 24, 2005

Ode To Joy

I have graduated to the level of using 2 strings on my guitar at the same time. So that means that I can actually play a real song, somewhat. At least I can recognize it, but then again, I think this is one of those songs that you can play using a touch tone phone. But hey if it's by Beethoven, it must be good.

For other budding guitar players, I have included the "Note Positions" handout my instructor gave me. Also, you can listen to the MIDI version of this song in case you are curious how it should sound if played properly.

My goal is to be able to play a couple Christmas songs by the time I head back to Alberta again. Suggestions? I hear Jingle Bells is pretty easy...

Wednesday, October 19, 2005

She's home

Yes here she is on my lap, what a beaut. The same FG700MS I mentioned in my last post. And she can sing. Of course I don't really know how to get her in the mood yet. I'm still learning where to put my ... fingers? Ok this metaphor is getting out of hand.

Anyway I got the guitar today, and promptly signed up for lessons. Had my first lesson today and I am learning how to read notes and play scales. Hopefully after some practice and pain - it is already getting painful to type with my left hand - I'll be improved for next week's lesson. I have private 1 on 1 lessons, and the teacher was great. The salesperson was different, and much more helpful than yesterday.

I hear that Cibbuano was a guitar player, but.. not anymore? What about Derelict? I heard his dad was known to pull off some mean Petra in his day. Ok I made that up. But there WAS a guitar in his house, so ... whose was it? And if you guys are wondering about BeaverPhearMeister Kev, well he didn't need no stinking instrument. He's pure badass acapella. That's right, he is his OWN instrument! "Puh-che puh uh puh puh puh uh!" Go Kevin!!!!

Tuesday, October 18, 2005

WDJ - Milestone 1 reached

Warwick has successfully reached milestone 1! I went through a series of Ogre3d tutorials and I learned how to render robots, and even ninjas! I put a light behind the ninja and turned on additive shadows, and he cast an ominous shadow. Then I put a purple spotlight on him, and he didn't look so tough anymore.

The winning code to display my title graphic looks like this:

void createScene(void) {
// Create background
material
MaterialPtr material =
MaterialManager::getSingleton().create("Background", "General");
material->getTechnique(0)->getPass(0)->
createTextureUnitState("warwtitle.png");

material->getTechnique(0)->getPass(0)->
setDepthCheckEnabled(false);

material->getTechnique(0)->getPass(0)->
setDepthWriteEnabled(false);

// Disable lighting on the background (it will show as fully lit)
material->getTechnique(0)->getPass(0)->
setLightingEnabled(false);

// Create background
rectangle
Rectangle2D* rect = new Rectangle2D(true);
// Cover the whole screen
rect->setCorners(-1.0, 1.0, 1.0, -1.0);
// Hacky, but we need to set the bounding box to something big
rect->setBoundingBox
(AxisAlignedBox(-100000.0*Vector3::UNIT_SCALE, 100000.0*Vector3::UNIT_SCALE));
rect->setMaterial("Background");
// Render the background before everything else rect->setRenderQueueGroup(RENDER_QUEUE_BACKGROUND);
// Attach background to the scene
SceneNode* node =
mSceneMgr->getRootSceneNode()->createChildSceneNode("Background");
node->attachObject(rect);
}


I don't think that will be my *final* version of that code, but it gets me to my next step at least.

On another note, I dropped by Cosmo Music and checked out guitars. The one that was recommended to me was the Yamaha FG700MS. The salesperson was not very helpful. After I told him that I was hoping to spend around $300, he just thrust this guitar in my hands and said "Here take this one". So I left with a business card, the model of the guitar, and the price of $239.99 written on it in a poor chickenscrawl.

I was going to dismiss the store outright after that encounter, but I read a lot of good things about the guitar on the Internet since then. I may just have to go back tomorrow and reconsider.

Monday, October 17, 2005

WDJ - Milestone 0 reached


Behold the WDJ - or Warwick Developer Journal. I have started a new project codenamed "Warwick", and it is a crack at making a board game style computer game.

I have already written up a set of milestones that I hope to accomplish in the coming weeks. Milestone 1 is to have a "running program showing a title graphic". Of course after my efforts tonight I had to add a Milestone 0: "Get OGRE3d set up and running in development environment". I was originally going to do it all in VC++ 6.0 with some use of Direct3D 9 APIs. I do have some experience with this, but I figured that it would be a waste of time to spend most of my efforts on a rendering engine.

Indeed, there is a very well documented and full featured open source 3d rendering engine called Ogre3d. I took a look at sample screen shots and was intrigued. Then I looked at the sample demos made with it, and I was very impressed. The fact that several commercial projects have decided to use Ogre3d didn't hurt to convince me either.

In case you are curious, "Warwick" is planned to be similar to the earlier mentioned "Carcassonne" - that said, this is my set of milestones. Hopefully I'll be able to make progress on this, and maybe Derelict might even be interested in joining in somewhere along the way.

Milestones (excluding 0):
  1. Running program showing title graphic
  2. Game main menu with "New Game", "Quit" options
  3. "New Game" choice renders a single map tile on a playing surface
  4. "New Game" choice renders a random set of tiles in a grid on a playing surface
  5. Render both set of tiles in a grid as well as a deck or stack of tiles (to draw from)
  6. User can interactively take tiles from the stack and place them anywhere on the grid
  7. Placement of tiles is enforced based on game rules (roads match up etc)
  8. Render a follower
  9. User can interactively place follower anywhere on the last tile placed
  10. Placement of follower is enforced based on game rules
  11. Multiple players allowed
  12. Score is calculated
  13. HUD to show score, which player's turn etc
  14. Camera logic
  15. Internet play
  16. Integrity of game over Internet
  17. Save and Load features
Phew... let's see how far this gets.

Anyone else have the time or ambition? Or maybe just copious quantities of one and not the other? I'm guessing most people are lacking on time, but maybe that just shows a lack of ambition.

More updates to follow, look for future WDJ posts.

Sunday, October 16, 2005

Petals Around the Rose

I would like to challenge you to a duel of wits. Try this little challenge to your mental acuity, it's called "Petals Around the Rose". Someone brought it up in this thread on Slashdot.

I suppose it is pretty geeky to get worked up about a simple puzzle, but that's what got me. It seems so darn simple, and I couldn't see the trick to it. I was prepared for a late night session of figuring, when it came to me. And now I get it. Faster than the time it took Bill Gates to figure it out. The story says that he tried it with brute force at first, remembering and regurgitating past results rather than understanding the game itself.

So besides that mental stimulation, I have a real hankering to study music more. I don't know how to read notes, and I think the only song I can play on keyboard is "joy to the world"... so not too much talent other than my amazing whistling skills.

That said, my brother picked up an acoustic guitar, and I tried to hit the music store by my condo, but it is closed on Sundays. I'm trying to decide between acoustic and electric. I was leaning towards electric due to the lighter strings and because it would be something different than what my bro got, but then again, I would have to deal with the extra hassle of carrying an amp around. Last week I was playing a bit of Nirvana - a very short and simple piece I assure you - and it was great. I forsee a lot of playing in my spare time, it's really fun.

Has anyone else been tempted to read/write/compose/play? I know DJ Derelict has his turntables, and rhythm and timing definitely play there, but don't you want to be spinning your own stuff? Of course, no record "burners" for PC yet eh?

Monday, October 10, 2005

Shake Ur Ass

I succumbed, and bought a little golden lab called "Rex". I taught him a couple tricks already: "Sit down", "Shake a paw" and the amazing "Shake Ur Ass". We won 3rd place in a frisbee competition, and moved up to open class from beginner class.

Of course, this dog is a Nintendog, and I bought a new DS to house him. I also picked up "Feel the Magic" and "Trace Memory" for DS. The dual screens, microphone and the touch pad definitely add new gameplay possibilities.

Unfortunately I don't think I'll be able to play with "Rex" on my way back to Toronto. Why? Because I don't want people to think that I have Teurets. Imagine a stranger on the plane yelling out "Rex, Rex! Rex!! Sit down! Sit down! Sit down! Rex! Rex! Rex!! Sit down!!". Yes, I don't want to be that guy.

I may touch on the other games later, and they are incredibly fun, but let me get back to heaping more praise on Nintendogs. The puppies act so believably, especially the way that they grow disinterested in you and go play with the ball you threw, not bothering to give it back to you. They even get scared of new things, "Rex" shivers when I blow bubbles at him. It is so fun playing with your dog, petting, feeding, and training. Somehow I figure that I will be the only one with a DS in my clique for a while, which is too bad because then I can't have my dog kick your dog's ass. Or sniff it ... I guess? Hmm ok strike that.

Also, I picked up Carcassonne the boardgame yesterday and played 3 rounds with Sunny and my family. Kev wanted to play this and it was from his rave reviews that I ended up getting it. It was either this, "Diplomacy", or "Frag". They all seemed quite promising, but this game was different both from its price tag (half the price of the other contenders), and from its short 30-45 minute play time requirement. It is really frustrating starting a great game of, oh let's say "Axis and Allies", and then not being able to finish it because 5 hours later everyone is so tired of it.

Anyway back to the game, it is an interesting turn based game where you effectively build a map tile by tile, alternating between players. You win depending how you place tiles in relation to little wooden people that you position on the tile that you place, and to the tiles and people that have been previously placed by the other players. The version I got came with a free expansion... the river (pictured above), consisting of 12 new tiles. Wow. I did try it with the river last night and it did make it a little different, especially since farmers (one of the types of wooden people) became effectively neutered. So yes, it is fun, I would recommend it to others, and I'm looking forward to playing it again.

Let me know if you have any cool boardgame recommendations, or videogame relevations.

Thursday, October 06, 2005

Battle for Wesnoth

I have discovered a gem, a true gem I tell you! I love turn based strategy games as much as the next guy who likes them just as much as me, and I have to say that this game, Battle for Wesnoth, is quite addictive, fun, and surprisingly - TOTALLY FREE! It is an open source game the likes of which I have never ever seen.

The pixel art for the characters is detailed, and the level of strategic detail and depth of the game surpasses that of most retail turn based strategy games that I have played (not to say that I have played that many, but I'm basing this on 4-5 console turn based games).

The way it works is that you recruit soldiers and monsters, and as they fight, they gain experience. As they level up, they can change "jobs", gain new skills, and in future missions you can "recall" them if they survive. If they die, they are gone permanently, so you have to conserve the high level guys by sending some form of fodder out to absorb damage. Take over towns to gain some form of income, but there is little micromanaging - it mostly boils down to strategic placement of forces and the like.

Multiplayer over Internet is an option with this, I haven't tried it yet, mostly because I'm still learning how to play.

Get your game on, for free, in a turn-based-fashion. Battle for Wesnoth 1.0 was just released.

Sunday, October 02, 2005

Robocode

I came across "Robocode" a year or two ago, but I didn't really give it a second thought at the time. I just picked it up about a week or two ago (just before my trip to London), and it has me really engrossed.

Robocode is a free, open source toy that you can download (make sure you have Java installed) and immediately start to create your own little tank robots. Think of it as a really deep version of Carnage Heart, you program your robots and send them out to do battle with other people's creations. You can even build teams of robots that work together against other teams if you're up for that.

I started with a very simple robot. It's called SimpleRobot. And this is the main gist of it's logic:

/**
* Fire when we see a robot
*/
public void onScannedRobot(ScannedRobotEvent e) {
aimGun(e.getBearing());
fire(1);
turnLeft(90 - e.getBearing());
}

So when it sees a robot, it aims at the robot, fires, and turns perpendicular to the target in order to better dodge incoming fire. Oh but that's not all. This simple robot also is smart enough to not run into a wall over and over. Behold:

public void onHitWall(HitWallEvent event) {
changeDirection();
}


Well, I updated that robot and made SimpleCounterRobot. It is more of the same with a bit more intelligence in terms of avoiding incoming fire, and occasionally changing direction and the like. The problem with both of these robots is that if they fired at the bearing of the enemy, they would miss if the enemy was moving. I then took on the challenge of calculating the right angle with which to lead a moving target. And thus SimpleAimingRobot was born.

Of course, my robot programming has just begun, I still cannot accurately hit moving targets that have a variable velocity (speed and angle) like those that move in a circle. There are lots of examples of code out there that I could probably just copy but I'm trying to learn step by step. It's a lot of fun actually. You can try my robots out by downloading the JAR file included in this post. I left the source code in the JAR so you can take a look at what I've done if that interests you.

Now I'm going to try to get Indesin, CdnAttackBeaver, DJ Derelict, Cibbuano and the rest of you into making something so that we can all compete and laugh at the losers. A FactionFive Robocode League!!!

Actually if Kevin gets his act together I think we can take some inspiration from Carnage Heart and make a more accessible game out of this. So now I go back to my robots, to tinker away. If I had money to burn I might even consider using these programming skills to control something real but then some of those robots cost over $2000, so maybe not. At least not until they can carry around real guns. Oh wait, those already exist. Cool!