Sunday, December 13, 2009

Doing with wordpress


"WordPress is an open source blog publishing application powered by PHP and MySQL" - wikipedia definition

What is the first thing that came to your mind when people talked about wordpress? Blogs ? Online shopping? However , few knew the true nature of wordpress. It is actually a Content Management System that allow one to create a blogsite with just a few clicks and a sever. Wordpress was first released in May 2003 by Matt Mullenweg. Currently, it is being used widely with a estimate usage for 202 million websites. It was born out of a desire for an elegant, well- architectured personal publishing system built on PHP and MYSQL and licensed under the GPL. Wordpress is an open source project. This meant that hundreds of people everywhere are working on it. More importantly, the usage of wordpress is free . No one has to pay anyone a license fees. Wordpress has also another service call wordpress.com which lets user to get started with a new and free wordpress-based blogs without the hassle of having a webhost or other technical hassle. However, it is less flexible than the the WordPress. Wordpress started with just a blogging system but it has evolved to be used as full content management system. Thousands of plugins, widgets and themes are developed by the community to help enhance Wordpress

Comparing Wordpress with other CMS such as Joomla. I am really impressed with its user friendliness. Wordpress forum volunteers were also another attraction to web developer. Personally , I have experience the usefulness of having an active forum . With more experts skills helping to troubleshoot issues, problems are solved effectively and efficiently. What i like about most about wordpress is the theme feature. It allows me to choose from within and able to download theme easily from its official theme websites.


This is the administrator page


Examples of websites developed using Wordpress





Sunday, December 6, 2009

Game password. An example of encryption process of a password with embedded information.

0. Introduction:

Have you ever played a game which provides you with an option to enter a password to unlock certain features in the game (rare items, special characters, etc.), or to continue from where you fall? Have you ever played a game in which you have to push a crazy sequence of buttons to unlock a certain cutscene or event in the game? Let us call them “game password”.

1. Types of game password:

There are several types of game passwords. My limited knowledge about games only allows me to know 3 types of game passwords.

We can find the first type: button/keyboard sequences in Hayate no Gotoku! Ojō-sama Produce Daisakusen Bokuiro ni Somare! (NDS) (After completing the second game, to unlock voices in Omake Mode, use this code: ), Dyna Blaster (PC) (type HUDSONSOFT at main menu for God mode), Harry Potter and the Sorcerer’s Stone (PC) (type harrydebugmodeon to turn on debug mode; visit here for the full list of commands). Games whose passwords fall into the first type do not have an explicit option for the player to enter the code, and normal player usually has to obtain the information from a game guide or even from a third party.

The second type is type is “plain” password. As its name suggested, the password is just a string assigned to a certain event in the game and it itself holds no deep meaning. Examples of this type are Chips Challenge (PC) (if the input from the player matches any of the password in this password list, the player is taken to the corresponding level) and Pokémon series from 3rd generation onward (player has to type in a specific combination of words in the supermarket questionnaire to unlock Mystery Gift in the main menu). In this type, there is usually an option for the player to enter the code and the password is usually obtainable during gameplay.

The third type of password is password with embedded information. The game reads the information encrypted in the password and triggers event according to the instruction in the password. Examples of this type are Pokémon Emerald (GBA) (type in a string of characters to the sick girl’s father in Rustboro City to get special box wallpaper; this is the tool to generate the string of characters) and Pokémon Mystery Dungeon series (to play a mission that has the same settings as your friend’s, ask your friend for the Wonder Mail password of the mission and enter it in the main menu). This type of password is only implemented in the case it requires multiple conditions for certain event(s)/effect(s) to happen. Since there are several different data fields in the password, the number of possible combinations is too immense to list out. Therefore, there are usually third parties who reverse-engineer the encryption process and create programs or scripts to generate the password based on the input from the user.

In the second half of this blog post, we will focus on the type of password with embedded information. What we can learn by looking at the process of generating a password with embedded information is much more than some simple comparisons between user input and a fixed list of triggers – events/effects.

2. Characteristics of game password with embedded information

A game password with embedded information should have the 2 characteristics below:

- Crypticness: It should be impossible, or at least very hard, to discern the position and extract the actual information embedded in the password by working on a large number of samples with pen and paper. Generally, there is no point in having an easy to crack password system.

- Brevity: A password with embedded information is usually as short as it can be. The longer the password, the higher the chance of mistyping it. Furthermore, typing a long password in a console with + pad and button A (the “confirm” button) is a real pain for the player.

Game password with embedded information is usually long enough to discourage any attempt to brute force. Therefore, brevity will not compromise the crypticness of the password.

Aside from the 2 standard characteristics, a good password system should have the following characteristics:

- Validation: A good password system should have a validation process to make it difficult to modify the password by just comparing 2 passwords and applying the changes. This validation process can be the checksum or simply a fixed value somewhere in the bit string.

- Non-ambiguous and typable character set: Ambiguous character set will give players hard time to recognize the character, which increases the risk of miscommunication. For example, O and 0, 2 and Z, 5 and S, 1 and ! are the pairs of characters that are easily mistaken for each other. A typable character set will make password sharing a lot easier since the player don’t have to try to type out something with Character Map.

- Limited acceptance: This is the last wall to guard certain features in the game. The game should impose a limit on what kind of password to accept and what not in order to prevent the misuse of password in the case the password creation process is cracked. Unlocking certain rare items or characters with password is technically a legitimate method of acquisition, so players tend to abuse the system once a password creation tool is made.

3. An example of password creating process:

In this section, I will use the Wonder Mail password system in Pokémon Mystery Dungeon (PMD) series to demonstrate the process of generating the password and how each step contributes to the characteristics of a good password. For an in-depth analysis of the password system in the first generation of the series, visit this page.

Before we start, on side note, each in-game generated mission will have a corresponding Wonder Mail password. The intention of the game developer is that players can share Wonder Mail passwords of easy missions with good reward or challenge each other with seemingly impossible missions.

The idea behind Wonder Mail password is quite similar to that of a game save: they both store just enough information that can be used to make the player re-experience certain effect, and the information is stored in a fixed pattern.

Step 1: Take only what is necessary

The first step involves in picking out the necessary pieces of information, then minimizing the number of bits required to represent the information.

In the memory, the unit of storage is byte. If a piece of information is too big for one byte to handle, we will use multiple bytes (usually 2i bytes) to represent the information. For example, when the game developer decides that there will be 1400 (0x578) kinds of items, he will use 2 bytes to store that piece of information in the memory. By storing information in this way, we wasted 5 bits of memory since we actually only need a maximum of 11 bits to store the number (if we start to count from 0, the largest number we will encounter is 0x577 and its binary representation is 00000101 01110111). In this way, we can effectively reduce the length of the password.

[Note: While clamping down the number of bits makes efficient use of the memory, it requires extra calculations to change or extract the data because the computer reads the memory byte by byte, not bit by bit. Therefore, the game will be slowed down significantly if we just blindly apply the idea to minimize the necessary amount of memory. On the other hand, because password is usually designed to be entered from the main menu where CPU is not as intensively used as inside the game, putting more loads on the CPU will be less of a problem. In practice, we will simply assign 2i bytes to store a piece of data in which i is the smallest number that enables us to store that given piece of data. We only need to read the data directly without wasting more CPU resources to process it. To use memory resource efficiently, we can also allocate the same section of the memory for different events if the data involves is not necessary in the game save and those events cannot happen at the same time.]

Step 2: Fitting in the mold

The next step involves in putting the collected data together in an order and adding confusing elements to the bit string.

Constant bits (bits representing the same data for every mail can be 0 or 0xFF or any value) might be added to lengthen the final password to the desired length.

Step 3: Checksum

The next step is creating a checksum for the binary string.

There are various methods of creating the checksum. In the first generation of PMD series, the game uses a simple algorithm to create the checksum. That is cutting up the bit stream into bytes starting from the least significant bit (sequentially take 8 bits from right to left), then adding the byte to a variable called sum. After every addition, we will perform bitwise AND operation between sum and 0xFF (255) (which is equivalent to type casting the number to byte type).

For the latest NDS game of Pokémon Mystery Dungeon series (Sky version), the size of the checksum has increased to 32-bit. The algorithm of calculating the checksum is still unknown as of now.

Step 4: Encryption

From the 2nd generation of the game, encryption is introduced to completely thwart any attempt to decode by observation. The actual algorithm was made known probably by using a disassembler to see the encryption process in the memory.

The game uses a 256 bytes table to do the encryption. The checksum calculated in the previous step is used as offset for the starting position in the encryption table. Starting from the least significant byte of the bit string, and starting from the offset in the encryption table, we shall add the value in the string and encryption table together and then perform type casting to byte type to create an encrypted bit string.

In the latest version of the series (Sky version), depending on the checksum, during the encryption process, the pointer to the encryption table may be reset to the original offset, which further increases the crypticness of the code.

Step 5: Mapping to character

In this next step, we will map the bit string to an equivalent representation in character set. By mapping to character, we can hide the actual value and confuse code crackers. Why? For example, we usually think of “nothingness” when we see the symbol "0". However, we have made a dangerous assumption that the “0” we see is related to with mathematics. In fact, nothing prevents us from denoting the symbol "0" for another meaning.

The number of character in the character set should be large enough to create a good challenge for decoders, but should be small enough to reduce the number of characters needed to map to. The games in PMD series use 5-bit character set, which uses 32 characters to mask the actual binary string. 5-bit character set is quite a good choice. If the characters are chosen properly, the player doesn't have to distinguish between uppercase and lowercase of alphabetical characters and other possible ambiguities, and 32 characters creates a big enough of an obstacle to code crackers.

In the 1st generation of the PMD series, the game uses the character numbered 11 (0x0B) [male symbol] and 12 (0x0C) [female symbol] in the character set, which causes trouble for players because these character cannot be typed normally. This issue is fixed in the 2nd generation of the game.

- The character set of the 1st generation of PMD series (the position denotes the number the character represents):

? 6 7 N P R 8 9 F 0 + … S T X Y 4 5 M C H J - K 1 2 ! 3 Q W

- The character set of the 2nd generation of PMD series (the position denotes the number the character represents):

& 6 7 N P R 8 9 F 0 + # S T X Y 4 5 M C H J – K 1 2 = % 3 Q @ W

From the least significant bit, we shall sequentially extract 5 bits and map it to the corresponding character. We will put the character mapped from the less significant bit in the front and the character mapped from the more significant bit in the back.

Step 6: Scramble the code

The last step of the password creation process is to scramble the characters according to a given order. This will add extra work for decoders for encrypted password. However, scrambling the character of a password which has not gone through the encryption process, and with a fixed scrambling order, cannot prevent code cracker from finding out what piece of information a character holds. With enough samples and keen observation, one can easily deduct the areas of a code that changes whenever some value differs if the code is not encrypted.

Friday, December 4, 2009

Emotiv’s Epoc mind-control gaming headset--by Jiangkuo


Supposed “mind reading” video game controllers are as old as home consoles. Take the Atari Mindlink, an unreleased controller for the Atari 2600 originally slated for 1984. It promised the ability to completely eliminate the hardware between your gaming and your mind: just think of making Pac-Man gobble that power pellet and your puckish yellow avatar would zoom right towards it.

That sounds like an easy sale to gamers, and it would be, except making a cheap peripheral that can actually detect and translate human thoughts into control input is hard. In the Atari Mindlink’s case, it was completely incapable of doing what was advertised: instead, it measured facial tics and translated them into corresponding directions.

So will Emotiv’s supposed, brain-reading gaming headset, the Epoc, be any different? It originally got a lot of coverage last year as a concept, but now, Emotiv says that they are ready to push Epoc out the door just in time for Christmas on December 21st.

According to Emotiv, their Epoc headset should be able to support any game. While the specific Epoc SDK has been available for months, they are also including an application called EmoKey to allow users to map their keyboard to their brain. Epoc also claims that the headset could allow for non-traditional input with gaming: for example, if Silent Hill made you nervous, your on-screen avatar might get visibly scared.


A brain computer interface (BCI) is an external devices that communicate directly to the brain of humans or animals through neuron silicon interfaces. These external devices can either transmit or receive signals to and from the brain which can then be used to restore function or movement to sensory organs or limbs. Furthermore, these external devices can range from simple circuits to advanced silicon chips.


As of today, brain computer interface devices have been successful in restoring damaged sight, movement and hearing. The success of these devices stems from the fact that the brain is able to adapt to brain computer interfaces and treats implant-controlled prosthesis as natural limbs. With the new technologies, it is even possible to augment human capacity in the near future.

Types of Brain Computer Interface
Invasive Brain Computer Interfaces
Invasive Brain Computer Interface Devices are those implanted directly into the brain and has the highest quality signals. These devices are used to provide functionality to paralyzed people. Invasive BCIs can also be used to restore vision by connecting the brain with external cameras and to restore the use of limbs by using brain controlled robotic arms and legs.

The problem with this type of device though, is that scar tissue forms over the device as a reaction to the foreign matter. This reduces its efficiency and increases the risk to the patient.

Partially Invasive Brain Computer Interfaces
Partially Invasive BCIs, on the other hand, are implanted inside the skull but outside the brain. Although signal strength using this type of BCI device is a bit weaker, partially invasive BCIs has less risk of scar tissue formation.

Non Invasive Brain Computer Interfaces
Non invasive brain computer interface, although it has the least signal clarity when it comes to communicating with the brain (skull distorts signal), is also the safest. This type of device has been found to be successful in giving a patient the ability to move muscle implants and restore partial movement. One of the most popular devices under this category is the EEG or electroencephalography capable of providing a fine temporal resolution. It is easy to use, relatively cheap and portable.

Ethics and BCIs
Of course, the use of BCIs has sparked some debate among people especially since one of its future applications is the enhancement of human capabilities and mind control (brain pacemakers are now successful in treating depression). Nonetheless, this technology has not yet attained its full maturity and is therefore still relatively below the social radar. As of today, this technology is seen more to help much in fighting against disability through prosthetics and as a treatment for neurological ailments such as depression.

Windows 7 and speech recognition--by Jiangkuo

Jiangkuo has some problem using the blog, so I help him to post.

Having installed Windows 7, I was keen to see whether the speech recognition function had improved. I’m happy to report that the speech recognition function has indeed improved. In fact I’m writing this post using the speech recognition function and I have to say from my perspective its accuracy and ease of use are greatly improved.

It works fairly well with Internet Explorer but I’m afraid to say that speech recognition works not at all with Firefox, which is disappointing but I suppose hardly surprising. Voice recognition is probably a pretty complex thing!
What is noticeable is that the speech recognition seems to have improved enormously in its accuracy (of course having said that, it took me four or five goes to get “in its accuracy” right - oh the delicious irony). But apart from that I think the potential benefits of speech recognition are terrific. It does seem that the ambient noise problem of earlier versions seem to have been somewhat overcome and this version is picking up very well on vocal signals rather than background noise.

The odd bit of traffic noise in the background will still make my speech recognition system think I have said something but rather than insert a word it will simply ask the question, “what did you say?”. This is a much better solution than inserting gobbledigook.

But frankly, I never really had the time or patience to stick with speech recognition because even for this simple article I’ve probably spent about half an hour longer than I normally would have trying to correct all the mistakes that the speech recognition system has made. One suspects that speech recognition is a little bit like typing in that you really need to train and then keep practicing regularly to really see results in accuracy and ease of use.

I’ve always thought speech recognition would be useful if if you suffer from RSI or some other injury that left you unable to type. If you really needed to use it then you would have the patients to train and get it right. But for me, for now, speech recognition seems to take longer than typing. I suppose if you’re willing to invest the time and effort then you may find that speech recognition holds the promise of easy navigation and simple and accurate text manipulation/editing it has always promoted.

And one more thing before I go, speech recognition in Windows 7does seem to be on a par with other software packages such as Dragon Naturally Speaking, which as you probably know, come at a premium in terms of price.
http://www.youtube.com/watch?v=N3VZnyKViC4

GeForce PhysX-by Jiangkuo



Jiangkuo has problem using the blog so I help him to post.

Ever since a company called Ageia profiled itself into the 3D graphics market, a lot of buzz has been made about bringing physics computing into games. See, physics calculations allow for a more extreme and real visual experience. But where to start, and how to get support for it, and what exactly is it ?
When you blow up stuff, you can see loads of scattered particles instead of a big texture doing weird stuff, fluid dynamics and other pretty cool stuff. Ever considered how nice it would be to see a perfectly simulated waterfall? Or think of a girl walking around with her dress not static but dynamically moving along with her body. That's what Physics in games can do for you. But we'll get a little deeper into what Physics exactly does in a minute though. Though the idea from Ageia was a really interesting one as a pioneer it had disadvantages, unfortunately the cards were put into the market way too expensive and received way to little industry support. They tried, and tried really hard. Next to that their marketing to the press was way below average and all they seemed to do was focus on the industry end to get support, and in the end they failed pretty badly.
See, to get PhysX support on a wide scale, you need a broad userbase to receive industry acceptance and actually get the software developers need to spend money on implementing the cool new features so they will insert "PhysX" functionality into a game. Implementing such features takes up time, and thus has an effect on the overall budget of the programmers. With a limited userbase it was just not happening with a few exceptions here and there.
Late last year NVIDIA figured "okay enough is enough .. darn it". NVIDIA had invested heavily in this nice open standard called CUDA, and it should be relatively easy to move over and implement the PhysX API onto their CUDA ready GPUs. And that's where the advantage begins. So NVIDIA waved 30 million USD at Ageia, bought the company and hired their leading staff to get Ageia's PhysX API ported to CUDA which on its end can compute on the GPU.
From there on things got interesting. All new kinds of possibilities and ideas all of a sudden surfaced. More importantly, the best idea was this: any CUDA ready GeForce graphics cards, read: GeForce series 8 and newer, can now (starting from the 12th of August 2008) take advantage of PhysX without the need to install a dedicated PhysX card.
See, that GPU of yours can do PhysX in a multitude of options which we'll discuss today. So with a flick on your fingers, instantly (though slightly delayed) with the release of the new PhysX drivers in mid-August 2008, over 70 Million gamers now have the possibility to use PhysX on their machine.

How drivers work -done by Jiangkuo.


Jiangkuo has some problem with the use of the blog so I help him to post.
A device driver is a component that Windows uses to interact with a hardware device, such as a modem or network adapter. Rather than access the device directly, Windows loads device drivers and calls functions in the drivers to carry out actions on the device. Each device driver exports a set of functions; Windows calls these functions. The driver functions contain the device-specific code needed to carry out actions on the device. Drivers are signed by Microsoft after they pass a series of tests for functionality and reliability. For a driver to earn this certification, it must pass a series of tests administered by the Windows Hardware Quality Labs (WHQL). Due to stringent WHQL standards, using signed drivers typically results in a more stable system.
Microsoft digitally signs drivers that pass the WHQL tests and Windows Server 2003 performs signature detection for signed drivers for various device types, which include the following:
Keyboards
Hard disk controllers
Modems
Mouse devices
Multimedia devices
Network adapters
Printers SCSI adapters
Smart card readers
Video adapters

The above figure shows how device drivers operate in both kernel mode and user mode.
The Types of Device Drivers

There are many types of device drivers, some of which are specific to certain machines. For example, device drivers for laptop computers are proprietary and installed by the manufacturer upon being designed. A desktop is typically the exact opposite. If the hard drive on a laptop is reformatted or deleted for any reason, all the original drivers will remain intact. With a desktop computer, you are generally required to visit the websites of each individual manufacturer, download and reinstall the drivers along with another operating system.

When Good Drivers Go Bad

There may be instances when device drivers do not function as intended or have conflicts with other computers. You will find that manufacturers make improvements to device drivers similar to how software developers upgrade programs. In some cases, such upgrades can make older drivers obsolete. Likewise, an updated driver can heal a wide range of bugs and behavior problems endured by a particular device. For example, if your printer isn't functioning properly, fixing the issue is often as simple as checking the manufacturer's website and downloading the corresponding driver.

How Device Driver Updates Work

Device drivers download like any other program and typically act as self-installing files. Most of them download as exe. or executable files. In most cases, you simply need to click on the file and the installation program is launched. The program will usually scan the system first to ensure that the driver corresponds to the installed hardware component. A device driver can often be installed in a matter of seconds, but normally requires a system reboot in order to function properly with the corresponding hardware.

The easiest way to check the status of device drivers on a Windows operating system is to access the Device Manager utility. Simply right-click the "My Computer" icon, select "Properties," click on the "Hardware" tab, and then choose "Device Manager." Once you are in the Device Manager window, highlight the hardware device you want to investigate and right-click it. In the new window, select "Properties" and click on the "Driver" tab. From here, you can view the name of the driver, the version number, as well as perform the necessary updates.

A brief analyse of Online games industry

In order to create revenue, any games must be able to attract a large number of users. And make them spend money continously.
One difference between online games and single pc game is that, online game make privacy impossible. This is very important. For single pc game, even if the game is fantastic, if it is being cracked, privated copies are out, then the profit of the company is greatly reduced. However, for online game makers, as long as they are able to attract players their profit is promised. That is why there are more and more online game but less single pc game and even good single pc game will have online version sooner or later.
From the point of view of players, many of them prefer to play games with people especially friends, and on-line games make it possible for people far away from each other to play together. That is important as if a person play on his own it is only a matter of time before he get bored, but if he is playing with his friends they share the joy and pain, then it will be a longer time before he feel bored.
Another reason why on-line game is so popular is because a gamer can play the game repeatedly and will feel some form of freshness whenever they play with different people. Unlike normal single pc game,like the Harry Potter series, after I completed the whole game I do not want to play it again as I knew what will happen already. If on-line game can maintain such a freshness, then the on-line game provider only need to provide good servers, and they will get paid. From the gamers point of view, it is always better to buy a game which can play again and again rather than some single pc game that you do not feel like playing it the second time. In this way, the gamers feel like getting more from the on-line game than single pc game.
However, on-line game development is very competitive as everyone knows it can make money. It is very difficult for the small size firm to start the business, because if the players of a on-line game reach to a certain amount then the price of the game may greatly reduce due to the economy of scale, and with a stable amount of players, the company can have more time to improve the game quality either on graphics or gameplay experience. For gamers, if they are already in one game very unlikely they will switch to another game as they need to start all over again and will lose contact with their friend in the last game. In this sence, on-line gamers are very loyal customers. This is also the reason why the existing firm have a high advantage over the new players in the industry. That is also part of the reason why there are 8million people world wide playing World of Warcraft, and some on-line games have very few players and have to shut down.
In the future, I believe on-line game industry will still be very vibrant. First, the next generation broadband internet enables more sophiscated on-line games, there will be less delay in the transmission of data. Secondly, the video and audio of the games will be more vivid with the improvement in the hardware of the mainstream home PCs.

Feedbacks on Google Wave

Google wave has been in limited preview for quite a few days. Recently the Google Wave team has conducted an online survey to generate users’ feedback on this new ‘innovative’ software.

For the first three things that users like the most about Google wave, the wave concept, collaboration ability and extendibility topped the list. Many respondents say that the concept of a wave being a new online tool for real-time communication and collaboration really excites people, and no other existing software at the moment can serve the same need. The brilliant perspective that it will one day elaborate to become the most crucial tool used in communication and cooperated work is very inspiring.

For the three main issues with Google Wave question, inefficiency of the invitation scheme is reported to be the top concern. Because of this critical barrier, friends, relatives and colleagues are not invited to this community, who-most likely-are persons users are going to use this software to communicate to. This actually makes the invitation to these current users pointless. Another concern is that it is currently not integrating well enough with those existing communication tools. Also users are complaining that the software is running too slowly. The team is setting out their steps trying to minimize and eliminate all these defects. Hopefully they will manage to succeed later on.
Well, these are also how I feel about the Google wave at the moment…

Wednesday, December 2, 2009

New Pet for SOC Students :)

You know there's a pet that need not to be fed, trained, walked, bathed or groomed.........?
Sounds good right? This is especially suitable for us, the geeky computer students! Who are always busy in front of the computer screens.

Introducing you the.................

Pet Rock!


Cute or not......? haha!
This is not a joke! You can actually purchase Pet Rock online.
Well it was initially a joke. The creator was casually talking to his friend about how troublesome it is to take care of a pet. Later on he took the idea seriously thus the born of Pet Rock!
(*Small fact: he then made a million dollars out of this! $_$)





Best of all, the second generation is a USB Pet Rock. So we can keep the "pet" right next to us all the time! Suit us even better right :)


Can you start imagining these little rocks sitting obediently beside your laptop? :)

Check out the video below:



Other than that, with the purchase of the Pet Rock it comes with this little manual which teaches users how to "train" their Pet Rocks. Such as how to sit, roll over and attack. LOL.
Of course these will require help from the owner of Pet Rock. :)

Information & Pictures got from:
ThinkGeek - http://www.thinkgeek.com/geektoys/cubegoodies/c208/
Wikipedia - http://en.wikipedia.org/wiki/Pet_Rock

Tuesday, December 1, 2009

Recursion

Decided to discuss on this since I realized some of you didn't get it when I posted at the forum earlier on.
Anyway.. I think all of us should have learnt what is recursion about, right?

Recursion is a method of defining function in which the function being defined is applied within its own definition. It is more generally used when describing a process of repeating object in a self-similar way. It is usually solved by solving the smaller instances of itself.

A visual form of recursion would be called as the Droste Effect.

In the picture above.. the lady was holding a cup and a container which have the smaller version of herself holding the same objects on them, which then in turn contain the even smaller version of herself holding the same objects.... and so forth

Google showed us how is it being done in a humorous way.
Try google the word "recursion", it will return you "Did you mean recursion?" for endless times, no matter how many times you re-spell the word and click on to the suggested link.
Well, it has just perfectly demonstrated us how does a recursion that has no base cases work! :) (i.e. infinite calls)



have fun trying!


References/Images:
Wikipedia
Google

discovering lua

Well, as i was playing game after the exam, i found out that many of the add-ons in games are programmed in lua, and as programming students, i think i should write my own add-on, so as to make it more cater to my need and it is cool to do that. Therefore, I search the net and find out that lua is actually a very interesting programming language.
Lua is a lightweight, reflective, imperative and functionalprogramming language, designed as a scripting language with extensible semantics as a primary goal. The name comes from the Portuguese word lua meaning "moon". Lua has a relatively simple C API compared to other scripting languages.
Because both Lua and JavaScript use prototype-based objects and were influenced by Scheme, they feature many common semantics, despite the great differences in syntax. In its design, Lua is also similar to Icon, perhaps due to both of them being influenced by SNOBOL.

Lua is widely used in the video game industry. Apart from games, Lua has been used in many applications, both commercial and non-commercial.

for i=1,5 do  

print("i is now " .. i) //here ".." is a sign to connect two string it is like the "+" in Java

end


this is a sample of a loop in lua.and the result should be:
i is now 1

i is now 2

i is now 3

i is now 4

i is now 5

What i find about lua is that it is very familiar to Java and C syntax, most of the code I am able to understand.

Besides loop, lua also have other functions such as if-else statements, array, however, in lua, there is no "{ }" which we use in java.
The function of "{ }"is done by the reserved word "end".
if op == "+" then

r = a + b

elseif op == "-" then

r = a - b

elseif op == "*" then

r = a*b

elseif op == "/" then

r = a/b

else

error("invalid operation")

end
this is a sample of one if and many else statement. I notice that there is only one end at behind, which means a if only need one end even it has many else.
lua use table to save data .And array can be written in term of table.


myData = {}

myData[0] = “foo”

myData[1] = 42

-- Hash tables
myData[“bar”] = “baz”

-- Iterate through the
-- structure
for key, value in myData do
print(key .. “=“ .. value)
end

this is a sample of table. that real programmes are quite different from the simple programmes we do in class.A add-on of size 300KB is so long that make me feel dizzy. I will work harder and try to make my own add-on.




Sunday, November 29, 2009

how search engines work

It is the search engines that finally bring your website to the notice of the prospective customers. Hence it is better to know how these search engines actually work and how they present information to the customer initiating a search. There are basically two types of search engines. The first is by robots called crawlers or spiders. Search Engines use spiders to index websites. When you submit your website pages to a search engine by completing their required submission page, the search engine spider will index your entire site. A 'spider' is an automated program that is run by the search engine system. Spider visits a web site, read the content on the actual site, the site's Meta tags and also follow the links that the site connects. The spider then returns all that information back to a central depository, where the data is indexed. It will visit each link you have on your website and index those sites as well. Some spiders will only index a certain number of pages on your site, so don't create a site with 500 pages!The spider will periodically return to the sites to check for any information that has changed. The frequency with which this happens is determined by the moderators of the search engine.A spider is almost like a book where it contains the table of contents, the actual content and the links and references for all the websites it finds during its search, and it may index up to a million pages a day.Example: Excite, Lycos, AltaVista and Google.When you ask a search engine to locate information, it is actually searching through the index which it has created and not actually searching the Web. Different search engines produce different rankings because not every search engine uses the same algorithm to search through the indices. One of the things that a search engine algorithm scans for is the frequency and location of keywords on a web page, but it can also detect artificial keyword stuffing or spamdexing. Then the algorithms analyze the way that pages link to other pages in the Web. By checking how pages link to each other, an engine can both determine what a page is about, if the keywords of the linked pages are similar to the keywords on the original page.

Wednesday, November 25, 2009

on-line novel? how can that make money??


www.qidian.com is a Chinese on-line reading site under the Shanda Group which owns another two similiar novel website www.jjwxc.net and www.hongxiu.com. Shanda Group owns the copy right of novels which have a total of 40billion Chinese characters, the total daily update of the novels is 50 million Chinese charaters. Shanda Group has 36million registered users and 30% acctually come from foreign countries. Among these three websites, qidian.com is the most successful one, the daily click to the website is 400million times. Many of the book titles became the top search keyword in baidu.com or google.com.cn. The novels are in a wide range , from science fiction to magical fiction, from kongfu novels to history novels, from love stories to war legend. The imagination of the 800,000 contracted writer are unbelievable. Many of the novels have been published by publishers from China mainland to Hongkong and Taiwan. Some are made into mmorpg games and few are being filmed.Here is a summary of some of the novels that have been made into games. http://www.5172game.com/news/yxzx/2009/0811/490.html\
(it is in Chinese).
These are two games which were originally novels from qidian.com.
You may wonder how they make money out of it, as the novel text can be easily copied and pased. First they have make the payment very easy. Shanda Group owns several mmorpg in China, to make the payment easy, gamers can easily purchased top-up card from net-cafe or IT related stores which are all over the place. Readers can also use such top-up card to top-up their account and when they log-in to the net, there is atomatic deduction of money. Each chapter is about 50 cents RMB so it is quite cheap, therefore private websites are not very attractive.
In order to improve the quality of the novels, qidian.com has a policy of monthly token. Every paid user is given some tokens every month, and if they feel that the book is good and want to support the author, they can give their token to the book and the author of the top ten books will be rewarded some cash, and the website send good authors to special training class given by the Association of Chinese Writers which is the national professional author board.Some of the very popular novels are published by publishers and Shanda either sold the copyright for some money or publish the novel with its own press.It is similar case for novels which are made into games, as Shanda it owns several mmorpgs and has several large game development teams, it can choose to do it on its own or sell it to other game makers.With the development of 3G technology, qidian.com now has the service for hand phone users and they can pay throuth their mobile service provider, eg China Mobile, and the readers can read the novel on handphone. This allow people to read novels on subway or bus. The recent news said that Shanda has signed contract with iTune to provide Chinese iPhone user with another payment method through iTune, this service may be also available to oversea users.Qidian.com has been awarded many titles such as 2008"annual best literature website",2008 "Forbes China New Media".

Sunday, November 22, 2009

facebook

Mark Zuckerberg invented Facemash on October 28, 2003 while attending Harvard as a sophomore. The site represented a Harvard University version of Hot or Not, according to the Harvard Crimson. That night, Zuckerberg was blogging about a girl who had dumped him and trying to think of something to do to get her off his mind:
I'm a little intoxicated, not gonna lie. So what if it's not even 10 p.m. and it's a Tuesday night? What? The Kirkland [dorm] facebook is open on my desktop and some of these people have pretty horrendous facebook pics. I almost want to put some of these faces next to pictures of farm animals and have people vote on which is more attractive.
—9:48 pm
Yea, it's on. I'm not exactly sure how the farm animals are going to fit into this whole thing (you can't really ever be sure with farm animals . . .), but I like the idea of comparing two people together.
—11:09 pm
Let the hacking begin.
—12:58 am
According to The Harvard Crimson, Facemash "used photos compiled from the online facebooks of nine Houses, placing two next to each other at a time and asking users to choose the 'hotter' person." To accomplish this, Zuckerberg hacked into the protected areas of Harvard's computer network and copied the houses' private dormitory ID images.
Harvard at that time did not have a student directory with photos and basic information and the initial site generated 450 visitors and 22,000 photo-views in its first four hours online.That the initial site mirrored people’s physical community -- with their real identities -- represented the key aspects of what later became Facebook.
"Perhaps Harvard will squelch it for legal reasons without realizing its value as a venture that could possibly be expanded to other schools (maybe even ones with good-looking people ... )," Zuckerberg wrote in his personal blog. "But one thing is certain, and it’s that I’m a jerk for making this site. Oh well. Someone had to do it eventually ... ". The site was quickly forwarded to several campus group list-servers but was shut down a few days later by the Harvard administration. Zuckerberg was charged by the administration with breach of security, violating copyrights and violating individual privacy and faced expulsion, but ultimately the charges were dropped.
Zuckerberg expanded on this initial project that same semester by creating a social study tool ahead of an art history final by uploading 500 Augustan images to a website, with one image per page along with a comment section. He opened the site up to his classmates and people started sharing their notes. "The professor said it had the best grades of any final he’d ever given. This was my first social hack. With Facebook, I wanted to make something that would make Harvard (and more open that) more open," Zuckerberg said in a TechCrunch interview.
The following semester, Zuckerberg began writing code for a new website in January 2004. He was inspired, he said, by an editorial in The Harvard Crimson about the Facemash incident. "It is clear that the technology needed to create a centralized Website is readily available," the paper observed. "The benefits are many." On February 4, 2004, Zuckerberg launched The Facebook, originally located at thefacebook.com. “Everyone’s been talking a lot about a universal face book within Harvard,” Zuckerberg told The Harvard Crimson. “I think it’s kind of silly that it would take the University a couple of years to get around to it. I can do it better than they can, and I can do it in a week.” "When Mark finished the site, he told a couple of friends. And then one of them suggested putting it on the Kirkland House online mailing list, which was, like, three hundred people," according to roommate Dustin Moskovitz. "And, once they did that, several dozen people joined, and then they were telling people at the other houses. By the end of the night, we were, like, actively watching the registration process. Within twenty-four hours, we had somewhere between twelve hundred and fifteen hundred registrants."
Membership was initially restricted to students of Harvard College, and within the first month, more than half the undergraduate population at Harvard was registered on the service. Eduardo Saverin (business aspects), Dustin Moskovitz (programmer), Andrew McCollum (graphic artist), and Chris Hughes soon joined Zuckerberg to help promote the website. In March 2004, Facebook expanded to Stanford, Columbia, and Yale. This expansion continued when it opened to all Ivy League and Boston area schools, and gradually most universities in Canada and the United States. Facebook incorporated in the summer of 2004 and the entrepreneur Sean Parker, who had been informally advising Zuckerberg, became the company's president. In June 2004, Facebook moved its base of operations to Palo Alto, California. The company dropped The from its name after purchasing the domain name facebook.com in 2005 for $200,000.
Facebook launched a high school version in September 2005, which Zuckerberg called the next logical step. At that time, high school networks required an invitation to join. Facebook later expanded membership eligibility to employees of several companies, including Apple Inc. and Microsoft. Facebook was then opened on September 26, 2006 to everyone of ages 13 and older with a valid e-mail address. In October 2008, Facebook announced that it was to set up its international headquarters in Dublin, Ireland.

the history of c language

C is a general-purpose computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. Although C was designed for implementing system software, it is also widely used for developing portable application software. C is one of the most popular programming languages. It is widely used on many different software platforms, and there are few computer architectures for which a C compiler does not exist. C has greatly influenced many other popular programming languages, most notably C++, which originally began as an extension to C.
Early developments
The initial development of C occurred at AT&T Bell Lab between 1969 and 1973; according to Ritchie, the most creative period occurred in 1972. It was named "C" because many of its features were derived from an earlier language called “B”, which according to Ken Thompson was a stripped-down version of the BCPL programming language.
The origin of C is closely tied to the development of the Unix operating system, originally implemented in assembly language on a PDP-7 by Ritchie and Thompson, incorporating several ideas from colleagues. Eventually they decided to port the operating system to a PDP-11. B's lack of functionality to take advantage of some of the PDP-11's features, notably byte addressability, led to the development of an early version of the C programming language.
The original PDP-11 version of the Unix system was developed in assembly language. By 1973, with the addition of struct types, the C language had become powerful enough that most of the Unix kernel was rewritten in C. This was one of the first operating system kernels implemented in a language other than assembly.
K&R C
In 1978, Brain Kernighan and Dennis Ritchie published the first edition of The C Programming Language. This book, known to C programmers as "K&R", served for many years as an informal specification of the language. The version of C that it describes is commonly referred to as K&R C. The second edition of the book covers the later ANSIC C standard.
K&R introduced several language features:
standard I/O library
long int data type
unsigned int data type
compound assignment operators of the form =op (such as =-) were changed to the form op= to remove the semantic ambiguity created by such constructs as i=-10, which had been interpreted as i =- 10 instead of the possibly intended i = -10
Even after the publication of the 1989 C standard, for many years K&R C was still considered the "lowest common denominator" to which C programmers restricted themselves when maximum portability was desired, since many older compilers were still in use, and because carefully written K&R C code can be legal Standard C as well.
In early versions of C, only functions that returned a non-integer value needed to be declared if used before the function definition; a function used without any previous declaration was assumed to return an integer, if its value was used.



by Siming

Saturday, November 14, 2009

Cloud Computing in Web Services – Next Generation Webhosting

banner

With the advent of rapidly-growing websites and expansion of services to meet the increasing business needs and clientele, webhosting has essentially transformed from being just a mere provider of a singular and definite platform for internet presence to becoming a flexible and scalable one-stop solution and service extension to both consumers and business owners world-wide.

 

What is Cloud Computing?

In simplest terms, Cloud Computing is a set of pooled computing resources such as Office Productivity Suite, Image Editors, Accounting Programs and etc. hosted and owned by a third-party service and delivered over the Internet to your PC.

Before Cloud Computing…

Sounds complicated? Haha, let’s try an analogy:

  1. Let’s imagine you’re an executive working at a large corporation. Your job scope includes ensuring that all your employees have the right hardware and software they need to do their jobs everyday.
  2. However, buying all the software and hardware for them is simply not enough: You’ll also need to purchase software licenses to give your employees the programs and stuff they require.
  3. So whenever you hire a new guy, you’ll have to buy more software or licenses for his terminal in order for him to work legally and effectively.

This involves a lot of money and often become a burden and an unproductive chore that not only adds on to your capital cost but also creates extra work in the setting up and purchasing such requirements!

How the “Cloud” works?

how-cloud-computing-worksCloud Computing offer an alternative solution. Instead of installing a whole suite of software for each and every computer, users will only have to load one application or interface which can be as simple as a web browser, logging onto a service-provider’s website and have access to all the applications remotely hosted over the network, saving up on tons of software and hardware purchase and maintenance cost.

Scalability and On-Demand computing power, storage and bandwidth

Cloud computing customers simply pay for the resources they use as they need them which is extremely flexible especially for new start-ups and expanding businesses as they do not have to manage and engineer web traffic and peak load limits.

For example, customers in retail and sales industry can choose to scale up their bandwidth, storage and computing power of their web services during festive seasons to augment their operations to meet increased business demands and scale them down in months of low-peak usage to maximize cost-savings flexibly and efficiently.

It’s not really a novelty

Cloud computing is not really a novelty. There’s a good chance that many of us are already familiar with and in fact, regular users of it. Web-based email services like Hotmail, Yahoo and Gmail are actually primitive cloud computing experiences that have become an essential part of our daily lives. Instead of running an email program on your computer, you login to a web-based email account remotely, with the software, mails and messages all stored on service’s computer cloud!

 

The emerging Cloud in the changing web industry

“Nothing endures but change and Change is the only constant that remains in the world we live in yesterday, today and tomorrow to the indefinite future.” Such is the truth too for the cyberspace and the Internet which remains one of the fastest growing and changing medium that is ever-expanding, reaching out and touching the lives of many others globally and effectively.

Cloud Computing technologies offer a viable, effective and cost-efficient solution for companies to emphasize on their core business policies and delivery to the customers rather than spending productive time on the extra, side-lined tasks of hardware and software infrastructure, saving valuable assets and resources for the greater good of the company and the consumers.

Brought to you by ~
Wong Kheng Leong =]

Thursday, November 12, 2009

Amazon, the virtual Bookstore(and more!)





After the lecture on how Amazon works under the hood, i was quite confused as to what the professor was talking about as i have no prior experience of using Amazon :P

Thus i think it would be beneficial to all of us that we have a sample look into the shopping experience of Amazon.


A first look at the homepage of Amazon.com

I have to admit, I was ashamed of my own lack of knowledge regarding Amazon.com
I use to think that it was only an online bookstore that delivers Harry Potter to your doorstep as soon as it's release. I was shocked to find so many different products on their website.
It is more worthy to be called Amazon the Supermart from now on. Just a sample of the range of products available on the website. Books(duh!), music, games, toys, electronics, sports, gardening and many more. Many of these products are non virtual and in fact bulky.
Out goes the window of my imagination of Amazon warehouse to be storing only books.


A sample product i tried clicking was this range of E-book reader called "Kindle". It is kind of like a supplementary product that Amazon is trying to sell to compliment their virtual database of e-books. Upon checking, you can see that there are options to personalize the product on the right hand side. Options like "Add a kindle leather look cover $29.90" and " Add a 2 year-warranty $65.00" are available and easily accessible using a simple checkbox.


And after you add the item to your shopping cart, a compiled list of accessories that goes along with your product will appear, ranging from book covers to e-giftcard vouchers.

It is truly amazing that the amount of time you have to spend to purchase one item that you want is less than 10 mins. All you have to do is to key in the proper title that you are looking for and get your visa card ready.





As many of you know(if not all :P) i'm an avid Mac fan and i must say i'm very please to see that Mac laptops are supported on Amazon.com
In fact what was amazing was that Amazon.com not only sells first hand Macs, it also resell second hand Macs and both prices are below the standard retail price at Apple. It also indicates how many units of laptop it has remaining in stock. Surely this will attract those people who always wanted a Mac but had not enough budget.Furthermore they deliever to your doorstep :D

With the discovery that they offer not only good prices for 1st hand products, but also GREAT prices for 2nd products, i would personally encourage all of you to take a look inside there before you purchase any expensive products. Who knows, perhaps u can buy 2 of it at Amazon.com :D

Maya-the Most Prestigious 3D Comupter Graphics Software


When talking about computer animation, one thing that we cannot avoid talking about is Maya; the high-end 3D computer graphics and 3D modeling software package developed by Alias Systems Corporation. It is perhaps the most popular and prestigious one of its kind and is widely used in films, TV, advertising, computer and video games, and architecture visualization and design as well. It is so influential that it won an Academy Award "for scientific and technical achievement" in 2003, citing use "on nearly every feature using 3-D computer-generated images”.

Maya is launched with a total of two commercial versions: Maya Complete and Maya Unlimited. Maya Complete includes most of Maya’s features whereas Maya Unlimited contains all the features in Maya. At the time when Maya Complete was first launched, it was so expensive that it deterred normal family users from buying it. But now its price is about the same as the price of other 3D computer graphics software which more people can afford. Besides these two, it still has a version for noncommercial purpose called Maya Personal Learning Edition (PLE), which is totally free of charge. But when using some of its key functions, huge notice will be prompted continuously telling you that this version is strictly for noncommercial purpose and improper usage is prohibited. Eventually the end product will come together with watermarks.

The release of Maya has dramatically reduced the cost of producing 3D animations. Before then, commercial 3D animation production was basically monopolized by Softimage which is required to operate on SGI workstations. But Maya lower the hardware requirement. It can work on PCs based on Windows NT operating system, therefore popularized the 3D animation. Because if its existence, Softimage was then modified to be used on PCs.

Maya has quite a number of plug-ins available for different specific needs. The one used in the bridge collapse animation shown during the visual computing seminar is called Blast Code. It is a high-level animation engine which helps to produce simulation of destructions and computer animated demolition. It can simulate real blasting, missiles attack, damage of constructions due to natural disasters etc. Its features are being improved during the production of films. One of these films is the Oscar winner King Kong.

Game Hacking

Notice: This is only a draft.

1) Introduction:
Games has brought us fantasy
Not only children are easily addicted to games, we can frequently see adult indulged in games at work or at home forgetting about their jobs.
However, as a computer game player, be it beginner or hardcore, you must have been through many circumstances in which you cannot advance further in the game because of some obstacle, or you feel bored because there is nothing else to do after you have cleared the game. What you wish is something that can help you pass the obstacle (although doing that will eliminate your satisfaction of completing something difficult) or something that give you a new perspective of the game you have been playing for hundred of hours. Whether it's the first or the second case, we are involving in game hacking.

In this blog post, I'll talk about 2 aspects of game hacking, and at the same time evaluate their advantages and disadvantages.

2) "Soft" hacking:
a) Concept:
"Soft" hacking involves in changing values in the memory which the game uses to process to make the game exhibits certain desired effect(s). Since only the memory on which certain components of the game are loaded is modified, "soft" hacking will not destroy the game data.
Example of "soft" hacking software for NDS and (Wii) is EmuCheat to create ActionReplay, CodeBreaker (sharable), for PC Game is ArtMoney.
b) Extent
"Soft" hacking is only possible under certain conditions
(- The targeted memory address which decides the effect)
- The data deciding the desired effect is loaded along with the core files
OR
- The data deciding the desired effect varies from instance to instance of the game. i.e. different for every save game
AND
- The data deciding the desired effect is allocated to some fixed addresses or "lazy" addresses (the address will not change during a session of the game). It will be impossible to track down an effect if its location changes too quickly.

An example of the 1st condition (rarer) is debug mode code is some games.
Example for the 2nd condition is money, hit point (HP), lives, item, etc.
Usually, the outcome of "soft" hacking can be stored in save game, if the game supports one. Save game is in fact an incomplete copy of the memory status but sufficient for the player to resume his/her progress in the game.

c) How-to
To "soft" hack, a program for viewing and searching and possibly enforcing the value in the memory is needed. Also, some basic knowledge of data representation, intuition and luck is also required.

Firstly, think of how the data can possibly be represented. Similarly to how data is stored on hard disk, the unit of storage on memory is byte.

The targeted data in most cases is numerical, and for the sake of simplicity, the number will fully occupy several bytes instead of being trimmed half-way to conserve memory space. First case of numerical data is direct representation. Money, HP data are definitely stored in this way. The second case is "pointer" type. Games with complex mechanics will usually have an array of data, and the data refers to the position of the object in the array. If we can extract the list from the game with the correct ordering, step 2 can be carried out easier.

If the targeted data is of boolean type, the data might be compressed instead of wasting a whole byte for boolean type data if the data belongs to the same class. For example, a check list (in PMD Sky - IQ effect).

Some feel-like-boolean-type data are actually numerical data, and for certain value, it will trigger certain in-game event. Data in this kind of representation is very hard to track down because it's usually mistaken for boolean type value and the value is not shown directly in the game. A tip to detect this kind of data representation is the overriding effect (some certain things can't happen at the same time). e.g in Pokemon games, you can't be Burnt and Poisoned at the same time.

The second step involves in tracking down the address of the data and at the same time observe the behaviour of the memory when there is outside interference. (The memory slot allocated to data is usually static,) In most cases, the memory slot allocated to store particular information is static or "lazy", (so we can modify the same address every time we play without having to track the value down again. However,) so it ) We will assume the targeted data is of static or "lazy" type first (because that's how memory slot is used in most cases). With the help of the

Usually, values of the same instance (e.g. HP, stat of the character/the items in bag) are usually situate near to each other. And another tip, although usually useless because there isn't many cases, is that games with almost identical gameplay, etc. with very slight difference (Pokemon D/P) will have the addresses modifying the same data somewhere nearby. In those cases, we can use the view memory function to have a broader view of what other things that it may hold and save our time tracking down the same value again.

d) Pro and con
+ "Soft" hacking requires less time and knowledge than "hard" hacking, which we will cover later.
+ "Soft" hacking won't destroy the game file.
- The highest extent it can destroy is the save game file. (Backup is needed)
- "Soft" hacking can make the game freeze or crashes (backup is needed)
- "Soft" hacking cannot change values that are not in the memory and directly accessed from the game file.
- We have to track down the address of the data every time we start a new session of the game if the memory slot to store the targeted information is of "lazy" type.

3) "Hard" hacking
a) Concept:
"Hard" hacking involves in changing values directly in the game files. People do "hard" hacking to change values that are not loaded into the memory but read directly from the component file instead and to create a completely new game with the basic gameplay from the original game, which will be impossible and cumbersome to implement with soft hacking.

b) Extent
Depending on the level of the "hard" hack (shallow/deep), the end product can be a game that is totally different comparing to the original one. The level of the hack is dependent on the knowledge of the hacker. To do "deep" hack, one must have knowledge about assembly language to actually track down and observe how the game handles the values to create a perticular effect in reality, then manipulate the value to make the game behaves like he/she wants. "Shallow" hack only involves in discovering the position of the information and changing the values without touching too much into the core of the game (which contains intruction to coordinate other component files (how to stream music and control the graphic) or the basic game mechanics (e.g Pokemon Dungeon - rescue password system)).

c) How-to

In this blog post, I'll only discuss how to do "shallow" hacking of a game. To do "shallow" hacking, one must have some basic knowledge about data representation and file structure, and a HEX Editor to peek into the bare actual file that is store on the HDD and edit it. "Shallow" hacking is usually only possible to modify files which is not related to core information about how the game runs. The best target to do "shallow" hacking on is games with size big enough to have separate component files or is a single compressed file containing numerous smaller component files. Simple game with only one executable file will be harder to deep hack because you have to deal with both the instructions and the actual data when exploring the file.

The first step (which may not be needed at all in some cases) involves in extracting the smaller component files from any big file. The easiest example to practice is Zoo Tycoon 1 and 2. The componenent files of the game are actually a compressed file in .zip format. Those files contains smaller component files which are human-readable for text file and other files are usually of recognizable type (jpg, xml). Usuually for other games, the component files are compressed and sometimes encrypted (...[Refer to File Structure]... PK) in an obscure format which can only be interpreted by the instruction in the core component of the game. In these cases, we will need other people's help - or a program written by people who understand the decompressing process to extract the smaller component files inside the compressed file. e.g. for NDS games, we will need ndstool or LazyNDS to decompress the content inside the game.

The second step involves in searching for the component files that is likely to hold information about the target and zero in on the section with information about the target.
If the game has a large number of objects that share the same "classification" and those objects are visible when we play the game (e.g. items) then we should first find the file containing the game script and extract all the name and add numbering to it. This will help us greatly in identifying certain "pointer" value which we mentioned earlier in the "soft" hacking section. To find out which component file holds information about the target, we can identify it via file name. Game developer although doesn't want other people to hack into their game, still have to keep the file name at a discernible level.
We will then open the file and look for any pattern. File containing same size information for each entry will usually has no offset list.
[use monster.md as an example]
For files with different entry size, an offset list is usually provided at the beginning of the file.
[use mappa_s.bin as an example]
The first case will make our hack very easy because since the entry size is fixed, we have a big list of info to compare each byte to tell what kind of information the byte holds and how large the field is. We can also utilize the list with numbering we created earlier to help with the identification of the function. The second case will usually be harder since we don't know exactly how the information is represented. Either case, the best method is to tamper with the information inside the file, re-compress if necessary and play the game to see the difference (trail-and-error method).

d) Pro and con
+ "Hard" hacking can virtually change anything in the game, from value (HP, items, etc.) to behaviour (warp point destination).
- Time consuming - figure out (and in some case reverse-engineer - sound, image) the file structure from scratch while some target value can be easily changed with "soft" hacking.
- Can aslo crash or freeze the game.

The most useful programming language

As a freshman in soc who might be new to programming like me, some of you might wonder what is the most useful programming language to learn. As we are constantly in pursuit of efficiency and effectiveness, we hope we can find one or two such languages from which we can conquer the world of computing science. It is not hard to find the ranking on the Internet like which claims that “Among thousands, 10 programming languages stand out for their job marketability and wide use. If you're looking to boost your career or learn something new, start here. ” (cite from 9 Programming Languages You Should Learn Right Now by Rothberg)
1. PHP
2. C#
3. AJAX (Asynchronous JavaScript and XML)
4. JavaScript
5. Perl
6. C
7. Ruby and Ruby on Rails
8. Java
9. Python
However, if you are following this, you are doing it wrong. Why do I say so? Today technologies are developing at an amazing speed and therefore any programming turn from being populous to being outdated in a shorter and shorter time span. For example, all of those so called “useful” languages — Java, PHP, Ruby, have first appeared in 1995, which means that all the hype that you are supposed to ”know” right now, didn’t even exist just 13 years ago.(Tony, 2008)
In other words, you will never be fast enough to catch up “the fashion”. In contrast, what remain unchanged are the core abstracts, ideas, and skills that are language independent, and that transfer from one syntax to another, like Algorithms, data structures, complexity and math. With these, whenever a new opportunity with new technology comes along, we should be able to get over the learning curve fairly quickly.
That explains why Haoqiang and I are doing the quite outdated “scheme” instead of going to the mainstream of Java. We will talk more in our presentation “Scheme-managing complexity” tomorrow. I hope this passage is helpful to you.

Computer Vision & Interface: Making today’s vision, tomorrow’s reality

vision2

Human computer interaction have transformed over the years from a traditional mouse-keyboard user interaction to 2D windows-based user interfaces with the advent of visual computing technologies. “What about the future?” One may ask. How is human computer interaction going to change? Today in this article, we shall explore the various different kinds of outstanding developments in the field of user experience design which can become ubiquitous over the next years.

 

The Future for Innovative Content: The Cheoptics360 Experience

cheo2 Cheoptics360 paranormal viewing of 3d videos from all angles and perspectives

What Cheoptics360?

Cheoptics360’s free-floating video display surrounds viewers with a 360 degree paranormal outlook of revolving 3d video images that can be seen at every perspective and in all lighting conditions. It utilizes projections from four different 3d projectors and the images projected are then re-assembled and re-generated in a transparent prism-like pyramid chamber that displays these free-floating videos in mid-air.

cheo1 3d holograms of objects and people in commercial tradeshows and presentations

Cheoptics360 in action!

Resembling 3d holograms seen in sci-fi and futuristic movies, such technologies are already being readily deployed in commercial tradeshows, electronic retail stores and events world-wide. Cheoptics360 created a dramatically different user experience and platform for creative product show reels, breaking away from traditional videos and images slideshows by wowing viewers with a truly innovative experience.

Cheoptics360 opens up new horizons and opportunities for content delivery in the future such as games system, television and cinematic experience and educational channels.

Whether it is immersing yourself in a realistic 360 degree battlefield in your favourite First-Person Shooter Games or watching the World Cup from the point of view of your idol Brazilian midfielder, Cheoptics360 promises a vastly different dimension of content viewing, presentation and interactivity we can expect in the near future.

 

Photosynth

Harnessing millions of still images culled from the websites such as Flickr, Facebook and other social networking sites, Photosynth rebuilds breathtaking dreamscapes such as the Notre Dame Cathedral computationally through massive collection of 2d images and mapping them onto a 3d paranormal plane.

clip_image001

PhotoSynth even analyzes images such as a poster picture of Notre Dame Cathedral in its creation of the 3d paranormal plane!

As quoted from the official website of Photosynth, Synths are entirely new visual mediums which analyze and compare each photo for similarities to the others and builds visual model of where the photos are taken before recreating the environment and canvas for display. Users can navigate multi-dimensional spaces with zoom and navigation features.

photosynth

Microsoft PhotoSynth harness collective memory of the masses by culling images from satellite photos and social networking sites such Flickr, Facebook community and re-create them in 3d computational space.

Throughout many decades and evolution of computing technologies, brilliant imageries of advanced interfaces seen in Hollywood futuristic sci-fi or action packed movies like the Iron Man, and Minority Report are perhaps no longer just distant dreams and fertile imagination of scriptwriters far from the reach of humanity.

Computer Vision and visual computing has constantly unlocked new perspectives and perhaps changed the way in which we can view and interact with the environment around us, making today’s vision into tomorrow’s reality.

-
Brought to you by ~
Wong Kheng Leong =]

Followers