Showing posts with label Development. Show all posts
Showing posts with label Development. Show all posts

Monday, May 07, 2012

Hug A Developer Today

Sometimes, I wonder if I still want to be a developer. :'( 


Thursday, September 01, 2011

To Excel In Excel

I never thought there would come a day when I have to do this...


But...


:'(



















I really suck at using this.




Friday, June 03, 2011

Chinese Rhymer!!!

WEE!!!

Took some time to materialize an idea that was conceived last year.

Really happy with the results!



Monday, May 18, 2009

What's The Best Comment In Source Code You've Seen?

Came across a website some time ago, with a list of "What's the best comment in source code you ever encountered?"

And I think it really contain some comedic gems...

So I've extract some of the best parts and put it here.

Oh yeah, this post is for programmers only.

Non-programmers probably won't catch the joke.

My personal favourite is the "Me and God" one... Haha. I'm going to try putting that next time.



//You are not expected to understand this



double penetration; // ouch



//Abandon all hope yea who enter beyond this point



// If you're reading this, that means you have been put in charge of my previous project. I am so, so sorry for you. God speed.



// Dear maintainer:
//
// Once you are done trying to 'optimize' this routine,
// and have realized what a terrible mistake that was,
// please increment the following counter as a warning
// to the next guy:
//
// total_hours_wasted_here = 16



//When I wrote this, only God and I understood what I was doing
//Now, God only knows



/*
* You may think you know what the following code does.
* But you dont. Trust me.
* Fiddle with it, and youll spend many a sleepless
* night cursing the moment you thought youd be clever
* enough to "optimize" the code below.
* Now close this file and go play with something else.
*/



/**
* Always returns true.
*/
public boolean isAvailable() {
return false;
}



// I am not sure if we need this, but too scared to delete.




// I am not responsible of this code.
// They made me write it, against my will.



long john; // silver



int counter;
//11/15/08 13:21 It's a counter
//11/16/08 14:13 Obviously. Could you be more specific?
//11/16/08 14:22 It's for a loop
//11/16/08 14:41 WHICH LOOP??
//11/16/08 15:05 Hm... doesn't look like it's used anywhere in this program
//11/17/08 09:28 Well what I want to know is why it's defined in the first place then
//11/17/08 10:01 What I want to know is why we've spent so much time trying to figure out the purpose of one line of code as simple as "int counter;"



Exception up = new Exception("Something is really wrong.");
throw up; //ha ha



When doing my A Level computing course we had a book, in the book the glossary contained two entries:
Endless Loop - See 'Loop, Endless'
Loop, Endless - See 'Endless Loop'



//Dear future me. Please forgive me.
//I can't even begin to express how sorry I am.

Wednesday, January 16, 2008

What if we had chosen a different project?

This is a long post...



STOP! Don't scroll down anymore.

Take a good look at this picture.

Look very close.

For those involved...

Does this picture looks even remotely familiar to you?

You know? Like a tiny memory at the back of your head...

There should be less than 10 people in this world that have seen that picture before. Haha.

Well anyway... let's reveal the answers...

...

...

...

I was recently introduced to this website called "Viwawa".

If you break it down, it is essentially a chatroom incorporating multiplayer games.

I went in and tour a few rounds. Customizing avatars (babies), gaming lobbies... Kinda like Gunbound if you know what I mean.

So then I introduce this site to Zhi Wei. And after playing for an hour, he had the same sentiments as me...

Yep...

We had this idea before some time ago...

I thought It'll be interesting if I still have any remnants to this project. Any "remains" that were still floating around.

So, I opened my large CD wallet, wiped off the dust, flipped through and found the disc I wanted - "All Singapore Poly Documentations".

In we go...Singapore Poly\Year 3\FYP\FYP Misc Docs\Gabble

Hey wait...

WTF is this!

"FYP Proposal.doc"
"Gabble Meeting 1.doc"
"FYPSchedule.mpp"
"Logo.jpg"

Does anyone even remember what kind of a file a "mpp" extension is anymore?!

I couldn't wait. What traces of history can I find in these files? The project that "died before it even got started"...

-------------------------------------------------------------------------------------------------

Here, I'll extract some paragraphs from the documents...

"Upon logging into the application, the user will enter a chat-room lobby. In this lobby, the users will be able to chat with other users that are logged on. From here, the user can host a variety of inbuilt games inside the application."

"To appeal to the target audience, we have decided to use cute and adorable graphics for our application."

"Upon completion of the game, the relevant scores will be uploaded into the database. Base on the player results, he can earn Gabs. We intend to include 4 games to accompany the initial launch of our product. "

"The Avatar is a character representation of the user in this virtual world. All users start with a basic default character (plain clothes). The character will have varied facial expressions and accessories to be placed on different parts of the body. The accessories will be purchased with Gabs (in-game currency)."

-------------------------------------------------------------------------------------------------

Wow... I still remembered when we were discussing this on the 5th floor staircase above Foodcourt 4. We had all sorts of crazy ideas.

Xuan Jie was so onto the networking parts. Then we were discussing what theme of avatar to use. I forgot if we eventually decided on animals or babies. I think Ben even wanted to incorporate Mahjong (!) into Gabble. And I believe we also thought about giving them special skills like those seen in Asian Gambling God movies. (BTW, these were all in Viwawa)

The artists wanted to have customizable avatars, emoticons... even download-able theme songs! The programmers wanted even more crazy stuffs. We were so ambitious at that time. ^_^

Well...

Anyway. We all knew what happened in the the end... right?

What if Edenii didn't approach us?
What if HR didn't exists at all? (Or suffered its eventual fate 1 year earlier)
What if during that first client meeting, Zhi Wei weren't mesmerize by Gerald... you know who.
I think our lecturer (was it Hubertus?) advised us to accept?
What if We didn't and continue on with Gabble?

So many unknowns...

Some predictions I'll make...

If we did Gabble, it would definitely have been born. But how good will it really be? Do we really have sufficient experience at that time? No prior experience of networking, no prior experience of database. Everything (as on the schedule) is "learn as you work". Possible?

Would we have did as well at FYP if we did Gabble?

Maybe we would have face delayed schedules, cut features, computer crashing, bugs bugs bugs, unable to get this and get that out in time. And totally screw up the whole thing.

Or perhaps we would master all the required skills and get all the features we planned out in time through our extreme perseverance and determination. And maybe it would eventually be the "Viwawa" today.

-------------------------------------------------------------------------------------------------

Regardless of it...

I don't regret doing HR.

I don't want to go through all the stuffs about who has learn this and that again. You can re-read through that in the FYP closing document if you're bored.

But I really enjoy the times spent on HR. Especially at the end, when you see people discussing the games we created in the forums. Actually logging onto the servers and playing the games with the public. And showcasing the games at WCG!

It's unlikely that we'll ever get to sit down to play HR together again. Sad~

Wednesday, August 16, 2006

Bluff - Multiplayer Version!

I thought the Multiplayer version would never see the daylight. But it did, and I am so glad. Thanks to gamefaqs "Game Design and Programming" forum, their positive comments helped greatly in motivating me to complete the Networking version.

-----------------------------------------------------------------------------------------------
" Great Presentation. Found the choice of using 1 and a half deck and the ability to call out any value wierd. Guess the local style here is a bit different. I lost bad, but I'll see if I could develop some strategies. " -Grandtrain

" That was a great game, if not a bit easy. My score is 8338 points and my time was 6 mins and 2 seconds (second try). Anyhow, nice job. I'm just getting into programming and would be happy if I could someday create a game half as entertaining as this. ITs a refreshing break from solitaire and hearts :) " -Kram88

" Nice looking game. A little different than the BS I am used to. " -Imperfect Freak

" Great game although a tiny part of the bottom of the screen is cut out for me (can only see top-half of the contact text on main menu). Other than that it's very well done. " -DBZManiax
------------------------------------------------------------------------------------------------

But "motivation" alone is useless when I don't even have the knowledge to do Multiplayer. I posted on the forum again, asking for help related to sending game data.

And gosh...They introduced so many things that I never know in the past. I thought all there is are sending strings but and forth, but god was I wrong. They gave a loads of suggestions like designing a "protocol" to read the data, going "all the way" and use XML or using advanced stuff like RMI (Which I never heard of before posting there).

There's this guy called Sabuat who's very helpful. Really appreciate that he took him time to explain to a newbie like me, and give suggestions like how to send "minimum data" and make the client and server in sync with each other.

Anyway, just very happy that I completed the Multiplayer version, although I didn't use all the "advanced methods" (Which wasn't really necessary since Bluff is a very small game). Hopefully I will get a chance to use them if I do a "big scale" game next time.

Tuesday, August 01, 2006

The Comedian Zone

This is my last project before I head for the army. Just to record down how this site is born...

Designing A Site Without Tables, Possible?
I first heard about designing web pages totally without tables during Year 2 of the Poly, but I have zero interest in it. What's the point? Yes, tables was not "meant" for alignment and presentation of web elements (Its original intend was soley to present table) but it was "abused" and gradually designing pages using tables became a "standard practice" for web developers. Further-more, web modules taught us to use tables as well, so there's no point to learn this new thing.

First exposure to CSS Positioning
It wasn't until like 2 months ago when I wanted to do some updates for this site and had to edit the source template. Total stun -_-...not a single table tag. Everything is using CSS Positioning. I tried to edit it because I wanted to add some new columns for the site but I realize I don't even know how to do that without the whole thing messing up, or text starting to overlap one another.

Later on, I went to the library and picked up some books on CSS Positioning, and that's when I come across "CSS Zen Garden" (www.csszengarden.com). It's a super pro site and you wouldn't believe it until you see it yourself. There were hundreds of different site designs, but they all used the SAME EXACT html page. Only the CSS file is different, and they can create such amazing and unique layouts. That's when I made up my mind to learn CSS-positioning.

Motivation to create a new site
Originally I create the byethost site because I try out the phpBB open source forum (introduce to me by my intern mate Nizam). Was successful and later on, I used that site as a practice site for me to learn CSS Positioning. Basically at the start I was taking S.H.E avatar and layering them one upon another. Haha. Doing only very basic stuff without learning much.

The idea came when I visited gamefaqs one day and saw this massive thread (300+ posts) containing lots and lots of jokes. So, ????, why not just take this chance to design a new site completely from scratch. I can apply and see how much I've learnt about CSS Positioning and also revise my PHP.

Re-learning Server Side Programming
Making this site made me discover something - IWED has taught me nuts about PHP. When I was doing that module, everything was just made through the Dreamweaver interface. It's not that Dreamweaver is a bad thing but you just can't learn much with it doing everything for you. I also realized what Dreamweaver can do is extremely limited. In the end I have to dig in the PHP code myself to get the results I want, and I realized I can't even do simple things like combining strings.

The Comedian Zone Birth
So basically, in order to not let those wonderful jokes fade out of existance with the passing of time, I have store and uploaded them into the database~Very good experience and I finally realize how cool CSS Positioning is. I dont' think I will ever want to go back to tables after making this site. Using CSS simply gives more control, is much more neater than chunk of table codes, and is faster as well. The only problem is that it is not supported by IE6. (Blame on Microsoft because Netscape, Opera and Firefox have incuded support for CSS2 long ago)

Friday, July 28, 2006

Last few things I want to learn......

Only a little more than a month till I step into the Army, so I'm going to use this next 2 weeks or so to finish up what I wanted to learn. Went to the library just now to pick up a few books (probably the last time to borrow) to progress on TCZ site I'm working on.

Been spending the whole last week doing this, which is basically a revision of server side web and my first attempt in doing a full site completely designed using css. Going very well so far and hope I can finished it up soon.

Very happy with myself cause I went running for a total of 5 times already so far. (Every single day from Monday to Friday) I think I've started out in late May running like 3 times a week. Now, I make it a point to run at least 5 times a week (unless it's raining)

Also did a breakthrough today! I ran for 9 rounds! Since last week I've make it a point to try to run for 8 rounds instead of the normal 6. Now I can take 8 rounds pretty well without "dying" at the end of the run. Also managed to did 6 pull-ups on 1 occassion! (Last time "die die" only can reach 4)

I'm going to try something drastic next week...I know things like 10km march is a common thing in the army (and 8 rounds is only 3.2km). Think I'll try running for 18 rounds one of these days and take it very slowly first. Maybe even 1 song 1 round. (So I can listen to the whole forever album every morning)

Tuesday, June 20, 2006

Making another game....

Was thinking back about Bluff and thinking why the Multiplayer aspect failed. I think for Bluff, I was too ambitious right from the start. I wanted to finished all the gameplay aspects first, then worry about the Networking (When I don't have any previous experience in Networking).

In the end, the gameplay aspect of Bluff grew to become so huge that it became impossible for me to keep track of everything that is going at once. Like the saying, "Kill the monster while it's small". Here, I think it's "do the networking part when the program is simple". The gameplay aspects basically exploded with codes flying everywhere and by then it's just too difficult to throw in Networking portion. (Without crashing everything)

Of course a major reason is because I don't have much experience with Java Networking, and yet with Bluff I tried to have 4 PEOPLE send very complicated data to each other, with timer running the background and all sort of complicated actions one could take.

I remember Michael Spicer always said, "Build a toy one first". So this time, I'm going to do a much more basic game. First, I'll worry about how to connect 2 computers together, and actualy make them able to send some meaningful data to each other (like view the same exact screen that will update) first, and then I'll add in the gameplay codes for the game.

This upcoming game is basically a self-learning project about Java-Networking...with just 2 players. My goal is to have the basic foundation up by the end of this week. Say, 2 computers, being able to send very simple game information (like the position of a graphic) to each other. Hope I can succeed~!

Saturday, June 17, 2006

"The Bluff Game" is GOLD!

Wee, after nearly 3 months since the start of the development, (with about 2 months break in between. Haha) Bluff is FINALLY done! And it was very different from what was originally intended! Let's recount the development story of this great game~! (There's too many screenshots if I want to post every change in every version of Bluff, so I'll just post the important screens)

The idea of creating Bluff started right after my internship (and I began working on it right away). After working on it for about 3 days, I came up with the basic skeleton and layout~

You're looking at Bluff Development Version 0.3! Haha...very sucky. I designed all the cards myself.
:P

Shortly after, Zhi Wei approached me and ask If I wanted to do a game! Haha. So "coincidence". I told him I just recently started working on this game and he offered to help me do the graphics!

And thus the real story of Bluff begins. The coding of the card displays is the biggest headache at this stage, but I quickly got it out of the way.

Development Version 0.6
Look at the brand new graphics! So nice! we also did quite a lot of changes to the card graphics (upon my request) because I think the number is too small to be seen.

Basically every card has an animal to represents. We also once thought of the idea to call "Jacky calls 5 elephants"...very scary thought -_-

Development Version 0.7
Aesthetics, and more aesthetics changes. Bluff first ever Main Menu screen is born~!

The in game doesn't have much changes, but there is now a beautiful artistic background image. At this stage we really intended to make the Multiplayer. Don't ask me about that Trademark......Gabble -_- The memories...

The development came to a complete halt after upon reaching here.

The last version was 0.9. I tried coding the the Networking portion for like a week but only manage to make them send text to each other -_-...I search on the net and went to the libraries to do research...but still no progress. With no progress, I first thought to stop development for about 2 weeks first, but in the end we stopped for nearly 2 months! Haha! At first I thought, that's it. Bluff will never be released.

But...until one night. For some reason, I ask the "very free" Zhi Wei to help draw S.H.E Avatar pictures, to place in my MSN area. 9th June an idea struck me. And I did something... unimaginable! I cut the "head" of the avatar he sent me and place it as the AI computer! Haha! It was originally just for fun, but one idea quickly gave rise to another.

The "Bluff Beta" versions are borned~I started working on these almost immediately

Can I say rapid and more rapid progress? (I stayed at home and "chiong" through on all these days. (11th June to 16 June)

Beta 0.1 quickly shot up to Beta 0.8 in within a few days time.


For example, Selina will show an angry face if you catch her. Ella will give you a wink when she catch you successfully. We added "text speeches" for the AI player, improved the announcement, add the ability to organize, fixed up bugs and more bugs and more bugs......-_-

Also, I GREATLY improved the Artificial Intelligence. They went from complete idiots to aggressive "attackers" that will do anything to stop you from reaching 0 cards. Average game time per round went from 5 min to 15 mins as the AI became much better.

Bluff Beta 0.9
We're at the final stages! Basically adding avatars for the characters to choose, add Winning Screen, Score System, ability to print screenshot and send it to your friends to show off! Little touchups everywhere, including changing the Main Menu buttons! The final beta version was 0.95 where we dig out the last bits of bugs and release Bluff, on 16th June around 11pm!

Weee! I am soooo happy! This is the FIRST game whichI am not "obliged" to make - meaning it's not because of some assignments or some work I have to hand in. I did this because I WANTED to do it. I did it during my own free time, and I learnt a lot from making this game. Of course having S.H.E in it just makes it better :P

Thanks to Zhi Wei for working so hard with me during these short 1 month (in total) development time of Bluff! (I said I wanted to get release it before he gets enlist on 19th June, and I fufilled my promise!) We met the deadline and complete the game in time~ 3 Cheers!

Friday, June 02, 2006

I am a blog newbie......

I just realized about 2 days ago that you don't have to adhere to the "default" templates provided by this site...and you customize it a bit. Well I look through the code and tried to add some little more stuff... (Visited quite a number of other blogs)

Wow...the code left me in a bit of shock. Yes, "web presentation" without the use of tables if nothing new, but this is the first time I've actually seen it in action. I mean, I consider myself proficient in HTML, but to design a page without the use of tables. I never knew how to do that.

Peeking through the code was really interesting (that's what I spent most of today doing haha). This sparks my interst to learn CSS Positioning...die...so many things to learn......One at a time I guess...I still have quiet a lot of time left.

Also wondered how other people blog can have so many features...especially that Adeline -_-... still can track the exact visitor and what they do... like Spyware man...Can check who read your blog, what's his IP, how long he read for, what time...etc...Nothing to say.

So, being the "free man" that I am, I went around the web to hunt for some web add-ons...gosh there were tons of them...Guestbooks, horoscopes, comic stripes, you name it, you got it. Anyway I just pick 3 that I feel is necessary - A Poll Generator, A Chat Box and A Simple Stat Tracker. I don't like to have too many things clutter around all over the place. Same in real life, same on the net. Simple and clean and easy to read is good enough.

So basically I spent the rest of the day putting codes from the add-ons in, and messing around with the CSS positioning code a bit.

Friday, May 19, 2006

The true feeling of originality...

Feel like I've been writing a lot more lately. Guess I have much more free time on my hand. Last time I write only like 4 - 5 times a month. Now, almost every other day. Haha.

Anyway, these few days I've spend on organizing and really "archiving" all the works that I've done at the Poly, mainly to those games programs. I really took the effort to remove all the images that I "kope" from the the Internet over the last 3 years into my game. Now that I think about it I really regreted it.

Yes, it's easy to just grab something and use it in your games, very convenient. But now, looking back at it I feel that it's not really "my" work. Some "urge" took over me and I decided to just completely revamped the graphics. I really did every single graphic this time. From the most basic textures, to stuffs like characters and backgrounds. Yes, they may look like "programmer art" (aka lousy art), and is in no where near the league of those images that I originally used. But I actually felt a great sense of satisfaction when I completed it. I'm so happy. It may not look as nice, but it really felt like my work. I also replaced all the audio with royalty free music. (too bad I don't have any talent in these area or I would really like to compose my own)

1) Baby Revenge - Basically I did away with the 10 stages of background, monsters and music. I draw my own "cute little baby" and "angry little monster", and use them 10 times for all the levels.

2) Space Invaders - Remove all the "graphic aliens" and of course the magnificient final boss dragon lord. I painted all the graphics from sketch myself. The "UFO guy", every single weapons, powerups and of course the final boss. I really enjoyed doing the final boss graphic. Great times...I also did a little tweak on the gameplay by making the boss move "incredibly fast" when he's dying...haha.

3) Escape From The Moon - Again, the walls, the moons, the ground. Every graphic and texture I redid myself. A little side note though: I went to search up no the "Pixel Invalid" format error and found it's a common problem with ATI. They said it's an ATI driver issue. Anyway, this problem was finally fixed in Java3D 1.4. (Last time was using Java3D 1.31) I installed the new updated Java3D and the problem is solved! Now I can set accleration on as I run the game, and it runs MUCH smoother than before! (This is what I call technological progress!)

Well, that's about it. I've wasted quite some time but I feel that it's worth it. Next time I do something like these I will make sure I resist the temptation to simply grab something from the net. It's not only that it's violation of copyright stuffs, but also, you really feel more proud of your work when you know everything in it belongs to you.