Archive - Jun 28, 2007

Notes for June 28

in

One day, when I'm rich, I will send all the cows to Alaska.
Take that Wendy's, No frozen beef!

There are funny people in my family...
"I want it extra large, and the pizza person looks me like he is trying to say 'you sure? I don't think you can eat it all'. how stupid are people these days, Doesn't he know I won't be the only one eating it?"

I wish my friends are around so I can use "That's what she said!" and hi5 everyone...

Great thyme we had.
Yeah, time seems pass very fast.
No, I mean thyme, the plant.

I wish C++'s array is like PHP's

in

For 2 days, I have struggled to create the game of my dreams.

Above is the direct result of my frustration over C++'s array.

In C++, a array's size and the information it can contain must be defined at the creation.

int thisarray[100];

PHP, much easier, each key in the array can hold anything and can grow and shrink in size.

Sometimes, it's not easy to know how big the array should be. For example, in my game, there are loads of objects keep getting created and destroyed. They will be rendered on the screen by their z-index, the higher ones go into the front. Because the objects are keep getting created, I can not predict how many objects there will be. I could just set the array's size to the 10000, sure, it is enough for the game, but if there is only one object, this is going to take up the same memory space.

ahh. I'm a n00b. I wish I can have some C++ friends.

Honey Pot that kill bots