Monday, July 31, 2006

Inexplicable Productivity

Today I didn't have access to the computer for most of the day, and it turned out that I was rather productive.

Today I:

  • Finished up the problems for my online AIME class (just in time too - I have class tomorrow)
  • Did a good portion of my AP summer work (finished Edith Hamilton's Mythology and got through a good portion of Vonnegut's Cat's Cradle)
  • Ordered my AP Bio and AP Euro books (I have procrastinated for two months on this)
  • Swam and stretched (me poor neck)
Could it be that I can accomplish this much when I'm not wasting away at the computer?

Let me finish this post off with a sample of an AIM conversation:


Yes, I'm not normal.

Sunday, July 30, 2006

Quote of the Week

The quote of the week is:

"Light travels faster than sound. This is why some people appear bright until you hear them speak."
- Anonymous

New Glasses =)

I got new glasses today! Now not only I can see things beyond two feet (my old glasses were two years old >.< ), but now my glasses are fairly inconspicuous. They're like, invisible. Invisi-lenses! o.O

Thursday, July 27, 2006

Yay for Google Ads!

I don't know what was happening, but for the past hour I've been unable to see any Google ads, at all. As a result, all websites took forever to load, and some didn't even load at all. Fortunately, looks like the Google ad server is back up! And I still don't know what happened...

Wednesday, July 26, 2006


This is my friend Solomon's guitar, which I've been playing for the last three hours. Sol's been teaching me how to play =)

Little Fighter 2.5 Released!!

Gah... forgot to post this yesterday...

Little Fighter 2.5 has been released!!! See this topic for details.

Monday, July 24, 2006

Hey, it Works!

The Problem: Creating a geometric mean function for PHP.

First Attempt: Just doing something along the lines of (p1 * p2 * ... * pn) ^ (1/n) . However, even PHP has its limits, and for high n's (we're talking along the lines of hundreds or even thousands), it would just die on us. We needed a better way!

The Solution: Logarithms, yes, logarithms. With basic identities, we find that (p1 * p2 * ... * pn) ^ (1/n) = 10 ^ (1/n * log p1 + log p2 + ... + log pn) ! Now instead of multiplying huge numbers, we're just adding them!

By the way, here's the full function - feel free to it in your own PHP experiments (courtesy myself and Mgccl):

function func_math_mean()
$elo = func_get_args();
$num = 0;
foreach ($elo as $value) {
if ($value == 0){
$value = 1;
$num = $num + log10($value);
$count = func_num_args();
$num = pow(10,$num / $count);
return $num;

Saturday, July 22, 2006

LF2, Ladders, and Logarithms

(Don't worry about LF2.5 - I'm still working on it ... and I'll release it in three days!!)

I've decided to help Mgccl, a fellow LF2 modder, build an online ladder system for LF2.

The ladder should have the following features:

  • Track and store the results of all ranked games. (No idea how we'll do this - for now we'll do it on an honor system, where players submit their game results.)
  • Keep track of each players' wins, ties, and draws.
  • Calculate each player's rating, using a variant of the ELO system.
  • Support clans and countries, and rank them as well as ranking individual users.
  • Support all possible team combinations, from 1-vs-1 to 2-vs-5 to 4-vs-4.
  • Track which character each player uses, and rank them on each player (i.e. best Davis players, best Julian players, etc.)
Today, the first thing we did was come up with a database. Here's what we have right now (courtesy of myself and Mgccl):

country_id , country_name , country_flag , country_wins , country_total_elo, country_total_exp

clan_id , clan_name , clan_leader , clan_wins , clan_losses , clan_draws , clan_ranking, clan_total_elo, clan_total_exp, clan_members

stat_id, stat_elo, stat_exp, stat_rank, stat_win, stat_lose, stat_draw

user_id, clan_id, country_id

team_id, user_id

game_id , team1_id , team1_winrounds, team2_winrounds

Mgccl also singlehandedly coded the ELO script (this guy's amazing at PHP!) Now we are missing one crucial feature - ranking for team games. Since I'm good at math, it falls to me to solve the following problems:
  1. I must find a way to average the team members' ratings to create a team rating. A simple arithmetic mean won't work - a team with one member rated 1500 and one member rated 1000 does not have a 1250 rating!

  2. Figuring out 1) will let us play 2-vs-2, 3-vs-3, and 4-vs-4 games, but what if we want to play a game with unequal teams? I must calculate how to adjust the temporary team ratings, to account for the fact that teams with more players have a much better chance of winning.

  3. Once I find 1) and 2), I am able to use Mgccl's ELO algorithm to find how to adjust each team's rating, but wait! Teams aren't rated - only players are! I must figure out how to apply the rating adjustment to the team members. As far as I see, the answer to this is to simply take the team adjustment and adjust each team member's rating by it, but I'll have to do some more research on this.

Some data to help me: The ELO system is designed so that if two players (or teams) have a rating difference of 200, then the stronger team should have a 75% chance of winning. I think that if I take a few logarithms, I should be able to figure out the answer to 1) and maybe 2) from that statement.

Whew. Long, very long, incredibly long, post. Goes Online!!

Tough day today - we uploaded the new PrestoSoft site. Check it out!!

All those FTP errors... ahhhh!! Transferring 18MB of files to a remote server is never easy...

Friday, July 21, 2006

Quote of the Week

The quote of the week is:

"It's funny the way most people love the dead. Once you're dead, you're made for life!"
- Jimi Hendrix

World Survey

A world survey was conducted by the UN. The only question asked was: "Would you please give your honest opinion about solutions to the food shortage in the rest of the world?" The survey was a huge failure...

  • In Africa they didn't know what "food" meant.
  • In Eastern Europe they didn't know what "honest" meant
  • In Western Europe they didn't know what "shortage" meant.
  • In China they didn't know what "opinion" meant.
  • In the Middle East they didn't know what "solution" meant.
  • In South America they didn't know what "please" meant, and
  • In the USA they didn't know what "the rest of the world" meant.
How true...

Thursday, July 20, 2006

Physical Therapy - Day One

Had physical therapy today.

Doctor says the cause of my neck pain could be:

  • Poor posture (possible)
  • Sitting at the computer all day >.<
  • A growth spurt (could be)
  • Carrying a heavy backpack (uhhh it's the summer ... and i don't have summer school ... hence, no backpacks)
  • All of the above
Possible ways to fix my neck are:
  • Fixing my posture
  • Stretching
  • Massage
  • Applying heat and ice (uhh i think i'll stick to the first three ^_^)
  • All of the above

Wednesday, July 19, 2006

LF2.5: Volt

Today I added a new character: Volt. He replaces my old electric char (Electro).

Here's some screenshots I took (JackieRabbit - the creator of Volt - put the second one on his site =) ) :

Don't know why I took the third one ^_^

Tuesday, July 18, 2006

LF2.5: It's Very Near the End!

Title says it all!

Tomorrow I'll give you some screenshots. I promise. =)

Saturday, July 15, 2006


I showed the PrestoSoft team my website design, and they liked it for the most part. However, they forced me to make some changes: use less blue, make the default font bigger, and other things. In my opinion, the site now looks a lot worse, but you can judge for yourself.

The old site

The new site

Thursday, July 13, 2006

Too Close For Comfort

A friend of mine was in Haifa just hours before it was bombed. Now that's scary.

Wednesday, July 12, 2006

Syd Barrett dies at age 60

A few days ago, Syd Barrett, a founding member of Pink Floyd, and the writer of such classic songs as Arnold Layne and See Emily Play, died from a "complication with diabetes".

For more information, see this WikiNews article.


Tuesday, July 11, 2006

LF2.5: Racing Towards a Release

I am almost done with LF2.5. Over the past few days I have skinned, hacked, and modified every aspect of the game.

However, I still have a few things on my agenda:

- Figure out which extra (non LF2/CE) characters to add. There are currently 20 open slots and I want to fill them with the best characters possible.
- Work a little on backgrounds and items.
- Edit the stages. I'm working on making two stages of my own: a 1-vs-1 Mortal Kombat style stage, and a medieval stage with knights and dragons.
- Skin it up a little more. Some aspects of the game do not look so good.
- Rewrite the readme. I want to be especially careful to give credits to everyone who contributed characters/items/backgrounds/skins/support.
- Test, test, test.

Basically, I want the game to be perfect. And now, ladies and gentlemen, I am giving a release date!! I don't want to rush, but I don't want this to take up my whole summer either, so the date I am giving is JULY 25. Mark your calendars! =)

And lemme post some pics of how the game's going:

The new skin (courtesy of LF2 NS)

Stickman's hair (courtesy of his buddy Electro)

Uhhhh what?

Monday, July 10, 2006

Sunday, July 09, 2006

phpBB Problem and Solution

The PrestoSoft forum was down today, and displayed this error message:

phpBB : Critical Error

Error creating new session


SQL Error : 1016 Can't open file: 'phpbb_sessions.MYI'. (errno: 145)

After doing a bit of googling, I found this page, which gives a simple solution: run the SQL script REPAIR TABLE phpbb_sessions. You can also try this for any other SQL table that doesn't work properly - chances are, it has a small error that can be fixed by REPAIRing it.

And Italy Has Won the World Cup!!

Saturday, July 08, 2006

See H1 Run, Run H1 Run

Today my programmer friend and I had the task of replacing all the headings (which used a custom style) with customized H1s and H2s, on the PrestoSoft site. Now, HNs (as they're officially called) are tricky little beasts - they always screw up the table cell they're in. Nothing seems to fix this, neither valign nor margin nor spacing. We were trying different things for perhaps an hour, until we found a very simple solution on the macromedia.dreamweaver newsgroup: Add the following to your stylesheet:

padding: 0 0 0 0;

Turns out the problem was with padding all along! Who'd've guessed?

And if you ask, "What's the point of using H1s and H2s anyway, when you can make your own styles?", it is believed that Google's algorithm (no one knows for sure - it's Google's secret), as well as those of other search engines, places a higher priority on text inside H1,H2,...,H6 tags. It's kinda weird, but that's (supposedly) how Google thinks it's get the most relevant content. Personally, I think that it's useless, and makes life harder for us web designers...

What is this world coming to?? - Part 1 of 3,843.5

Yesterday I watched a documentary called The Dark Side. I strongly urge all of my readers to check it out.

It's amazing what our country is turning into, isn't it?

Thursday, July 06, 2006

Bullets -> Lists

Exhibit A:

The quick brown fox jumps over the lazy dog.

multiline text multiline text multiline text multiline text multiline text multiline text multiline text multiline text multiline text multiline text

Exhibit B:
  • The quick brown fox jumps over the lazy dog.

  • multiline text multiline text multiline text multiline text multiline text multiline text multiline text multiline text multiline text multiline text

What's different about these? The first uses bullets, while the second is an unordered list.

Sometimes in web design you get a site almost done when suddenly you realize that one aspect of the site is wrong (in this case, bullets, which do not offer some of the features of lists). I spent a significant amount of time today going over the PrestoSoft site, replace all instances of A with B.

Yet Another LF2.5 Post

Marshall, the developer of LF2 CE, has notified me that he will be encrypting the much-anticipated next version of CE, so that the source code cannot be copied. Guess that all that waiting was for nothing.

One problem that has to be addressed is how my mod will be different from LF2 CE. Well,

* My mod includes all LF2 characters that do not have CE equivalents, so that it's possible to play Stage, Battle, etc. I'm not sure if this feature is available in CE.
* LF2.5 will have several (5+ is my goal) characters that are neither from LF2 nor CE.
* Guns. 'Nuff said.

But seriously, my game is becoming a little too similar to CE. So, I think it's probably a good thing that I won't be able to use the final version of CE in LF 2.5 - this gives me room to be creative (the non-encrypted version of CE only has about 10 characters).

At the moment I'm trying to find some fun and unique characters. You can help! Simply follow this link, find the character download section, try out some characters, and tell me what you like - if I accept your character(s) of choice you'll be listed in the credits!

Quote of the Week

The quote of the week is:

"The only way to make your PC go faster is to throw it out a window."
- Robert Paul

Wednesday, July 05, 2006

Happy Fourth of July?

Let's just say that my Fourth of July was not the best I've ever had.

The day got off to a not-so-good start when it turned out that the Hamachi client that I installed on my dad's computer to try out Network Games in LF2.5 had opened the door to a score of viruses. The computer got so screwed up that we had to restore it from a backup. Fortunately, our weekly backups take place on Monday evenings, so we didn't lose anything. In retrospect, we were incredibly lucky - we didn't lose any data at all. However, we still have a lot of work ahead of us, in restoring all the files - the backup wasn't complete, so we have to carefully copy files from the old hard drive to the new one.

That's the last time I use Hamachi.

After this uhh ... incident ... I had a doctor's appointment, due to some neck pain I've been having. Doctor says: physical therapy for eight weeks, and twelve Advils a day. Doctor, isn't this taking it a little too seriously?? It's just a little neck pain, and you're prescribing twice the recommended daily dose of Ibuprofen. Side effects here I come...

Afterwards, there was a party, where my friends and I entertained ourselves by making homemade videos on my cellphone. I'd post them here, but messaging is not included in my plan, and I imagine emailing a video to myself would be rather costly.

So yeah, that was my Fourth of July.

Monday, July 03, 2006

LF2.5: Networking Issues

I didn't work on LF2.5 too much today, but what I did work on is Network Games.

There were two problems:

1. Connection issues, usually caused by private domains. To fix this, one must get a public IP address (using Hamachi will give you a public address)

2. Synchronization issues, which were very common. I couldn't find any fix other than to reinstall the game (which only takes about a minute, so it's not much of a problem).

In addition, Bob has playtested the game (partly by playing network games with me), and I'm working to use his comments. Most importantly, I like his idea of taking out the duplicate LF2 characters entirely and replacing them with CE characters, since CE characters retain all the abilities of LF2 characters.

Down to 82 objects now, after removing the last of the LF3 characters (guess LF3 wasn't such a great mod after all), and following Bob's suggestion, I think I won't be pressed for space any time soon! =)

Sunday, July 02, 2006

LF2.5 Day Seven - The Boring Stuff

Now that I have just about everything done with LF2.5, I only need to do a few more things:

1. Add the rest of LF2 CE (still waiting for Marshall to finish this one).
2. Perhaps a few more characters and backgrounds.
3. Rewrite the readme.
4. Playtesting, playtesting, playtesting!
5. Fix all the bugs discovered by #4.

Today I worked on #3, #4, and yes, even a little of #5.

Still waiting for Marshall...

Three 2's

Here's a fun little problem:

Show how you can get any positive integer, using only three 2's and any mathematical operations.

For example, 2+2/2=3 generates 3, but we need to find a solution that can generate any integer.

Pretty ingenious, no? ;)
BTW, I couldn't get this problem either - my math teacher showed me the answer.

Math is hard...

I never thought I'd say this, but math is hard.

For my AIME class, I have to do 10-15 problems every week. Last week's batch was easy, buit this week ... ugh.

And that's just the first problem... o.0

Maybe the problems are hard, or maybe I'm just bad at these, I don't know. What I do know is that after nearly a week, I've only solved four of this weeks problems, out of 11. Good thing there's no class this Tuesday (4th of July), so at least I get an extra week!

Saturday, July 01, 2006

LF 2.5 Modding: Days 3-5

On Day 3, I ran into my first obstacle: LF2 only supports 100 objects (data files), and I had gone over. I then spent the next few days optimizing the game: removing all unnecessary characters and objects. I am now down to 92 objects, a safe number. To get there I had to remove several characters: I took out almost all the LF3 characters, leaving only LF3 Firen and LF3 Freeze. The reason for this is that the rest of the characters were just graphical changes, without actually changing the code.

When I first made LF 2.5 a year ago, I meant it to be a combination of LF2 and LF3 (a popular mod at the time). However, I have now realized that it is downright stupid to just restrict myself to this, and now I have a new goal in mind - to make this game as fun as I possibly can! If I have to remove some (or maybe even all, in the end) LF3 characters, then so be it.

However, I still managed to get some work done. I have added a new character, Electro, made by Marshall, the same guy who compiled LF2 CE. He works fine, but the only problem is that he takes up a whopping seven data files! In the end, I may have to remove him because of this. I don't want to, but I may have no choice.

In the above screenshot, Electro shows off his Julian-esque D^J combo.

I also added a little known mod called Gun-LF2. I know what you're thinking - Little Fighter with guns???? However, I can assure you that the game is still well balanced. In addition, now there's several ways to kill an enemy: 1) With your fists and close-range weapons, 2) Using your combos, 3) Shooting him to death, or 4) Using an explosive crate. Although there were explosive crates earlier, there are many more ways to use them now - for example, you can throw an explosive crate at your enemy, then pick up a shotgun, shoot the crate, and watch it go nuclear! ^_^ Hopefully, this wide array of ways to dispatch an enemy will make LF 2.5 more fun!

Finally, I added a new map, Bunker, which looks especially nice with guns - see the above screenshot.

One more thing I have to add: ENGLAND LOST????? >.<