Touch it 1 World Plays

I decided to take a night off coding Touch It 2 tonight and instead I tried to experiment with some of the data collected with Touch It 1.

I decided it would be good to visualize where all the players are coming from as this may help when making Touch It 2.

I wanted to be able to see the plays being added to a drawing in realtime so I had a quick search around the net and came across this script.

http://www.patrick-wied.at/static/heatmapjs/

 

Heatmap.js was exactly what I was looking for, it even provided a nice way to draw at certain x y locations. After I had got a quick test knocked together the rest just fell into place.

I used PHP+MySQL to generate a Javascript array which I then looped through with a delay so I could see each dot being added. The end animation is quite good even if I do say so.

I didn’t spend much time trying to tweak the results as I feel the saved PNG shows me what I wanted to know.

Touch It World Plays

That’s it really nothing else special about it… Just a heatmap, move along, nothing more to see here…..

WordPress › Passwords Reset

Earlier today the WordPress team noticed suspicious commits to several popular plugins AddThis, WPtouch, and W3 Total Cache containing cleverly disguised backdoors. We determined the commits were not from the authors, rolled them back, pushed updates to the plugins, and shut down access to the plugin repository while we looked for anything else unsavory.We’re still investigating what happened, but as a prophylactic measure we’ve decided to force-reset all passwords on WordPress.org. To use the forums, trac, or commit to a plugin or theme, you’ll need to reset your password to a new one. Same for bbPress.org and BuddyPress.org.As a user, make sure to never use the same password for two different services, and we encourage you not to reset your password to be the same as your old one.Second, if you use AddThis, WPtouch, or W3 Total Cache and there’s a possibility you could have updated in the past day, make sure to visit your updates page and upgrade each to the latest version.

via WordPress › Passwords Reset.

I’m glad we don’t use any of those plugins around here but I would advise anyone who did to follow their advice and change their passwords. With all the hacking news going on just lately it seems like nothing is safe.

http://ifoundtheinter.net/?p=77

forgetfoo. its just a pixel, baby.

Renowned physicist Stephen Hawking recently explained his belief that there is no God and that humans should therefore seek to live the most valuable lives they can while on Earth.Guardian writer Ian Sample asked Hawking if he feared death in a story published yesterday. This was his response:”I have lived with the prospect of an early death for the last 49 years. Im not afraid of death, but Im in no hurry to die. I have so much I want to do first. I regard the brain as a computer which will stop working when its components fail. There is no heaven or afterlife for broken down computers; that is a fairy story for people afraid of the dark.”Hawkings 1988 book “A Brief History of Time” sold 9 million copies, and in it Hawking referenced God metaphorically as the force that could fully explain the creation of the universe.But in 2010, Hawking told Diane Sawyer that “science will win” in a battle with religion “because it works.””What could define God [is a conception of divinity] as the embodiment of the laws of nature. However, this is not what most people would think of that God,” Hawking told Sawyer. “They made a human-like being with whom one can have a personal relationship. When you look at the vast size of the universe and how insignificant an accidental human life is in it, that seems most impossible.”

via forgetfoo. its just a pixel, baby..

I don’t understand why people are getting upset about this. Stephen believes that science can explain everything in the universe, is it really that much of a surprise that he doesn’t believe in God?

HTC Bliss: a Verizon Android phone for women?

An Android phone made especially for women. It’s an odd sentence to write, but believe it or not, that’s exactly what we’re hearing HTC has up its sleeve. According to a source, the company is holding focus groups with women in their 20s and 30s around the country to get their take on a brand new device that will hit Verizon before the end of the year. And no, it’s not just a pink Incredible 2 — it’s going to have a slew of rather interesting female-targeted features. Hit the break for a look at what we know so far.

via HTC Bliss: a Verizon Android phone for women? | This is my next….

I know a few people that would kill to have a pink fluffy girls phone… hahaha

Flash AS3 Countdown to Midnight

A few days ago I needed to create a countdown timer that went to midnight of the current day.

I’m just posting the code here for reference later down the line if I need it. If you find the code useful then leave a comment 😉

On a side note this code could be used to countdown to any date / time (example below).


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package  {
   
    import flash.display.MovieClip;
   
    import flash.utils.Timer;                           // Import the timer and the event for it
    import flash.events.TimerEvent;
   
    public class main extends MovieClip {
       
        // Digital 7 Font - by Chess-7
        // http://www.dafont.com/chess-7-chess-7.d1833
       
        var currentTime:Date;                           // We dont need to instantiate this yet as it will get the time it was created
        var endDate:Date = new Date();                  // Set the endDate to the time now
       
        var clockTimer = new Timer(1000);               // Make a new timer and set it to 1000 milliseconds (or 1 sec)
       
        public function main() {
            // ValidateThis.co.uk
            // Learn what getTime, setDate and setHours does here : http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001580.html
           
            // Figure out midnight today
            endDate.setDate(endDate.getDate() + 1);     // Set the date to tomorrow
            endDate.setHours(0,0,0,0);
           
            // Lets start the countdown
            clockTimer.addEventListener(TimerEvent.TIMER, timerTick);
            clockTimer.start();
           
            // Update the timer for the first time
            updateCountdown();
        }
       
        private function timerTick(e:TimerEvent):void {
            updateCountdown();
        }
       
        public function updateCountdown():void {
            var currentTime:Date = new Date();              // We now create a new Date and it will give us the current time
           
            // Get the current time difference
            var timeDifference:Number = endDate.getTime() - currentTime.getTime();          // Divide by 1000 because the results are in milliseconds
           
            // Calculate times
            var seconds:Number = Math.floor(timeDifference / 1000);
            var minutes:Number = Math.floor(seconds / 60);
            var hours:Number = Math.floor(minutes / 60);
            var days:Number = Math.floor(hours / 24);
           
            // Set the remainder of the division vars above
            hours %= 24;
            minutes %= 60;
            seconds %= 60;
           
           
            // If everything has counted down to 0
            if (seconds < 0 || minutes < 0 || hours < 0){
                myCountdown.txtTimeLeft.text = "Time over";
                clockTimer.stop();                      // Stop the clock from keep calling updateCountdown
            }else{
                // Create the strings for the clock so that we have a 0 infront of any number less than 10
                var tHours:String = (hours < 10) ? "0" + hours.toString() : hours.toString();
                var tMinutes:String = (minutes < 10) ? "0" + minutes.toString() : minutes.toString();
                var tSeconds:String = (seconds < 10) ? "0" + seconds.toString() : seconds.toString();
               
                // Set the text so we can read it
                myCountdown.txtTimeLeft.text = tHours + ":" + tMinutes + ":" + tSeconds;
            }
        }
    }
}
You can download a working copy here if you like
MidnightCountdown

Touch it and Keyboard woes with Air for Android

I have been checking the comments that are being left on the Android market place and I’m seeing a lot of you cant seem to type your names? This isn’t due to spontaneous bouts of dyslexia but more due to either not being able to click into the box or the Android virtual keyboard not showing.

This had been a problem for me over 2 consecutive releases of Touch It and it was only last night that I managed to sort the problem. No one on the internet seemed to have anything to say about it so I figure I will post this here.

If you have having trouble with text input on Flash or Air for Android then it is probably because you are using TLF Text.

Yup.. that simple. I swapped the input boxes for Classic text and everything seemed to run perfectly. Go figure! Well after I had everything running again (tested on HTC Desire, Android Emulator and Galaxy Tab) I decided to give the graphics on the market place an update.

The current graphics were really old, from the first version in fact. I have now submitted my new graphics and I’m just waiting for it all to go through before they show up live. Let me know if you start seeing them 😉

 

If you havn’t downloaded Touch It yet then head on over to the market place and let me know what you think. Touch It

HTML5 Boilerplate updates and the build script

Woah, the HTML5 Boilerplate has been updated already and its just got a whole lot more Awesome-er!!

H5BP is brought to us by Paul Irish, Divya Manian, Sichuan and many other people in the open-source community. It has many features and snippets of code that I use myself every time I start a new website so this tool is invaluable to me. If you havn’t checked it out yet then go and have a look at http://html5boilerplate.com

The reason H5BP has just got a whole lot better is because of this

The Boilerplate build script is ready for prime time. You know all those site optimization tricks that Steve Souders tells you is a good idea? You’re four keystrokes away from nailing a 100% on them. Now you can:

  • Combines and minifies javascript (via yui compressor)
  • Combines and minifies CSS
  • Optimizes JPGs and PNGs (with jpegtran & optipng), saving 15-50% of page weight
  • Removes development only code (any remaining console.log files, profiling, test suite)
  • Basic to aggressive html minification (via htmlcompressor)
  • Revises the file names of your assets so that you can use heavy caching (1 year expires) without cache conflicts.
  • Upgrades the .htaccess to use heavier caching
  • Updates your HTML to reference these new hyper-optimized CSS + JS files
  • Updates your HTML to use the minified jQuery instead of the development version
  • Remove unneeded references from HTML (like a root folder favicon)
  • build according to what environment you want: production, test or development

Together with the server configurations (like the .htaccess), we’ve seen reductions of total page weight from 120k to 30k. We guarantee A-level performance with YSlow and Google PageSpeed when using the build script along with the server configs. (Okay, maybe not “guarantee”, but your parents will be really proud of you. 🙂

So have any of you had a play around with this yet? What are your experiences with it?

Site Editing

Through out most of this day I have been messing with a new WordPress theme, which I have now customised to our liking. I hope you to will find much more fun to look at!

Just changing the usual stuff, going through the CSS files and functions pages to make sure everything is tempered to how we like it. It has mostly been a visual change and will continue to happen over the next few days. There are still a few more pages to create and finish: About, Portfolio, Quote and Services. They shouldn’t take to long as the theme had extra page templates already built in which was useful. The portfolio will consist of all our current websites along with any graphics we deem worthy of being presented.

I hope you will take a good look around the website and post any comments you wish to about our previous posts so far we are really looking to get the website going and let people know what we’re really about.

Thanks Andrew

Adobe AIR for Android updated to 2.6

Adobe has just released an update for its Adobe Air runtime for Android bringing it to version 2.6. The update adds support for Android 3.0 Gingerbread, meaning AIR on tablets like the Motorola Xoom is a go, plus a series of performance improvements.

Highlights include up to 20% faster scrolling, H.264 video decoding at 30FPS, and GPU-accelerated animation or gaming at up to 50FPS. Greater gesture support has also been rolled in, plus Bitmap Capture for StageWebView for tighter HTML and Flash visual integration, and Asynchronous Bitmap Decoding, for improved image transitions.

The AIR 2.6 SDK is also on target for a H2 2011 release, but apps developed with the 2.5 SDK will of course run fine with the AIR 2.6 runtime.

Overall, not a bad and timely update, bringing AIR support to the incoming Honeycomb tablets. If you haven’t installed AIR on your Android device yet, considering there are loads of Android apps that require AIR to run, perhaps now is the time to see what it can offer you. A list of Android devices that support the requirements of AIR can be found here.

via Adobe AIR for Android updated to 2.6 supporting tablets.

I have updated on my HTC Desire and I have noticed that Touch it is running even more slowly? Seems weird that with all the speed improvements to rendering that Touch it would slow down. I will have a dig into it and post your results.

Touch It 1.3.9

We have just released Touch It v1.3.9!!

Nothing major in this release folks, just some general tidying up on our end, cleaning out the comments and speeding things up a little more. We did fix a few random bugs and remembered to increase the version number this time though.

We have been working on the back end a lot this weekend as we are planning on a new game mode for people who don’t want to play Timeattack or Survival modes. We have been toying around with a ‘Lights Out’ clone. Work is coming along nicely and we expect it to be ready next week with about 20 levels.

If you have any ideas for new features then as always let us know if the comments and we can definitely see about putting them in 😀