Sunday, December 13, 2009

You want the good news or the bad news?

I got the following error while using Google Docs. As usual, amazingly creative error messages in my opinion! (click the image for a readable version).


Sunday, May 10, 2009

Thousander Club Update (5/10/2009)

This week's Thousander Club update:
  • Game Development Hours: 0 / 1000 (this week), 50 / 1000 (overall)
  • Novels finished: 0 / 12
  • Books finished: 0 / 12
  • Games finished: 6 / 12

This space intentionally left blank...

Sunday, May 03, 2009

Thousander Club Update (5/3/2009)

This week's Thousander Club update:
  • Game Development Hours: 0 / 1000 (this week), 50 / 1000 (overall)
  • Novels finished: 0 / 12
  • Books finished: 0 / 12
  • Games finished: 6 / 12
Nothing new much this week, got extremely swamped with work cuz of a deadline at work, and spent most of the weekend outside.

I really miss working on my game!

Sunday, April 26, 2009

Thousander Club Update (4/26/2009)

This week's Thousander Club update:
  • Game Development Hours: 3 / 1000 (this week), 50 / 1000 (overall)
  • Novels finished: 0 / 12
  • Books finished: 0 / 12
  • Games finished: 6 / 12
I have finally managed to get some work done this week, although not as much as I had hoped. The weirdest stuff kept coming up, it's like the whole world got together and decided they shouldn't let me work on my game development! Still, I got back to working on my Rubik Cube game, and hopefully I will continue working on it this time until it gets released.

I also managed to finish Sam & Max: Season 2. One heck of a fun game! I just can't help but smile when I remember the crazy dialog and the even crazier stuff they do. It's living proof that a game doesn't have to have fancy graphics or a complicated physics or gameplay system to be fun, it's all about creativity. So, that makes it the 6th game I've finished this year, and I'm currently also playing Need for Speed: Undercover and Tomb Raider: Underworld, though I'm not enjoying either one that much. But, more on that later...

Sunday, April 19, 2009

Thousander Club Update (4/19/2009)

This week's Thousander Club update:
  • Game Development Hours: 0 / 1000 (this week), 47 / 1000 (overall)
  • Novels read: 0 / 12
  • Books read: 0 / 12
  • Games finished: 5 / 12
So far, things were hectic at work this past week cuz I was trying to get as much work done as possible before the end of the week. That's because I took this week off, so I'm free for a while to try and get everything back on track. I have an exam on Wednesday that I'm studying for, but after that I'll have 4 more days to work on my game development.

Should be interesting...

Sunday, April 12, 2009

Thousander Club Update (4/12/2009)

This week's Thousander Club update:
  • Game Development Hours: 0 / 1000 (this week), 47 / 1000 (overall)
  • Novels read: 0 / 12
  • Books read: 0 / 12
  • Games finished: 5 / 12
Still not much progress, but life has been pretty hectic recently. I'm looking forward to a busy couple of weeks too, but after that I'm hoping things would slow down a little (a lot would be great too!!) and I would get some time to catch up on everything.

Sunday, April 05, 2009

Thousander Club Update (4/5/2009)

This week's Thousander Club update:
  • Game Development Hours: 1 / 1000 (this week), 47 / 1000 (overall)
  • Novels read: 0 / 12
  • Books read: 0 / 12
  • Games finished: 5 / 12
I actually did get the chance to do some game development this week! I worked a little on the Rubik Cube game, and I finally figured out what was preventing the CEGUI system from starting up properly. I didn't keep working on it that much, though, I got busy with the weekly stuff and the weekend went into finishing yet another game!

So, Game Development Hours +1 and Games finished +1.

Sunday, March 29, 2009

Thousander Club Update (3/29/2009)

This week's Thousander Club update:
  • Game Development Hours: 0 / 1000 (this week), 46 / 1000 (overall)
  • Novels read: 0 / 12
  • Books read: 0 / 12
  • Games finished: 4 / 12
Well, I haven't had any time for game development, but I've been working on a few other fronts. I picked and already started reading a couple of technical books, simultaneously nonetheless! I'm nowhere near finishing any of them, but I am using my free time to read a bit from each book, until I get bored, then I switch to a different one. So far, there's one about Perl, one about C# 3.5, one about TFS, and one about web usability. I won't disclose the book titles now, but I promise I will write a separate post about each of them when I finish it.

I am also playing 2 games simultaneously, and I've actually got my eye on a 3rd one that I'm gonna get soon. Again, titles will be disclosed in later individual posts, along with the 4 games I have already finished.

Too many simultaneous stuff, right? What can I say, I like to keep myself occupied ;-).

Sunday, March 22, 2009

Thousander Club Update (3/22/2009)

This week's Thousander Club update:
  • Game Development Hours: 0 / 1000 (this week), 46 / 1000 (overall)
  • Novels read: 0 / 12
  • Books read: 0 / 12
  • Games finished: 4 / 12
So, yeah, I'm ahead in my games objective, which obviously means I'm just playing games in all my free time and doing nothing productive with my life.

Well, what can I say? That's the way it is! As soon as you lose momentum, it becomes that much harder to get started with something again.

I'm trying, though... Honestly!

Sunday, March 15, 2009

Thousander Club Update (3/15/2009)

This week's Thousander Club update:
  • Game Development Hours: 0 / 1000 (this week), 46 / 1000 (overall)
  • Novels read: 0 / 12
  • Books read: 0 / 12
  • Games finished: 2 / 12
I know, I know.. I missed the updates for the past two weeks! In a row! Well, what can I say, I've been busy...

With what, you ask?

Well, first of all, right after posting the last update, I actually went out and got a new PC! Yeah, starting to guess the reasons more clearly now?

So, having a brand new PC that can run all the brand new games; pretty exciting if you ask me! Pretty bad for everything else, though; I got into gaming at full throttle! Now the weekend consists of gaming, sleeping, and more gaming! The good news, though, is that at least I'm making progress in that area! I finished 2 out of my 12 games for this year! I'm actually thinking of putting a restriction for myself to only play 1 game each month, from now on, so I can focus on other things as well.

Anyway, other than that, work has been pretty hectic! But, more on all that later; I hate making one blog post too long, so I'm gonna break it down into smaller, single-topic posts. So, that was the Thousander Club update post!

Thursday, February 26, 2009

Thousander Club Update (2/22/2009)

This week's Thousander Club update:
  • Game Development Hours: 3 / 1000 (this week), 46 / 1000 (overall)
  • Novels read: 0 / 12
  • Books read: 0 / 12
  • Games finished: 0 / 12
I know this update is a couple of days overdue, but it was a rather hectic week and my home PC has been acting up a lot lately, so I just couldn't get around to it earlier.

I got to work on finalizing the Rubik Cube game last weekend, but unfortunately I was hit by some strange error mid-way and I stopped and said I'll go back to it later on, and I haven't yet!

I also made some progress in the novel I'm currently reading, but barely.

I hope I can get some progress done this coming weekend, in all aspects. I also have other stuff that needs my attention, so I need this to be a very busy weekend. Should be exciting though.

Sunday, February 15, 2009

Thousander Club Update (2/15/2009)

This week's Thousander Club update:
  • Game Development Hours: 0 / 1000 (this week), 43 / 1000 (overall)
  • Novels read: 0 / 12
  • Books read: 0 / 12
  • Games finished: 0 / 12
Unfortunately, still no progress this week. I've been kinda low on game development spirit lately, and I'm busy with other stuff that kinda have more priority.

I'm also starting to think the reason might be that I have reached a stale kind of state in the Rubik Cube project, since I almost figured out everything I need to do and what remains is to get things in order and make it ready for release! I still need to put in a GUI, of course, but I don't think that should be too hard. I'll try to work on that soon, and get everything else done so I can focus on getting at least the Rubik Cube project finalized.

Sunday, February 08, 2009

Thousander Club Update (2/8/2009)

This week's Thousander Club update:
  • Game Development Hours: 0 / 1000 (this week), 43 / 1000 (overall)
  • Novels read: 0 / 12
  • Books read: 0 / 12
  • Games finished: 0 / 12
Yeah, those are some big fat zeros! I had a lot going on in my personal life this week, so I didn't really get a chance to do anything worth mentioning. It should get better soon though, I'm trying hard to get things under control.

Stay tuned!

Monday, February 02, 2009

Changing response status code in ASP.NET web applications

For a little change in flavor, here's a bit of technical talk about web development!

There's this interesting problem I came across at work that I wanna share my experience about. The problem was the following: for an ASP.NET web application, when someone tries to access a directory under the site while that directory doesn't have any directly viewable pages (for example, the "/images" or "/CSS" directory), I don't want this person to get a "403 - Forbidden" error, but a "404 - Not Found" error instead. The idea behind this requirement is for security reasons, since, using this 403 response, someone could learn the directory structure of the website simply by trying different directory names, and he might stumble across a directory that he doesn't have access to, such as "/administrator" which would give him a better target to aim future attacks at.

So, the first attempt to fix this problem was through making an HttpModule and add it to the web.config "httpModules" section. To make an HttpModule, all you need to do is have a class in your application that inherits the System.Web.IHttpModule interface, and handles its methods. And in the Init method of your class, you would add and register an event handler for the HttpApplication.PreSendRequestHeaders event. The HttpApplication object is passed as a parameter to this Init method. In this event handler, I did something like this:

HttpResponse response = httpApplication.Context.Response;
if (response.StatusCode == 403)
{
response.StatusCode = 404;
}
What this does is check whether the response status code is 403, and replaces it with a 404 status code.

After creating this class, all I had to do to activate this HttpModule was to add it in the web.config file in the <httpmodules> section in <system.web>.

This didn't work, however! The reason this didn't work became obvious quickly after a few breakpoints and some debugging. Since directory listing was denied in my IIS website, when someone tries accessing a directory name they get the 403 response code directly from IIS, and the ASP.NET runtime doesn't know anything about that request in the first place!

This lead to the natural conclusion that, if ASP.NET doesn't know anything about it, this obviously needs to be handled from IIS itself through an ISAPI module! Of course, further investigation made it very clear how messy and dangerous ISAPI modules are, and since this isn't really that much of a must-do, the whole thing was about to get abandoned. That is, until I had another idea!

Instead of relying on IIS denying directory listing, I put an empty Default.aspx page in the directory I wanted to hide. In this Default.aspx, all I needed to do was run a single line of code that changes the response code from 200 (OK) to 403. When this happens, then the httpModule is invoked and finds this response code in the response header, the above code will work its magic and make it a 404 instead! Of course, I could have avoided adding an HttpModule and simply set the 404 response code in the page itself, but since I have many folders that I need to hide and I might need to handle this situation differently one day, I chose to keep the HttpModule and issue the 404 error from there instead.

So far what would happen is that the Default.aspx would get rendered to the output but the returned status code would be 404. If you need this to change, you can clear the response in the HttpModule code and change the response to, say, the common IIS 404 error page.

Also, if you have some directory permissions setup in web.config files inside those hidden folders and you want other (unauthorized) users to get the same 404 error for these (restricted) files too, all you would need to do is handle 401 (Unauthorized) status codes in your HttpModule as well. But, be careful, if you are using the ASP.NET built-in authentication, and you deny anonymous users, you should know that ASP.NET returns a 401 the first time an anonymous user tries to access the site, so that the browser would know that this site needs authentication and either sends this authentication directly or asks the user for it (depending on settings). So, if you simply handle all 401 responses, you will interfere with this process and EVERYONE will get 404 errors! So, what you need to do is, if you're using ASP.NET build-in authentication (ex. via web.config's "authentication" and "authorization" sections), you need to let the 401 pass if the HttpApplication.User.Identity.IsAuthenticated property is false, so the user could get the chance to authenticate.

Well, that's it. I hope this was informative! If you read this and find it useful, please drop me a comment. Also, I would be really interested in any comments about how good or bad this method of hiding the directory structure is. If you can bypass it, you should definitely let me know ;-).

Sunday, February 01, 2009

Thousander Club Update (2/1/2009)

This week's Thousander Club update:
  • Game Development Hours: 14 / 1000 (this week), 43 / 1000 (overall)
  • Novels read: 0 / 12
  • Books read: 0 / 12
  • Games finished: 0 / 12
This week was a little slow for some reason. I still managed to do some work over the weekend, but unfortunately not all the work I needed to finish to get done with my Rubik's Cube game. I did, however, finish this much:
  • Successfully implemented face rotation, both absolute and relative to the current cube's rotation.
  • Got the arcball rotation working (although not quite perfectly yet, as it clashed with the face rotation code for some yet-to-be-determined reason!).
This last issue where the arcball rotation clashed with the face rotation consumed a lot of time trying to reason with, and eventually took up more time than it was supposed to. I think I know where the problem is, though, but I'm not sure I'll take the time and effort needed to fix it, since it's partially a bit of clashing functionality as well. You can rotate the cube in 90-degree animated rotations, and you can rotate each face clockwise and counter-clockwise. Also you can choose to either rotate the "current" top/bottom/left/right face (relative to the current rotation) or the "absolute" face (as if you were still looking at the cube in its original orientation). I'm starting to think an arcball isn't really needed. I do wanna get it right though, especially that I already did manage to get rotation working perfectly with face rotation in a previous DirectX variant of the Rubik Cube game.

Anyway, I know I said I'll try to get an initial version ready by now, but it looks like it's gonna have to wait just a little bit. I still need to "classify" my code, so to speak, and I need to see if I can make it into a redistributable package so you wouldn't need to have Ogre3D installed before you can run it.

On a different note, I havn't been doing any progress with either of the other objectives! Here we are, starting February, so I really should try to finish my first Book, Novel, and Game. My choices are: Learning Perl, LoTR: The Two Towers, and Doom 3, respectively. I will try to update on my progress for these objectives as well.

Sunday, January 25, 2009

Thousander Club Update (1/25/2009)

This week's Thousander Club update:
  • Game Development Hours: 24 / 1000 (this week), 29 / 1000 (overall)
  • Novels read: 0 / 12
  • Books read: 0 / 12
  • Games finished: 0 / 12
Now that's what I call progress! I decided I really need to focus on my game development this week, and so I did. Since my last week's decision of pausing work on my main game project and instead starting a 3D Rubik Cube project, I've done a great deal of work on that and I've learned a great many things about Ogre that I didn't know before. Here's what I've reached so far:


So far, I've managed to:
  • Get one of my old DirectX cube meshes that I had made myself on Maya back in the day, and use Blender to convert it to an Ogre mesh.
  • Load up that mesh and use 26 copies of it to compose the big cube.
  • Create a rotation animation using Quaternions and triggered by the keyboard WASD keys.
  • Add some debugging information display, in the form of the on-screen overlays displaying some useful values, and the red/green/blue axes to the left showing the current rotation of the cube in terms of X/Y/Z axes.
  • Add mouse ray picking and use it to select the cube currently under the mouse when the left mouse button is clicked. I tried highlighting the selected cube by showing its bounding box, then alternately went for exchanging the base "black" material for the cube body to a red material to indicate the currently selected cube.
I still need to figure out how to:
  • Get the cubes of a certain face of the big cube, both absolutely and relative to the current rotation, and rotate that face just like a normal Rubik Cube face rotates.
  • Implement this face rotation so that it would be triggered by the mouse in a click-drag motion, and allow for rotating the entire cube using the mouse in an ArcBall style.
  • Show "mirror" copies of the cube to display the back of the cube, but without using multiple viewports. I've already tried it using multiple cameras/viewports, and it killed the frame rate!
Hopefully I'll continue working on it with the same energy throughout next week, and if by next week's update I'm done with these objectives and I find time to encapsulate things into classes (I'm currently working out of one class since I keep changing everything every so often) and make it into a distributable package, I might release it here for everyone to download it and try it out for themselves...

Sunday, January 18, 2009

Thousander Club Update (1/18/2009)

This week's Thousander Club update:
  • Game Development Hours: 2 / 1000 (this week), 5 / 1000 (overall)
  • Novels read: 0 / 12
  • Books read: 0 / 12
  • Games finished: 0 / 12
Busy, busy week! I had lots of free development time, but I spent it learning Perl instead (fascinating language, by the way!). In the short time I did spend on game development, though, I discovered that I know a lot less about Ogre than I would like to. So I might actually start working on reaching smaller objectives with the code just so I can learn to handle Ogre more aptly. I was even thinking of making the Rubik's Cube game using Ogre; since it's kinda been my Hello World of 3d platforms.

I'll try to dedicate more time to game development this week, though, regardless of what I'm working on.

Sunday, January 11, 2009

Thousander Club Update (1/11/2009)

This week's Thousander Club update:
  • Game Development Hours: 3 / 1000
  • Novels read: 0 / 12
  • Books read: 0 / 12
  • Games finished: 0 / 12
I actually managed to do some game programming this weekend, which kicked off this year with the first 3 hours. I am pretty fired up about the game, an I will try my best to take full advantage of that for as long as I can. If all goes well, I will be posting some serious updates soon, and maybe if I managed to get that control system working like I have in mind, I would also post a small demo for that!

As for the other activities; I haven't decided on a game to play or a book to read yet, but I already have my choice of novel set; Lord of the Rings 2: The Two Towers. I simply can't wait to get back into that mystic and marvelous world again. I just need to do some time management so I would get to do all that I wanna do.

I am also open for suggestions for a good video game to play and a useful technical book to read. I was thinking since I never really got to finish Doom 3, I might re-install that and give it one more try. I was also thinking of reading The Art of Assembly or some other book about assembly language; cuz I've been getting kinda curious about the deep and greasy details of assembly languages recently (I know someone who would be pretty excited to know this! If you're reading this, I'll be expecting a comment from you with a few book suggestions about that ;-) ). So, if you have any recommendations, please share!

Saturday, January 10, 2009

The Thousander Club, re-re-visited

So, I've had some previous attempts with The Thousander Club, which didn't go quite as hoped for at all. First year, I kinda reached a point where I stopped blogging altogether, and of course The Thousander Club stopped consequently. Then the second year, I made a set of different goals and the result wasn't exactly what I hoped for either.

Well, I wasn't completely sure whether I would set any goals for this year, but after reading Gianfranco's post about joining The Thousander Club in 2009, I guess just because I didn't reach what I wanted to doesn't mean I shouldn't keep trying. And, as Scott puts it (in the comments): "We’re going to make it this year, I tell ya!". I do feel the same way, I feel that for me, 3rd time will be the charm.

As for this year's Thousander Club, my goals are:
  • 1000 Game Development Hours recorded
  • 12 Novels read
  • 12 "Technical" books read
  • 12 Video Games played
I will start counting the hours I work on my new game idea and game development in general, and I will always have a monthly selection in each of the other categories, pledging never to let a month pass without making progress in each of them.

My weeks will be from Sunday to next Saturday, and I will post weekly updates on Sunday of each week.

Until next update...

Tuesday, January 06, 2009

Don't try this at home

Let me just say that I think operating on an electronic device, say a PC, while it's powered and running, is a bad idea. It is also a bad idea to, say, try to screw a fan off of the motherboard while that PC is running and already has windows up. It would be a further worse idea to do all that while instead of looking at what you're doing, you are in fact looking at a movie running on the screen of that very same PC! It's a bad idea because if, perchance, that fan would slip out of your hand while unhooking the last screw, it might end up falling on the display card, which would in turn cause the entire system to issue all sorts of weird noises and freeze up instantly, only pure luck standing between it and total meltdown!!

I'm just saying, I really wouldn't do any of that if I were you.

I'm not you, though...


Just a passing thought!

Thursday, January 01, 2009

Still Alive...

So yeah, I am still alive an kicking! Well, alive anyway; I'm not really crazy about kicking... Anyway, I know it's been a while so here's a long overdue update of my life since the last blog post...

First and foremost, I am finally done with my obligatory year of service in the armed forces! Since the start of December 2008, I officially became free of my ties to the army and all the crap that involved. Of course I'm still in the "reserve" forces until like 2017, but that usually (hopefully) doesn't mean anything other than having to do some extra paperwork whenever I need to travel or something. It was a long and tiresome year, and although I did learn a lot from the experience; I am deeply glad it's over!

The past couple of months got a little hectic, with the army service nearing its end and then going back to full-time web development work afterwards. I've been trying to get things into order and I think I'm almost there... I still haven't managed to get that much free time after my day job to do anything else, but hopefully that would change starting next week. I have lots of projects that I wanna work on -- both technical and otherwise -- and of course since there's only one of me and only 24 hours in the day (unfortunately!), I will need to get things organized and prioritized. I'm still in that phase right now, but I'm actually starting to realize it's taking too long so I promised myself to get things in order pretty soon.

As for my objectives list, it's nowhere near done! I wanted to read 12 novels, finish 12 games, finish my first game project, and earn an MCPD certificate. Here's how bad I did:
  • Novels Finished: 2/12 (The Hobbit & The Fellowship of the Ring)
  • Games Finished: 6/12 (Starcraft 1, Max Payne 1, Max Payne 2, The New Super Mario Bros., XIII, and Second Sight)
  • Game project: Barely even started!
  • MCPD: Almost finished the first book, then stopped around the beginning of September and never resumed.
So the moral of the story is: it didn't work out quite as I expected. I need to be more organized in 2009 and work on time management so I can establish all my goals.

The last bit of news is about an online game: World of Warcraft. I finally got down to playing it, and I am happy to report that it is as legend tells and much, Much more! I won't start talking about it now, but enough to say that it is an impossibly rich and detailed world, excellent gameplay, and an amazing online gaming experience. I only played the 10-day trial, but I actually had to fight the urge to get a paid subscription. The only reason I haven't so far is because it's very engaging and I know it has a very good potential of being the center of my life for a really long time (which is a nice way of saying "addiction"), and I have more important things to do with my free time at this phase. That said, I am certainly looking forward to the day I actually do get a subscription and get immersed in that wonderful world.

Well, that is certainly a lot of typing. I still have a few more blog posts in mind, so keep those RSS readers tuned...