Post by XFox Prower on Nov 19, 2006 23:01:17 GMT -5
The Tails Sliding Puzzle has been going through some changes. The Beta Puzzle has been recoded to conform with XHTML 1.0 Strict and XHTML 1.1. It also has a few new features and optimizations that the others don't have. But there are also a few tradeoffs too. For example, the preview button was removed because XHTML doesn't allow new windows to be created.
The next thing that may be changed is how the puzzle is scrambled. The old puzzles load with a single pre-set shuffle that is identical everytime the page loads. But they had a button that would use javascript to scramble the puzzle. The Beta puzzle uses PHP to scramble the puzzle and gives you a random shuffle each time the page is refreshed. The scramble button still exists though. Some are wondering why the scramble button still exists when the page is random everytime it loads. The script for scrambling takes about half of the entire script, but it relies on the client (user). Reloading the entire page just to scramble it wouldn't be fun. A better server-side solution would to be to use Ajax (XML Http Requests). This decision is what this poll is for. Here are some things to compare:
Client-side
Server-side
Script size really isn't an issue. Speed is where things get a little more complicated. It takes about 1 second for the client-side scramble to complete on a decent system using FireFox 1.5 or IE7 I estimate 10+ seconds using IE6 in Win2K on a 2ghz Celeron, seeing as how a 35kb XML+XSL page took 10 seconds to load (offline!) on such a system. Going with the server-side option, performance would be based on the server (beyond user control) and the user's internet speed. Which is better? A low-end machine on cable may be as equal as a high-end machine on dialup.
I'm more concerned with breaking the freedom of playing the games offline with a functional scramble feature. Even by using Ajax, it would still be fast for dialup users though. A new shuffle would be done faster than reloading than the time it would take to load the page. This is because the request is small and requests only the little bit of data needed. Note that to load an entire page, every resource (images, scripts, stylesheets, etc) take atleast 1 HTTP request (1 to check the date last modified to see if it's cached, and another to download the entire file if needed). So the server-side solution is pretty fast. Here's an example to demonstrate speed: www.w3schools.com/ajax/ajax_example.asp. It's probably Where I'll be learning it.
For the puzzles to advance and keep up with today's technology and features, it may be necessary to use a server-side technique, requiring an internet connection to scramble (in other words, you could still save the whole page and play it offline, but no scrambling). I want to keep the puzzles simple enough to run on portable devices such as the DS, PSP, and cell phone browsers at optimal speeds.
As for compatibility, I still need to confirm whether DS, PSP, and most cell phones support Ajax. Cell phones are less of a concern unless it no longer costs $1 service charge to get online (I don't use a cellphone myself). But as far as desktop users go, this has been supported since atleast: FireFox 1.5, IE7, Opera 8, and Safari. 2.0 For IE users, note that IE7 is only available for Windows XP and Vista.
The poll will be up for awhile to give me time to test the DS Browser when it comes out as well as learn Ajax if needed, so vote and post feedback.
The next thing that may be changed is how the puzzle is scrambled. The old puzzles load with a single pre-set shuffle that is identical everytime the page loads. But they had a button that would use javascript to scramble the puzzle. The Beta puzzle uses PHP to scramble the puzzle and gives you a random shuffle each time the page is refreshed. The scramble button still exists though. Some are wondering why the scramble button still exists when the page is random everytime it loads. The script for scrambling takes about half of the entire script, but it relies on the client (user). Reloading the entire page just to scramble it wouldn't be fun. A better server-side solution would to be to use Ajax (XML Http Requests). This decision is what this poll is for. Here are some things to compare:
Client-side
- Scrambling is included. All features work offline.
- Scrambling speed is dependent on your system's performance when parsing javascript
- Larger script
Server-side
- Scrambling is done server-side. Internet connection required to scramble.
- Scrambling speed is dependent on server's performance and your internet connection speed.
- Smaller Script
Script size really isn't an issue. Speed is where things get a little more complicated. It takes about 1 second for the client-side scramble to complete on a decent system using FireFox 1.5 or IE7 I estimate 10+ seconds using IE6 in Win2K on a 2ghz Celeron, seeing as how a 35kb XML+XSL page took 10 seconds to load (offline!) on such a system. Going with the server-side option, performance would be based on the server (beyond user control) and the user's internet speed. Which is better? A low-end machine on cable may be as equal as a high-end machine on dialup.
I'm more concerned with breaking the freedom of playing the games offline with a functional scramble feature. Even by using Ajax, it would still be fast for dialup users though. A new shuffle would be done faster than reloading than the time it would take to load the page. This is because the request is small and requests only the little bit of data needed. Note that to load an entire page, every resource (images, scripts, stylesheets, etc) take atleast 1 HTTP request (1 to check the date last modified to see if it's cached, and another to download the entire file if needed). So the server-side solution is pretty fast. Here's an example to demonstrate speed: www.w3schools.com/ajax/ajax_example.asp. It's probably Where I'll be learning it.
For the puzzles to advance and keep up with today's technology and features, it may be necessary to use a server-side technique, requiring an internet connection to scramble (in other words, you could still save the whole page and play it offline, but no scrambling). I want to keep the puzzles simple enough to run on portable devices such as the DS, PSP, and cell phone browsers at optimal speeds.
As for compatibility, I still need to confirm whether DS, PSP, and most cell phones support Ajax. Cell phones are less of a concern unless it no longer costs $1 service charge to get online (I don't use a cellphone myself). But as far as desktop users go, this has been supported since atleast: FireFox 1.5, IE7, Opera 8, and Safari. 2.0 For IE users, note that IE7 is only available for Windows XP and Vista.
The poll will be up for awhile to give me time to test the DS Browser when it comes out as well as learn Ajax if needed, so vote and post feedback.