Showing posts with label English. Show all posts
Showing posts with label English. Show all posts

Sunday, 7 October 2018

5 Tricks by Games Developer To Make You Keep Playing

Jangan lupa membaca artikel tentang bisnis di > Informasi bisnis terbaik 2020.

When you playing a game, did you ever realize why you are keep playing the game even the game is outdated?

There is no question that a video game can be addictive – maybe dangerously addictive – depending on the individual, sometimes kids can cry even angry while playing game. In fact, game designers have a lot to do with it, to keep you playing. This is at least five techniques game developer use to keep you playing.

1. Fairness
In the video game, there is a direct correlation between effort and reward. If you play long enough, you will get levels or master the techniques needed to complete most games, and hopefully we have fun doing it. In any genre, players are first presented with games that are initially tilted in their favor and become more difficult - but still fair - as it happens. Even fighting games try to be balanced so that no characters can dominate the others. A world where you are well appreciated because doing something that you enjoy can be a powerful attraction.

2. Attraction
What kind of goodness is far from reality if what you release isn't a little better than reality? Some video games focus more on the detailed of grass and more on an amazing explosion of screen, super combo, and special movements. Fighting game, beat 'em up, and other video games aimed at the action of two players are very dependent on the wow factor to get you back.


Unlike open-world games or single player MMORPGs, video games based on attraction factors do not need / want you to spend hours playing them - but they want you to take the next version to play with your friends. This is why they focus on short-term pleasure by providing over-the-top graphics and basic button-smashing (but addictive) gameplay. The Nintendo Wii is a pioneer in this regard, introducing some of the top titles based on about two to four players who fight it out, putting focus on fun and gameplay rather than realism and immersion.

3. Prizes
Progress through the new levels and abilities that accompany it is part of the overall video game prize schedule. To make grinding easier, however, game designers have awards that do not depend on development. The most obvious is the gold or currency in the world that can be built to buy goods, but there are also side quests, secret items and many other awards that players can get without progress in the game.

4. Progression
Game designers include development elements in almost every game, regardless of genre. However, the game that relies most on progression is role-playing (RPG) games. In fact, many gamers will spend hours killing the same parts of the enemy to get levels and abilities just so they can move forward in search and kill more enemies.

After a gamer is committed to beat the game, the time needed for progress increases, especially with the MMORPG, where a player can pass the first few hours, quickly gaining a level. Then, this game introduces spreads more section. So, the points needed to jump from level 10 to level 20 involve more grinding than level 1 to 10, for example. Spreading achievements makes gamers appreciate them more, and game designers know this. Like movies, our hope for the length of the game has increased - less than 20 hours is considered a very short completion time for RPGs. An easy way to fulfill that expectation without cultivating the game is to gradually extend the progress, forcing players to spend more time grinding. Many players consider this a cheap step on the game designer, so they have developed related techniques to help cover slowing developments: prize schedules.

MMORPG goes a step further by introducing achievements that are completely separate from the levels and abilities needed to progress through the game. These achievements are usually badges or honors given when players have devoted significant time to repetitive tasks such as killing 100 or 1,000 enemies of a certain type. As such, they do not continue the game, but they make gamers play for bragging rights, thus playing on a sense of achievement and pride.

5. Conclusion Trick
Game designers consciously look for ways to make their game more interesting and fun, making them more addictive. But, in the end, gamers are addicted and become addicted to certain titles or the online world. If there is no development, a gift schedule, attraction, immersion or honesty in the game, people will find another place to escape from reality, whether to a good book or an all-night pub. Considered like this, maybe encouraging people to continue playing is not the worst thing in the world.
Sumber https://www.blakbin.com/

Selain sebagai media informasi pendidikan, kami juga berbagi artikel terkait bisnis.

Blogger: How to Get Api Key for Disqus Comment Count?

Jangan lupa membaca artikel tentang bisnis di > Informasi bisnis terbaik 2020.

Disqus already have comment count widget for each post without opening whole embedded comment block via javascript called count.js, this feature is great for anyone who uses the disqus load on clicks or who wants to show post comment count after any post link and etc. Disqus count.js calling count-data.js this has disadvantage. The Count have update delay 10 15 minute after someone post a comment in your box and we have no option to speedup that delay as it controlled by Disqus it self.

Another option is using Disqus API to get Comment Count, it will update immediatly after someone post in your comment. but this one as basic plan, only have 1000 callback per hour. Thats mean 1000x uses of this key per hour. And this is how to get an API Key.

  • After login on disqus , look at the bottom page link with "API" text and choose "Application" or simply visit https://disqus.com/api/applications/
  • Click on "+ Register New Application" , fill all required field, then Click on "+ Register My Application".
  • Upon completion, you will get new interface which is "Setting Tab".
  • Look for "Domain" box in Setting section. and fill your site url eg: IndoINT.blogspot.com without http:// or https://. This box will give permission on what site is allowed for using our public api key.
  • Click on "+ Save Changes" and on the next interface we obtain our Disqus Public API Key and Disqus Secret Key.

Sumber https://www.blakbin.com/

Selain sebagai media informasi pendidikan, kami juga berbagi artikel terkait bisnis.

Friday, 31 August 2018

Lazy Load Disqus Comment on Blogger Site

Jangan lupa membaca artikel tentang bisnis di > Informasi bisnis terbaik 2020.

Lazy load Disqus mean set an hold to load Disqus Comment system, the whole page loaded first and then when we hit or scroll on some area in those page will triggering disqus comment system to be load.

This method for lazy loading Disqus comments is adapted for Blogger blog from CSS-Tricks article where originally shared by Osvaldas Valutis. This Blog using that method in Desktop mode, after loading this page, scroll down fast to the bottom, and you will see disqus comment box load after you scroll to it.

Before we begin, dont forget to backup your xml themes, then click on "Edit HTML".
If you have already disqus widget installed, remove it from "Layout" page.
Click on html block text area which is our xml code the hit CTRF + F on the keyboard.
After small input textarea shown on the upper right of our html code, fill with <b:includable id='comments' var='post'> and hit Enter on the keyboard.
Once the result found, we are shown the highlighted word. if it still wrapped, click on ">" on the left line of the highlighted word, so we got code structure like below :

<b:includable id='comments' var='post'>  <div class='comments' id='comments'>   <a name='comments'/>   <b:if cond='data:post.allowComments'>    <h4><data:post.commentLabelFull/>:</h4> 

We are about to modify on that structure, to make it look like this :

<b:includable id='comments' var='post'>  <div class='comments' id='comments'>   <!-- Paste our newly disqus block code below here -->   <a name='comments'/>   <b:if cond='data:post.allowComments'>    <h4><data:post.commentLabelFull/>:</h4>  

And this is the code to be paste, save it when its done to make changes :

<!-- Disqus Block Code --> <b:if cond='data:view.isPost'> <style> .disqus-loading {  font-size: 26px;  font-weight: 300;  color: #777;  text-align: center; } .disqus-loading.is-hidden { display: none; } </style> <div class='disqus-loading'>Loading comments...</div> <div class='disqus'/> <script> /*<![CDATA[*/ !function(t,e,n){"use strict";var o=function(t,e){var n,o;return function(){var i=this,r=arguments,d=+new Date;n&&d<n+t?(clearTimeout(o),o=setTimeout(function(){n=d,e.apply(i,r)},t)):(n=d,e.apply(i,r))}},i=!1,r=!1,d=!1,s=!1,a="unloaded",u=!1,l=function(){if(!u||!e.body.contains(u)||"loaded"==u.disqusLoaderStatus)return!0;var n,o,i=t.pageYOffset,l=(n=u,o=n.getBoundingClientRect(),{top:o.top+e.body.scrollTop,left:o.left+e.body.scrollLeft}).top;if(l-i>t.innerHeight*r||i-l-u.offsetHeight-t.innerHeight*r>0)return!0;var c,f,p,y=e.getElementById("disqus_thread");y&&y.removeAttribute("id"),u.setAttribute("id","disqus_thread"),u.disqusLoaderStatus="loaded","loaded"==a?DISQUS.reset({reload:!0,config:d}):(t.disqus_config=d,"unloaded"==a&&(a="loading",c=s,f=function(){a="loaded"},(p=e.createElement("script")).src=c,p.async=!0,p.setAttribute("data-timestamp",+new Date),p.addEventListener("load",function(){"function"==typeof f&&f()}),(e.head||e.body).appendChild(p)))};t.addEventListener("scroll",o(i,l)),t.addEventListener("resize",o(i,l)),t.disqusLoader=function(t,n){n=function(t,e){var n,o={};for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(o[n]=t[n]);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=e[n]);return o}({laziness:1,throttle:250,scriptUrl:!1,disqusConfig:!1},n),r=n.laziness+1,i=n.throttle,d=n.disqusConfig,s=!1===s?n.scriptUrl:s,(u="string"==typeof t?e.querySelector(t):"number"==typeof t.length?t[0]:t).disqusLoaderStatus="unloaded",l()}}(window,document); /*]]>*/ </script> <script> var disqus_shortname = 'Your_Disqus_Shortname'; var disqus_blogger_current_url = "<data:blog.canonicalUrl/>";  disqusLoader( '.disqus', {  scriptUrl:  '//' + disqus_shortname + '.disqus.com/blogger_item.js',  disqusConfig: function() {   this.callbacks.onReady = [function() {    var el = document.querySelector( '.disqus-loading' );    if( el.classList )     el.classList.add( 'is-hidden' ); // IE 10+    else    el.className += ' ' + 'is-hidden'; // IE 8-9   }];  } });  </script> </b:if> <!-- Disqus Block Code End --> 

Explanation:
On the script, you look at "your_disqus_shortname" must be replaced with your disqus shortname self. The script with CDATA in it comes from disqusloader.js by Osvaldas Valutis, minified and write directly on our blog. On the next script disqusloader define div with class disqus to be fill data processed by disqusloader function. Within disqusConfig function, it call callback if disqus ready to appear then giving new class is-hidden with sytle display none to the div with class disqus-loading, so the text "Loading comments..." will dissapear after that.
Source :
CSS Trick Lazy Loading Disqus Comments

Sumber https://www.blakbin.com/

Selain sebagai media informasi pendidikan, kami juga berbagi artikel terkait bisnis.

Blogger: Disqus Comment on Click with API Counter Comment Count

Jangan lupa membaca artikel tentang bisnis di > Informasi bisnis terbaik 2020.

We will about to implementing disqus Comment on Click event with Comment post Count using API Call. This one has advantage eg: does not have delay on showing our post comment count like count.js do, but in basic free disqus plan have disadvantage 1000x callback (1k uses / api call) per hour. If you are looking method without an API (without limit), see post Load Disqus On Click Without API.

Before we we begin, we must already have disqus public API KEY. to get one, go to disqus site and login, see the bottom part of that page and click on API links. For detail, see post How To Get Disqus Public API Key.


Still on disqus site, go to disqus admin site setting page and click on "Community". On the right side we have three "Comment Count Link". by default it filled with : Zero comment : 0 Comments, One comment : 1 Comments, Multiple : {num} Comments. We have to Change that comment counter text on that field with removing all " Comments" text, so it will look like : 0, 1, and {num}. Click on Save button to make changes.


DEMO

Show / Write Comments
Now go to your blogger site admin page. If you have already installed disqus widget, remove it first from the left sidebar "Layout" page. Next, click on "Theme" on the left sidebar. On the new right interface you will notice "Backup /Restore" button, hit that to download and save your xml theme script, in case we got messing around it can be restored with that xml by hitting the button again.

On the "Theme" Section, Click on "Edit HTML", click on our html text area box then hit CTRL + F on the keyboard, then fill with <b:includable id='comments' var='post'> on the input text area new ones appear in our html code box, then hit Enter on the keyboard.

Once the result found, we are shown the highlighted keyword. if it still wrapped, click on ">" on the left line of the highlighted word to expand, so we got code structure shown like below :

<b:includable id='comments' var='post'>  <div class='comments' id='comments'>   <a name='comments'/>   <b:if cond='data:post.allowComments'>    <h4><data:post.commentLabelFull/>:</h4> 

We are about to modify on that structure, to make it look like this :

<b:includable id='comments' var='post'>  <div class='comments' id='comments'>   <!-- Paste our newly disqus block code below here -->   <a name='comments'/>   <b:if cond='data:post.allowComments'>    <h4><data:post.commentLabelFull/>:</h4>  

Copy this block code and paste below <div class='comments' id='comments'> , then you must make change on script part at var disqus_shortname = 'Your_Disqus_API_Public_Key' and var disqus_shortname = 'Your_Disqus_Shortname' with your given Api Key and Shortname, save.

<!-- Disqus Block Code --> <b:if cond='data:view.isPost'> <style> #disqus-box {     background-color: #2e9fff;     color: #fff;     font-size: 16px;     font-weight: 600;     height:100px;     text-align: center;     width: 100%;     border-width: 0px;     margin: 20px 0px;     cursor: pointer;     border-radius: 5px; } #disqus-box:hover {     background: #164b78; } #disqus-pre {     position: relative; padding: 40px 0px;  } </style>  <div class='popzone'>     <div id='disqus_thread'>         <div id='disqus-box'>             <div id='disqus-pre'>Show / Write Comments</div>         </div>     </div> </div>  <script>     var disqus_publickey = "Your_Disqus_API_Public_Key";     var disqus_shortname = "Your_Disqus_Shortname";     var disqus_blogger_current_url = "<data:blog.canonicalUrl/>";     var thread_url = 'link:' + disqus_blogger_current_url;      $.ajax({         type: 'GET',         url: 'https://disqus.com/api/3.0/threads/set.jsonp',         data: { api_key: disqus_publicKey, forum: disqus_shortname, thread: thread_url },         cache: false,         dataType: 'jsonp',         success: function(result) {             if (result.response.length === 1) {                 divText = 'Show Comments [' + result.response[0].posts + ']';                 if (result.response[0].posts == "0") {                     $('#disqus-pre').html("Write Comment");                 } else {                     $('#disqus-pre').html(divText);                 }             }         }     });       var disqus_config = function () {         this.callbacks.onReady = [function(data) {             $("#disqus-box").delay(300).fadeOut();         }];     };       $('#disqus-box').on('click', function(){         $.ajax({             type: 'GET',             url: '//' + disqus_shortname + '.disqus.com/blogger_item.js',             dataType: 'script',             cache: true         }); $('#disqus-pre').html("Loading Comment Box...");     });      if(/\#comment/.test(location.hash)){         $('#disqus-box').trigger('click');     }  </script> </b:if> <!-- Disqus Code End --> 

Explanation :
Script require an disqus_publickey, disqus_shortname to be filled, while thread_url is value from our page canonical url. There is blogger_item.js not embed.js for blogger, which require disqus_blogger_current_url. Script will make an ajax call to get post count result. If response is "0" then text inside div with id disqus-pre will be overriden by text "Write Comment" else it will show an text Show Comment [num_post_count]. if the post has just been created, result will show nothing, exept someone open that box, and there is delay before count show result, so we fill with text "Show / Write Comments in it. If someone post an comment after reload, instantly we will get count result.

Script then give #disqus-box div have an function when clicked. It will replace all text inside to "Loading Comment Box...", when callback disqus on ready state, div block will disappear after 300ms. At the end, if url has #comment then #disqus-box div will simulating click event.

You will get more detail of you se post Disqus Comment on Click with Counter Comment Count. If you looking for Disqus Lazyload Method, see post Lazyload Disqus Comment on Blogger Site

Sumber https://www.blakbin.com/

Selain sebagai media informasi pendidikan, kami juga berbagi artikel terkait bisnis.

Blogger: Disqus Comment on Click with Counter Comment Count

Jangan lupa membaca artikel tentang bisnis di > Informasi bisnis terbaik 2020.

You can load Disqus Comment Box when you click on an Element. Advantage Loading Disqus comments on demand with onclick event will increases page load speed of your site.

Usually, when the page its been loaded, at the same time disqus comment system will also be loaded. It will gain much http request, load all resource associated comments from Disqus server. All the comments, avatars of commentators, uploaded images, support files etc, all this has to come all the way from Disqus server on to our page. As result, the page load speed of our site decreases.

When we are fans of speed, we have to do something to lower http request. If you are searching to trick disqus, it will gave you at least two option, Lazyload disqus comment, so disqus will load when our mouse scroll hit at the disqus box element. the other option is load Disqus Comment box on demand with on Click function.

This post is about Show Disqus Comment Box with Comment Counter Count after we Click on Div Element. We have two option when we want to call Disqus Comment Count, with and without API, and in this post, we want to use it without API Call. Let’s see how to do this.

DEMO

Show Comments [0]
First, go to disqus admin site setting page and click on "Community". On the right side we have three "Comment Count Link" Zero comments, One comment and Multiple comment. by default it filled with : Zero comment : 0 Comments, One comment : 1 Comments, Multiple : {num} Comments. We have to Change that comment counter text on that field with removing all " Comments" text, so it will look like : 0, 1, and {num}. Click on Save button to make changes.


Second, go to your blogger site admin page. If you have already installed disqus widget, remove it first from the left sidebar Layout section. Next, click on "Theme" on the left sidebar. On the new right interface you will notice "Backup /Restore" button, hit that to download and save your xml theme script, in case we got messing around it can be restored with that xml by hitting the button again.

On the "Theme" Section, Click on "Edit HTML", click on our html text area box then hit CTRL + F on the keyboard, then fill with <b:includable id='comments' var='post'> on the input text area new ones appear in our html code box, then hit Enter on the keyboard.

Once the result found, we are shown the highlighted word. if it still wrapped, click on ">" on the left line of the highlighted word, so we got code structure like below :

<b:includable id='comments' var='post'>  <div class='comments' id='comments'>   <a name='comments'/>   <b:if cond='data:post.allowComments'>    <h4><data:post.commentLabelFull/>:</h4> 

We are about to modify on that structure, to make it look like below :

<b:includable id='comments' var='post'>  <div class='comments' id='comments'>   <!-- Paste our newly disqus block code below here -->   <a name='comments'/>   <b:if cond='data:post.allowComments'>    <h4><data:post.commentLabelFull/>:</h4>  

To that, grab this block code and paste below <div class='comments' id='comments'> , make change on var disqus_shortname = 'your_disqus_shortname' with your given shortname, save and visit any of your blog post to see the changes.

<!-- Disqus Block Code --> <b:if cond='data:view.isPost'> <style> #disqus-box {     background-color: #2e9fff;     color: #fff;     font-size: 16px;     font-weight: 600;     height:100px;     text-align: center;     width: 100%;     border-width: 0px;     margin: 20px 0px;     cursor: pointer;     border-radius: 5px; } #disqus-box:hover {     background: #164b78; } #disqus-pre {     position: relative; padding: 40px 0px;  } </style>  <div class='popzone'>     <div id='disqus_thread'>         <div id='disqus-box'>             <div id='disqus-pre'>Show Comments [<span id='comment-count' class='disqus-comment-count' expr:data-disqus-url='data:post.canonicalUrl'>0</span>]</div>         </div>     </div> </div>  <script>     var disqus_shortname = 'your_disqus_shortname';     var disqus_blogger_current_url = "<data:blog.canonicalUrl/>";         $.getScript('//' + disqus_shortname + '.disqus.com/count.js', disqus_counts_loaded);       function disqus_counts_loaded() {         DISQUSWIDGETS.old_displayCount = DISQUSWIDGETS.displayCount;         DISQUSWIDGETS.displayCount = function(arg) {         DISQUSWIDGETS.old_displayCount(arg);             $("[id], [comments]").trigger('disqus-counts-loaded');          }     }       $('#comment-count').bind('disqus-counts-loaded', function() {          var obj = $(this);         if (obj.text() == "0") {              $('#disqus-pre').html("Write Comment");         }     });       var disqus_config = function () {         this.callbacks.onReady = [function(data) {             $("#disqus-box").delay(300).fadeOut();         }];     };       $('#disqus-box').on('click', function(){         $.ajax({             type: 'GET',             url: '//' + disqus_shortname + '.disqus.com/blogger_item.js',             dataType: 'script',             cache: true         }); $('#disqus-pre').html("Loading Comment Box...");     });      if(/\#comment/.test(location.hash)){         $('#disqus-box').trigger('click');     }  </script> </b:if> <!-- Disqus Block Code End --> 

Explanation Html Part :
<b:if cond='data:view.isPost'> ... </b:if> its new blogger conditional tag if its page contain your post. the old one is <b:if cond='data:blog.pageType == "item"'> ... </b:if> we put this conditional tag before our code, so our code will only show in the page contain post only, blog static pages not included.

If you want to implement this code on mobile (m=1) only, then you must add <b:if cond='data:blog.isMobile == "true"'> after post conditional tag and place </b:if> right before closing conditional post tag </b:if>

Inside <Style> ... </style> is code for theming our On Click Div Block.
<div id='disqus_thread'> ... </div> this is block will be embedded by our disqus comment box iframe. <div id='disqus-box'> ... </div> This our div like a button, infused On Click jquerry Code.
Next is <div id='disqus-pre'> ... <span class='disqus-comment-count'>0</span> </div> this is the part to show our Text and Comment Count text inside span tag filled with number "0".

in the Span tag, you will see expr:data-disqus-url='data:post.canonicalUrl used by disqus to identify which page is, we can replace it to expr:data-disqus-identifier='data:post.id if we want. while data:post.id is our unique post id which mean different on every post, data:post.canonicalUrl is our post current url.

Explanation Script Part :
inside <script> ... </script> is code to modifying html part dynamically.
var disqus_shortname = 'your_disqus_shortname' you must change it to your disqus short name.

The Comment Part.
We using getScript() to get the count.js file and then call function disqus_counts_loaded upon success. Basically, if you follow guidelines from disqus to implementing comment count, we have to only insert count.js script tag and class='disqus-comment-count'. The problem is disqus will not identify your post as an open thread if that post never been open Disqus Comment Box, as a result comment count will show nothing.

After the first time we open (load) disqus comment box there is huge delay before the post comment count show 0 (zero), thats why we filled "0" inside span tag. This is remind me of bot crawl to our page and index it.

In this case, we want to change that #disqus-pre if text inside span have value = 0 with if (obj.text() == "0") dynamically to "Write Comment" text by adding $('#disqus-pre').html("Write Comment");, but we got another problem, count.js script does not have any callback, so we dont know when the value inside span has been changed by disqus. This why disqus_counts_loaded() must play.

Via $.getScript(). This loads the count.js script file, executes it and then calls the callback function disqus_counts_loaded(). When the script is done with, it inserts another script called count-data.js into our page to fetch the data. When count-data.js is loaded, DISQUSWIDGETS.displayCount() is automatically called to fill the elements full with the new data. Because we overridden displayCount() with our own function, it now fires an event afterwards to any elements wishing to know when the "disqus-counts-loaded" occurs.

On the bottom part, there is if statment, if url contain Comment, div disqus box must be open. so we add trigger click on that.

OnClick Part.
This one is handle right click function when someone click on div with id (#) disqus-box. In the end part we change current text of #disqus-pre to "Loading Comment Box" and dissapear after 300ms when disqus on ready state after we click on it.

Disadvantage of this method showing comment count without API Call, if someone post an comment and then reload the current url the comment count will not change immediately. Because it have delay 10-15 minute even more before comment count get updated by disqus server. You can make it comment count updated immediately after reloading page with API Call Function.

Sumber https://www.blakbin.com/

Selain sebagai media informasi pendidikan, kami juga berbagi artikel terkait bisnis.