Posts Tagged ‘web2.0’

Next Level of the Web – Gamification

Sunday, October 30th, 2011

Even if Mr. Dale Dougherty hadn’t introduced the term Web 2.0 to the world, the world would still go round and we would still have the nowadays phenomenon of the social changes on the web. As earlier we just had our PROPERTY online for informational purposes, today we SHARE photos, multimedia, code, and thoughts with each other. And the future of the Internet will be the online habits and processes GAMIFIED.

Gamification is integrating game dynamics and mechanics into your site, product, service, community, content or campaign, in order to drive participation, solve problems, and engage users. People tend to return back to places where they leave a part of themselves. Gamification provides tools which influence users’ emotions and induce them to act.

The user engagement is happening by combining game dynamics, mechanics and aesthetics. Dynamics are time-based patterns and systems in your game:

  • Pacing
  • Appointments
  • Progressive unlocks
  • Reward schedules
  • Dynamic systems
  • Influence and status
  • Communal discovery

Mechanics are the systems and features that make progress visible:

  • Points
  • Levels
  • Skills
  • Leaderboards
  • Badges
  • Missions
  • Virtual goods
  • Player journey

Aesthetics are the overall experience that yields emotional engagement:

  • Curiosity
  • Satisfaction
  • Surprise
  • Trust
  • Delight
  • Fun
  • Envy
  • Pride
  • Connection

Some real life examples of gamification would be happy hours where you get an appointment when to come to get a discount for food and drinks, collecting stickers or stamps to get a discount or a product for free, and the usual studying system where you get marks for your skills and there are leaderboards of best students.

Some website examples of gamification would be foursquare, SuperMe, and Stack Overflow. Foursquare is a website where you use your smartphone to unlock places in your city and get badges for achievements. SuperMe is a website about personal success where you grow your skills of Wisdom, Ability, Influence, and Connection by watching videos, doing quizzes, and playing minigames. Also you are assigned different levels, get badges, and can see the activity of your facebook friends. Another great example of a gamified website is Stack Overflow and its sister websites Game Development, User Experience, English Language & Usage, Personal Productivity, OnStartups, etc. These are websites where users ask questions and answer them, vote for the best questions and answers, collect reputation points and badges, and unlock moderation privileges by reputation points.

A lot more about gamification can be learned from gamification.org. Especially I would recommend you the talks by Gabe Zichermann and Seth Priebatsch and also the workshop slides by Amy Jo Kim.

The Future is Now!

Thursday, June 17th, 2010

You might have noticed that HTML5 is almost fully supported in WebKit-based browsers. This means that you can use Ajax, vector graphics, videos, audios, geolocation, gradients, animations, local storage, and other cool features on iPhone and Android. Furthermore, you can combine that with PhoneGap to create rich native mobile apps.

Have a look at the presentation about mobile web-based app development, given by my former colleague Philipp:

The future is really promising and it is happening now!

Sunday Celebration: Automadness

Sunday, December 28th, 2008

Tree years ago I wrote about thin games as a concept of web2.0 for games. Nowadays one of the most popular games of that type among my friends is Car Madness. That’s a racing game made by the Apps-o-rama company in the Facebook social network. The game uses no plugins, but the standard browser possibilities.

Car Madness - Home

If you want to play “Car Madness”, you have to be a member of Facebook. The game is MMOG. Instead of forming a new social network from scratch, the creators use already existing communities of friends at Facebook. That’s useful for the both parties: the value of the social network is enhanced, and it’s easier to promote the project using the existing connections than in a separate website.

Car Madness - Garage

In the beginning a player gets some virtual money to purchase a car. Every car has three main parameters except the price. They are the power, traction, and aerodynamics. One can improve those parameters buying different upgrades for the car or a new car itself for the won money. While playing, racer’s level is increased and that influences the amount of the money you can get for the winning which you can spend for better and better car. The more you play, the more madness points you get. You can exchange the madness points for virtual money, an ability to race more than 25 times per day, or other goodies.

Car Madness - Race

The one wins whose car parameters are higher. If they are about the same, the result will depend on randomness. Sometimes it’s worthy to use bad boys services like a potato to the opponent’s exhaust pipe, nails on the track, oil on the road, or a smoke bomb.

What is the business plan of the creators? They just make use of some percent of fanatics who buy madness units for real money (3 units for 2 US dollars; 150 units for 100 dollars) which can be later exchanged for game goodies.

If you are interested, here you are. And I am going out to Giedrius for some cocktails.

Let the Humans Decide What They Need

Friday, December 26th, 2008

There is a story of the architect who designed a very spacious city park but did not put in any sidewalks. He was totally sure that they weren’t necessary. After a few months, people who used the park had worn down the grass, creating a number of distinct walking trails. The architect then proceeded to build sidewalks where the others had stepped.

(according to a lost source)

For Robomen: “Website is Under Construction. Please Come Back Later”

Friday, December 26th, 2008

Iteratively developed web projects are constantly updated. Sometimes the file structure has to be changed. Sometimes a new table is added to the database schema. Sometimes the data has to be massively changed. In a simpler case, HTML templates and style is changed. Usually, a more complex upgrade takes half an hour or even an hour, and the visitors should see “Under Construction” page instead of the normal site during the process, because the nobody should see broken view or corrupt data by accident while writing something to the database at that time.

Under Construction

A good practice for Apache web server users is to have a couple of configuration files which would be activated alternately, depending on whether the website is accessible to everyone, or is in the upgrade state. Once Tomas gave me an idea to create such configuration for the upgrade cases that others saw “Under Construction” page and I could browse the content and test if everything looks alright. So did I.

Apache lets you set the web server configuration on the directory level using .htaccess files. For the important projects I have files .htaccess_live and .htaccess_under_construction containing different settings in the root directory of the website. When I need to change the state, I copy the appropriate configuration to the .htaccess file:

cp .htaccess_under_construction .htaccess

or

cp .htaccess_live .htaccess

The content of the Apache configuration file .htaccess_live is something like this:

# index.html and index.php represents the directory by default
DirectoryIndex index.html index.php
<ifmodule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /
    # If the page was accessed by example.com, then redirect the request to www.example.com
    RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
    RewriteRule ^(.*)$ http://www.example.com$1 [R=301,L]
</ifmodule>

Whereas the content of .htaccess_under_construction is this:

# index.html and index.php represents the directory by default
DirectoryIndex index.html index.php
<ifmodule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /
    # If the page was accessed by example.com, then redirect the request to www.example.com
    RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
    RewriteRule ^(.*)$ http://www.example.com$1 [R=301,L]

    # if the IP address of the visitor is not 1.2.3.4 and the requested directory is not media,
    # then redirect the request to the file temporarily-offline.html
    RewriteCond %{REMOTE_HOST} !^1\.2\.3\.4
    RewriteCond %{REQUEST_URI} !/temporary-offline\.html$
    RewriteCond %{REQUEST_URI} !^/media
    RewriteRule .* /temporary-offline.html [R=302,L]
</ifmodule>

These configurations use the mod_rewrite module. RewriteCond defines the conditions which should be met to execute the redirect of request set by RewriteRule. The parameters in the brackets have the following meaning:

  • NC (no case) – use case insensitive comparison.
  • R=301 – redirect the request with code 301 “Moved Permanently”.
  • R=302 – redirect the request with code 302 “Moved Temporarily”.
  • L (last rule) – this is the last rule, so don’t execute the rest.

You can find your own IP address in one of the plenty What’s My IP services.

Now it’s clear how to technically set the temporary “Under Construction” view. The next thing, which seems quite important to me, is to show an appropriate temporary page. I personally like such error and system-message pages which describe the problem in a non-technical and visual way like twitter.com does, or the ones showing a video or something interactive to make me busy while the upgrade is being done.

Youtube Live

Sunday, November 23rd, 2008

I came back from the cepelinai party and started reading the news in my google reader. And I found there that youtube was going to broadcast live from San Francisco since three at night. I turned it on and it was about to end. But then it was repeated. So I started watching from the beginning.

Youtube Live

The show reminded me all those ordinary MTV awards (maybe just funnier) and I wouldn’t write about that at all, but what I really liked was that it’s a real internet TV. The spectator could choose from which video camera (s)he wanted to watch the broadcasted view. (S)he also saw all the upcoming program in a list in real time. And (s)he could comment. I think, that’s a large step forward in media and entertainment business. I would digg it even if someone had already done something similar before.

The Features of Web Apps

Monday, November 17th, 2008

A decade ago when Internet Explorer was the absolute winner in browser wars, it seemed to be cool to produce internet projects which pop up in new windows, hide the address bar, start playing favorite music, or change the color of scroll bars. There weren’t as many possibilities as nowadays, so I wanted to try all new flowers and butterflies and show them to others. But times and values changed. The standards of internet technologies were created, many new browsers were invented, new possibilities in phones and other devices were introduced. And so the web became a social phenomenon, the new lifestyle or at least helper for plenty of people. Different applications which had been installed on desktop computers, moved to remote servers. Nowadays web apps usually expose the full potential of the global network.

Web app logos

For better understanding, web apps are such applications which we use in internet browsers, for example, webmail, e-shops, auctions, wikis, or multiplayer online games. Recently, Robert O’Callahan from Mozilla wrote about good practices while creating web applications, regardless of the chosen technologies.

Clever URL addressing. The URLs should be organized in such a way that different parts of the web app could be saved as a del.icio.us bookmark or sent to a friend. For example, I know that when I enter http://mail.google.com/mail/#drafts, I will get to the Drafts of my google mail.

Sandboxes. The new users of the system should be provided with a safe demonstrative environment also known as sandboxes. They could test different functions there without breaking the important data. For example, PayPal has a sandbox for online merchants and CMS Made Simple has its demo version for potential users.

Browser apps should be used in the context of the browser. The buttons “Back”, “Forward”, “Refresh”, and “Stop” should function in the browser as well as the status bar, history, etc. The blocking of contextual menu or forced opening in a new window doesn’t add any protection against copying nor other value.

The apps should have inner structure that enables the features of the browser and it’s helping tools. The users should have an ability to manipulate the content or layout for their convenience: resize the text, search inside of a page, apply custom style or improve the usability by own scripts using either Greasemonekey (or similar plugin) or bookmarklets. The content of the web app should be indexable in search engines. Looking from the security perspective, all logic happening in the browser should be revalidated in the server.

Of course, most of those features can be applied not only to web apps, but also to social networks and to simple informative websites. We’ll see how everything evolves in the future, but at the moment the direction is clear: internet stimulate creativeness and openness. And I like it.

The Trend of Web Games

Friday, June 27th, 2008

Lately Gamasutra published quite a lot of articles about independent and online games as well as their accessibility. I am marking all that here for future reference adding personal comments.

Usually independent games are casual and low-budget. They are played by

  • hardcore players in the breaks between the AAA-game playing sessions,
  • casual players,
  • ex-hardcore players who don’t have that much time anymore because of studies, career, or family,
  • and also the professionals of games industry and academic players (I tend to be of this type).

Major part of casual games is family-oriented. However, after a research, it was found that there are many things that should be improved for the games to fit to mum, dad, and the little Mary.

Quick starting. There should be no obligatory loading scenes, settings, or intros. Mandatory introductions and cut scenes really make me nervous. I remember that from Prince of Persia Warrior Within as well as from the other games, series, and TV broadcasts. The content should be accessible quickly. Google has already provided links directly to the content skipping the Flash intros. In my opinion, the best practice to force visitors to watch the intro is following the way of Simsons and Futurama. Each introduction should vary, because it adds interest what there will be this time.

Automagical saving at least at some checkpoints. Before a decade console games were much more difficult because there was no possibility to save them. OK, OK, there were codes by which you could play from the lastly achieved levels, but for example, without the gathered points. The computer games were often saved just after completing a level. There was quite a lot anger when one made a mistake just before the end of a level after 15 minutes of progress and she had to start everything from the beginning again, especially when the game was linear and one couldn’t choose an alternative mission or level.

Smaller controllers for kids. I had borrowed an XBOX joypad a few months ago. After installing appropriate drivers, I could play with it on a PC. I did some research on the situation of game controllers in browser games. At the moment Javascript has no events triggered by joysticks and joypads. Flash has no such technical possibilities either. It would be possible to manipulate the input from joysticks and joypads by Java or Adobe Director MX, but these technologies are quite heavy and the games made in them might only be interested to children who have much free time and academic researchers. There are also some additional utilities which simulate keyboard input by controller signals, but I don’t imagine that applied for the masses. So kids should forget the usage of joysticks and joypads in browser games for a while. But maybe they can beg their parents for a keyboard with adapted large keys.

Children keyboard

Intuitive and not confusing control keys. While blind typing, I usually mix up the left [Shift] with [Caps Lock], [Caps Lock] with [Tab], or [Fn] with [Ctrl]. Others maybe misuse other keys. The keys which are usually mistaken shouldn’t trigger completely opposite actions. All in all the controlling should be intuitive. I’d say that it’s best to use usual combinations in usual situations. For example, [W], [A], [S], and [D] might be used as alternatives to [top], [left], [bottom], and [right], but not for additional jumping or shooting functions, because it’s de facto standard in other games.

Multiplayer mode. There are many Flash-based games which don’t exploit the technical opportunity to play for several players at once. The only usage of the net is usually just storing top players to a database, what lets different people compete with each other and this creates excitement as well. There are also very few games which let multiple players play on one computer, although this possibility might be interesting. By the way, there might be games for competing players (Liu Kang vs. Sub Zero), or for ones supporting each other (Sonic and Tails). The latter ones are much rearer and this might be a potential niche.

Localization with dialects in mind. When Anna visited me last time, she told me that Germans can’t speak English. They speak German English which is very similar to American English. When localizing games, it’s important to keep in mind that they should be presented to players in that language and dialect which is the native one of the target. Austrian German differs from German German. Australian English differs from Scottish English. The human body language differs from the alien body language.

Changeable difficulty. The fun factor is one of the most important ones in computer games. If a game gives you not enough attraction, then it will just be forgotten, because of better alternatives. Permanent loss just gets on ones nerves and exhausts rather than being fun. The level of difficulty should be adjustable in games. For example, the conditions for the winners can be made a little bit harder than the conditions for the losers in competitive games.

Game in short episodes. The levels or missions should take equal durations and better approximately 15 minutes than an hour or more. It’s easier to feel the progress and plan your time when playing in short episodes, wherever you are: at the PC or in the WC. :D

Clear feedback of the controls. There should be some information provided about the success and mistakes of a player. Players should be informed at every step, what they’re doing wrong, in order to improve their turn. On another hand, if the technical messages are stupidly integrated into the game environment, then that’s also no good. For example, I hate the blinking arrows in the city of Need for Speed Underground as they tend to be virtual, but you can’t go through them.

Exploitation of web possibilities. Web games could have not only the multiplayer mode and ratings by collected points or improved skills stored, but also they could use all the profits of virtual social networks, like official informational website, forums, blogs, newsletters, voting (like in Kongregate which tends to be progressive website of browser games), and also fan-site kits (downloadable archives with high-quality website templates, screenshots, artwork and main information). People try the games because of gameplay, graphics, reputation or good marketing campaign, but they keep playing because of the community with whom they play. A smart step is to use already existing social networks and integrate games into them has been already done in Facebook (MindJolt) and MySpace (games.myspace.com).

Small price. Non-playing adult daddies would never buy a game to his child for 40-60€… Well, that’s possible if the kid has great results at school, bothers about the game for a long time, the ESRB rating fits the age and the maturity of the child and the parent earns much. Game developers and publishers could take more attention for modern game business models instead of the traditional ones. One can use advertisings instead of member fees, for example Google AdSense (contextual text ads) or MochiAds (ads and analytical tools integrated into Flash games).

I won’t make any public conclusions at the moment. That would be it, but there will be some more…

Banner Game

Thursday, June 26th, 2008

In spring the association of game developers in Argentina announced a competition of creating a game in one month using any technologies, but with one limitation. It had to have a resolution not larger than 600×90 pixels. I liked the idea. It was an original concept. :) The winners were chosen by visitor votes at the association’s blog. The winning gameSurvive” developed by “Caterva Games” made me really surprised. It was a flight simulator with intuitive controlling, 3D graphics, dedicated music, stylish menu, and storing of player ratings. The 3D effect was implemented in 2D using similar technologies like in the experimental Javascript game “Mario Kart“. This one is also unbelievable.

Tips on Javascript Widget Accessibility

Monday, January 14th, 2008

Rich GUI is one of the requirements of nowadays web. The look and feel of websites is getting closer to desktop applications. The widgets are getting more and more intuitive. But the web developers, as well as customers ordering the web projects, should always keep accessibility and semantics in mind. The web is information at first and impression afterwards.

Client-side technology layers: Javascript and CSS on top of XHTML.

Technologies should enhance the real world, but not vice versa. Therefore, as the owner of the content, you should be interested to distribute the information in all available ways. The content should be accessible in standard modern browsers as well as in Javascript-disabled browsers, screen readers, or small-screen devices like PDAs and cell phones. The presentation (CSS) and special effects (Javascript) should go on top of the content (XHTML). These parts should be separated into different files and not mixed-up. The general rule of thumb tells that if you switch off the style, images, Javascript, or all together, the visitor should still be able to read the content and navigate through the website. Imagine, that you came to a concert in a different city and you need to find out what buses are going to the concert hall. Then you open the local website of the public transport system in your mobile phone and check your traveling route. If this website is not accessible to you because of obligatory specific Javascript widgets which are not supported by your mobile, you will probably be late to the concert and your day will be ruined.

The semantic web is a concept of rules for informational data, which would allow represent, query, and modify data using different technologies. Instead of unreliable screen scraping for getting specific information from the page, it should be possible to parse the content using the DOM and to get the whole structure of the page. This is not only useful for search engines, but also for third-party web and desktop applications that may reuse your content in different mashups. For example, if have a simple informational website for the restaurant you own, with its location and probably a dynamic and nice map, there could be another company which would make a web crawler collecting information of different restaurants and hotels, and parks, showing them in one combined map with ratings of each place, comments, and recommendations. If the content of your website is not semantic, you’ll hardly get additional attention from third-party projects.

No matter, what the business model for the website is, if the company is future-oriented, the website should have the structural content separated from presentation and logics. And the content should be accessible and navigable without Javascript nor CSS. All the rich GUI effects should be added additionally by Javascript, when it is enabled. Forget all the tutorials and examples creating content on the fly with document.write or adding event handlers for HTML element directly in the markup. The Javascript should be included from separate files and it should influence the content using DOM after the page is loaded. This concept is called unobtrusive Javascript. The separation of different layers means also faster loading as Javascript and CSS files are usually downloaded once and taken from the browser cache for other requests.

DON’T:


XHTML:
<a href="http://aaiddennium.com/blog/"
onclick="window.open(this.href,'','width=800,height=600');return false">
My Blog
<script type="text/javascript">
/* <![CDATA[ */
document.write("(opens in a new window)");
/* ]]> */
</script>
</a>

DO:


XHTML:
<a href="http://aaiddennium.com/blog/" class="new_window">
My Blog
</a>

Javascript (included from a separate file):
window.onload = function() {
    var aElems = document.getElementsByTagName("a");
    for (i=0, iLen=aElems.length; i<iLen; i++) {
        var oEl = aElems[i];
        if (oEl.className.match(/\bnew_window\b/)) {
            var oT = document.createTextNode("(opens in a new window)");
            oEl.appendChild(oT);
            oEl.onclick = function(e) {
                if (!e) var e = window.event;
                var oLink = e.target || e.srcElement;
                window.open(oLink.href, "", "width=800,height=600");
                e.cancelBubble = true;
                e.returnValue = false;
                if (e.stopPropagation) e.stopPropagation();
                if (e.preventDefault) e.preventDefault();
            };
        }
    }
}

Moreover, there is a concept of creating fully functional website without special effects and then adding Javascript to change the default links to Ajax-based content loaders. This concept was called Hijax by Jeremy Keithin in his book Bulletproof Ajax. However the Hijax approach has it’s disadvantages as well. For example, the standard Back/Forward functionality makes no sense with Ajax data loading. And it’s pretty expensive to duplicate all the functionalities making one server-side and one client-side approach.

I would say, that the usual link navigation should be used in most cases, and Javascript should be added only as specific widgets or for specific pages. Javascript can overwrite the default functionality. For example, external links can be opened in new popup windows by Javascript, or some small forms can be opened in new Ajax-based dialog boxes. The original link, turned into Ajax-based-functionality switcher, in some cases might lead to a new page, telling how to enable Javascript or where to get a modern browser. Or it can be a hash (#) link, leading to some place with information in the same page.

Each page should provide information, that the website is best experienced when viewing with Javascript-enabled modern browsers. This message could be hidden dynamically by Javascript on the page load, or even better, it could be written into the <noscript> tag which is shown when there is no Javascript. If you choose to hide the message by Javascript on the page load, you might dislike the flickering of the view as the message shows and then disappears. You can avoid that flickering, dynamically adding display:none not to the containing element by id after the page loaded, but to the additional CSS rule for the selector by that id while the page is still loading. The head section of the HTML document is always executed before the body is shown.

DON’T:

window.onload = function() {
    document.getElementById("warning_js").style.display = "none";
}

DO:

function dyn_css_rule(sSelector, sCssText) {
    var oCss = document.styleSheets[0];
    if (oCss.insertRule) {
        oCss.insertRule(
            sSelector + " {" + sCssText + "}",
            oCss.cssRules.length
        );
    } else if (oCss.addRule) {
        oCss.addRule(sSelector, sCssText);
    }
    return sSelector + "{" + sCssText + "}";
};
dyn_css_rule("#warning_js", "display:none");

Moreover, you should never dynamically modify the style of HTML elements directly. CSS is the responsibility for presentation layer, not the logics layer. Javascript should manipulate semantical class names. Then the presentation layer decides what to do with, let’s say, not important elements: to hide them, add some transparency, make the font smaller, or move them to different positions.

DON’T:

function toggle_visibility(sId, bVisible) {
    document.getElementById(sId).style.display = bVisible? "block": "none";
}

DO:

function toggle_visibility(sId, bVisible) {
    var oEl = document.getElementById(sId);
    var sClasses = oEl.className.replace(/\s*hidden\s*/g, " ");
    if (bVisible) {
        sClasses = sClasses + " hidden";
    }
    oEl.className = sClasses;
}

Even if you are a professional Javascript coder, it is useful to use Javascript frameworks instead of raw Javascript. The code you write will be cleaner as most boring routines are already implemented in the framework. The development will get faster as soon as you get used to it. And the product will be more reliable as the framework is tested on different browsers by large communities. The framework you choose, should support unobtrusive Javascript approach and strict XHTML. I personally prefer jQuery, but you can choose any other framework which seems easily adaptable for you.

DON’T:

var aElems = document.getElementsByTagName("div");
for (i=0, iLen=aElems.length; i<iLen; i++) {
    var oEl = aElems[i];
    if (oEl.className.match(/\bspecial\b/)) {
        oEl.onclick = special_function;
    }
}

DO:

$("div.special").click(special_function);

When working with Ajax, you should also understand that the speed of Internet is not the same for all visitors. So even if it takes a second for you to load some JSON-formatted data, the same request might take about 15 seconds for another user with sloooow Internet connection. So the website should show different identifiers for different statuses of “initial state”, “loading”, “result”, and “error”. Otherwise the visitor might click on the same widget multiple times trying to make it functioning. And this might lead to accidental duplicates and confusion. Sometimes it might be also useful to have a button for canceling the current request.

It might be strange for you that I didn’t show you how to create any full-featured widget as rating management, auto-completion or some calender. But the purpose of this entry was the introduction to the client-side coding of a better quality. All the rest depends on your creativity and business requirements. The experience comes from practicing.

Further reading: