• entries
135
130
• views
52794

This journal may contain languages not suitable for minors and some occasional swearing.

## I'm in Honduras!

I'm writing this post from Honduras, we drove here this morning and we'll probably head back to Guatemala tomorrow, it's only a few hours away. And next week, I'll be in sunny Cancun, Mexico. It's gonna be fun.

What am I doing in Honduras you ask? not much, hanging out with my friends, I tagged along while they run a business. I am working with them on a separate project, so we'll probably spend a few hours working on that later tonight.

It's pretty damn hot here, even though it's raining quite a bit.

Anyway, not much of a technology oriented post, but I dont have much news about that, other than my SGE website, if you haven't seen it, go check it out.

SGE

## HMMMM..... Beer

I love it when they bring us beer for dinner.

So I'm working on getting importing models with full skeletal animation support. I've been doing this for the past couple of days, but mostly I had just been evaluating my options. First I gave Cal3D a try, setting it up was a pain; I'm not fond of DLL's, not for something that's not a plugin to an existing application, I know they're useful in some cases, but if I can avoid them I'm happy, I actually forgot what was the ultimate reason why I decided against it, I didn't like the way it was coded, I didn't like how a model was broken up into many files, just too many negatives. In the end, I decided to go with Microsoft, I mean, I'm already using Direct3D, so why not use their file format?

It took me about 20 minutes to get a hacked in animated character (that completely bypassed my entire rendering architecture), and now I'm working on actually making it conform to the architecture; here's the first thing I saw when I compiled:

This is actually better than I expected, I expected my computer to die a horrible death, but instead I got that! So it's all good, it just means somewhere the data is getting read or written incorrectly and it's jacking up the indices, or the vertices. Shouldn't be too bad to figure out.

Alright, I'm going to keep at it because it's pretty exciting.

Cool, just a few minutes after writing this post I found my error, I forgot to account for the index buffer stride, so after quickly fixing that:

Now, I know that looks weird, but, that's just because I have only converted the geometry over, I completely ignored all the transforms, so every "submesh" is being drawn at the origin (everything has the identity matrix as its transform), so now, it's only a matter of getting the right transforms for each submesh, then I'll have to also get the frame data for the animations and get the bone information as well.

If all goes well, I'll have an untextured, skeletal animated model tomorrow, making it textured is the easiest part, all I need to do is load the textures into the manager and save the handle in the submesh's material, it's so easy, I'll leave it for last.

## Trip is back on. 90% sure

It seems I now fly out tomorrow morning, with a somewhat upside down schedule... damn stupid money hungry airlines... they f'd me up on purpose from what I can gather. I'd complain tomorrow, but then they'd probably spit in my crappy airplane food, I'm not sure if that'd be an improvement, but still.

On game development related news, this morning I got the rest of the 3d transformations to work properly, and I now have a rotating triangle that is also moving along the Z axis with perspective projection.

Next step will be to get the textured polygon rasterizer, and then I'll finally be able to check if the BSP code is working, and I believe it is.

I was also very happy that with all the transformations, I didn't lose much in terms of framerate, it did go down a tiny but, but it's just a fraction, so it's good, it also means that the fixed point math is doing what it's supposed to, and that makes me happy.

## Beware of zombies!

I thought this was pretty funny, so I decided to share it...

I can never go near that file again, I do not wish for it to eat my brains.

*edit: I had the wrong image before...

## Yesterday

Didn't write anything yesterday, it was quite a day, I was refactoring a bunch of script. My first idea didn't quite work as planned. But I was mentioning the problem to a friend and he suggested I try a point to line distance solution. Turns out that gave me a very nice, elegant and reliable solution to the problem. It took me all afternoon, but once the point to line stuff was working everything else just came naturally and started falling into place.

Today is one of those days in which I'll spend most of the day getting the level stable, playable and looking good. Then I'll add a feature and everything will go to hell, just like always.

## a game?!

Ok, so I'm FINALLY working on a game project. I started yesterday with some real basic stuff. It's going to be a small puzzle game in C# that I'm going to try and sell similar to how I'm selling EasyShots and all that.

I figured, I already have 3 programs out there, instead of using my time and energy on a fourth one (which is already in development), I'll give making a game a shot.

So here's a bit of what I know:

- Will use C# with .Net framework 2.0
- 2D puzzle/action game
- Uses DirectX (Direct3D for 2D, no HW stuff)
- Single player
- PC standalone & web version (web version will be a port, no details right now)

Here's what I have:

- A prototype game design
- A basic 2D drawing library (at 'alpha')
- A photoshop mockup of the game interface
- A high level design of the game mechanics

And that's it... I'm still thinking and writing down ideas because I currently don't know where to begin, and to me that means I have not properly planned and design the game, so opening up visual studio and programming blindly would cause this project to quickly make its way to the "incomplete" bin, instead I'm going to go plan more... way more.

## xRC, my new toy

So here's something new... a little while ago some bad shit happened that have put me in the place where I am today, long story short, I currently don't have a TV, except for the TV tuner card in this computer. Unfortunately, it's a pretty old TV tuner, so it does not have a remote...

Let's take this story back a few months, to E3... at E3 I won a cool wireless XBox gamepad, not long after I bought an adapter so I could use it on my PC (mostly for game development, I have no PC games that are suitable to play with a gamepad).

Fast forward to the present... one day while watching TV and wishing I could just lie in bed and switch channels, I saw the xbox controller lying around, so I thought to myself... why don't I just write a little program that will map the gamepad's output to keyboard keys...

I have not fully established whether I'll try to sell this, or release it as freeware, I guess I'd like to gauge interest on it and then decide, so, if you're interested and want to try it out, GET IT HERE

Here's a screenshot so you get an idea of what it is:

Oh yea, system requirements:

- Windows XP
- .NET Framework v2.0

Feedback, comments & bug reports are greatly appreciated!

## Finally!

I was FINALLY able to get all my projects in their right locations with all the perforce bindings working correctly, at least it seems more likely that it worked this time. It seems that everytime I think they're working when I come back at night and start messing with the projects, they're not quite right. I do think I got it right this time, that's the one thing I don't like about perforce, it's not always easy to get the projects working correctly, but once they are, it's so damn cool.

So, I've been thinking a lot about it, and I think I've finally accepted what I always knew, but didn't really care. I've been concentrating too much on writing an engine, which is fun and all, but it's not going anywhere. This is perhaps because the goal is elusive.. a moving target even, the closer I got, the newer more advanced thing I wanted to add... there was a lot of work, but not enough direction, no vision.

So I've decided that I'm going to take what I have, do a quick evaluation of what stays and what goes (I already have a pretty good idea what that is) and I'm going to move in the direction of writing a game.

On the game design side of things I already have an idea, an idea I like quite a bit, so I'm working on evolving that idea into a design. Currently I have a page with a story overview (I'm keeping the story light, but I do want some story elements) and a couple of mindmaps with ideas and structure.

Hopefully, I'll be able to keep this simple and finally evolve SGE into something more real.

## Noooo

Sunday is almost over and I don't feel like I accomplished anything this weekend. Well, that's not entirely true, I did find that I'm not gonna be able to use EaseImport http://www.easeproduction.new.fr. I liked its simplicity and how easy it was to get something up and running, but it appears to be buggy. I thought the problem was on my end, but I saw a post on the site's forum where someone else is experiencing the same issue. If the issue were to be fixed relatively soon, then I'll give it another shot, but I won't be as patient, I already wasted a lot of time.

For now, I'm back to using Flexporter (http://www.codercorner.com), but unfortunately, it is giving me its share of problems. For once, this is a significantly more complex software, so integrating into an existing project is not as easy. And the other part is that again, I'm experiencing some strange behavior with me model's pointer, so it's crashing when I'm trying to build it. This time, I'm pretty sure the problem is on my end, I'm just getting tired, so it becomes difficult to spot problems.

Anyway, I'll have more (though, not much more, since I'll be at work all day) tomorrow.

[UPDATE]

Got flexporter working, I can now load the files, (geometry only). I'll do the textures tomorrow, then I'll move on to loading animations (skeleton hierarchy and the like). But now I gotta go to bed. yay.

## Busy, busy

I keep wanting to post here, and go back to programming at home a bit, but I've been really busy, not so much at work, the work is cool, maybe a bit slow since we're in post-E3 mode, but nice. But Im still unpacking, and the last two nights I've gone to pre-natal classes with my wife (we're having a baby REAL soon), so we have tons to do, like setup the nursery and finish unpacking and cleaning up.

In addition, my computer is going real slow, so I think it's time for a good ole format of the C: drive, but that's time consuming and I have to do it in one sitting, I don't like leaving the computer crippled or vulnerable by not doing it correctly, perhaps I'll get a chance this weekend, Monday is a holiday here in Montreal, so it's a perfect opportunity.

And now I gotta run off to work, yay!

lates.

## DirectInput

So, does anyone know how to determine if CapsLock is enabled/disabled with DirectInput? I can detect if the key was pressed, but I need to know in what state it currently is in.

Thanks.

## x-mas wish list

Ok, so I decided to share with you and at the same time immortalize my list for Santa for this year so that one day I can look back and say "why the hell did I want that?".. but here goes:

1. Dell Inspiron 9300 laptop (with the good video card)
2. Dell Axim x51v (with the good video card)

hmmm, when did I become a Dell fanboy? hehe dunno... but those two are pretty awesome.

3. For EasyShots and Explore++ to sell really well.

That's it for my material wishes, I have a ton more non-material ones, such as "to become one with the universe and steal all of its knowledge"... I also have some new year's objectives, like "launch the first privately owned satellite made from old circuitboards and chewing gum into space". But I'll save those for a different list.

Happy holidays!

BTW, is it not cool this year to say Merry Christmas? jeez, next year they'll have to sell talking toy Santa's that either 1. have a disclaimer that is very quickly spoken after each "HO HO HO" or 2. Santa's new phrase will be "HO HO HO Happy time off work, but in case you do have to work, happy day at work!"...

## Introducing EasyShots!

So here's my latest and greatest!

I wrote this program because I was tired that every time I wanted to show a friend or a coworker a screenshot of something I made, some weird bug, or something I was working on I had to hit PrintScreen or Alt+PrintScreen (for a specific window), fire up Photoshop, create a new image, save it, then find it and send it... to me this was way too much time and effort, especially when I had multiple programs running, the debugger and my engine all in the background.

EasyShots was born, this program quietly sits in your systray and whenever you press PrintScreen or Alt+PrintScreen, that screenshot gets saved into a list of thumbnails. From EasyShots you can preview the screenshot, you can save it out, you can also save out ALL the screenshots you've taken, and most importantly you can drag a screenshot out into any other application. This could be Photoshop, email, instant messenger, anything!

## Tired

So I haven't been around much these past couple of days... my wife got a job that requires me to wake up at an extremely early hour in the morning to go drop her off... being the night person that I am, this is problematic because now I feel tired at night when I need to be up and doing my stuff. But, I'm sure I'll get used to it and I'll be able to get back to my old routine, or close to it.

Not a lot of interesting stuff, I'm still having that UV problem, sorry I keep missing you Rick, I've been in bed when you've msg'd me... =(

Hopefully I'll be able to lock that down during the weekend, it's gone on for far too long, it's weird, I didn't have this problem when I wrote my own 3dsmax exporter back in the day... now I've tried two exporters and I get the exact same results, and the author of one of these exporters said my code was fine... so annoying.

## DirectX SDK

An update has been posted for the DX9 SDK for anyone interested:

DirectX SDK April 2005

They fixed some PRT stuff and added a new feature that generates UV mapping for an arbitrary mesh... seems interesting.

## cool site

Found a cool site...

site!

it's 3D graphics stuff with lots of code samples.

## WOW

Just signed up for the World of Warcraft stress test. I didn't get into the beta back when it started, and not being a real MMORPG fan I wasn't devastated. But from what I've heard, this one will be worth picking up, so I'm happy I get to play it in a couple of days, or whenever they open it for testing. It's downloading on my home computer as I write this.

On other news, I'm fucking starving, lunch won't be here for another 40 minutes...

What else? oh yea, I guess I'll finish this with another quick tip.

Never, EVER hardcode numbers, if you need to, use a const variable for it, this will describe what this number is being used for. Doing stuff like this:

float fAltitude = fCurrentAltitude * 0.304799f;

const float fMetersToFeetRatio = 0.3040799f;
float fAltitude = fCurrentAltitude * fMetersToFeetRatio;

by doing it this way you don't have to guess what's going on, it's plain to see you're converting fCurrentAltitude from meters to feet.

And that concludes todays quick tip.

Just saying hi.

## Bored.

I'm at work and I have nothing to do... especially since I start my vacation tomorry. Well, I still need to come in two days next week, but that's not bad.

I got a new book:

3D Game Engine Programming by Stefan Zerbst.

I no longer buy these books to read them in their entirety, I just got them to read a few interesting chapters and as reference when I'm stuck on some problem. But I'll at least skim through most of the chapters and read anything interesting. I also like to support game development authors whenever I can, they are usually people who not only have a full time job, but they make the time to share their knowledge and experience with the rest of us. Knowing what it's like working in this industry, I know how valuable free time really is now.

Not much else going on, turkey day is upon us, I'll probably spend a good amount of this weekend doing some research programming, writing a couple of shaders, or maybe setting up a little client/server app, I've always wanted to play with networking programming, but until now I had been too busy.

Anyway, I think it's check out time.

LS.