<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>MyCoffeeBreaks</title>
	<atom:link href="http://offground.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://offground.wordpress.com</link>
	<description>If you are the flame you can&#039;t be burned</description>
	<lastBuildDate>Wed, 18 Jan 2012 12:55:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='offground.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>MyCoffeeBreaks</title>
		<link>http://offground.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://offground.wordpress.com/osd.xml" title="MyCoffeeBreaks" />
	<atom:link rel='hub' href='http://offground.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Xedithor: 2D Sprite Editor</title>
		<link>http://offground.wordpress.com/2012/01/04/xedithor-2d-sprite-editor/</link>
		<comments>http://offground.wordpress.com/2012/01/04/xedithor-2d-sprite-editor/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 19:49:48 +0000</pubDate>
		<dc:creator>oth3rside</dc:creator>
				<category><![CDATA[C/C++ Diary]]></category>

		<guid isPermaLink="false">http://offground.wordpress.com/?p=530</guid>
		<description><![CDATA[I created 2D sprite  editor. version 1.00 is released.  :) . here is first shoot video:  [please see full screen, I think youtube edit my video ] &#160; Creating animation: [HD video]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=offground.wordpress.com&amp;blog=1172426&amp;post=530&amp;subd=offground&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I created 2D sprite  editor. version 1.00 is released.  :) .</p>
<p><span style="color:#0000ff;"><strong>here is first shoot video:  [please see full screen, I think youtube edit my video ]</strong></span></p>
<p><span style="text-align:center; display: block;"><a href="http://offground.wordpress.com/2012/01/04/xedithor-2d-sprite-editor/"><img src="http://img.youtube.com/vi/mZULWqCE0Kg/2.jpg" alt="" /></a></span></p>
<p>&nbsp;</p>
<p><span style="color:#0000ff;"><strong>Creating animation: [HD video]</strong></span></p>
<p><span style="text-align:center; display: block;"><a href="http://offground.wordpress.com/2012/01/04/xedithor-2d-sprite-editor/"><img src="http://img.youtube.com/vi/wxGzqcHpTuw/2.jpg" alt="" /></a></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/offground.wordpress.com/530/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/offground.wordpress.com/530/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/offground.wordpress.com/530/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/offground.wordpress.com/530/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/offground.wordpress.com/530/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/offground.wordpress.com/530/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/offground.wordpress.com/530/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/offground.wordpress.com/530/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/offground.wordpress.com/530/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/offground.wordpress.com/530/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/offground.wordpress.com/530/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/offground.wordpress.com/530/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/offground.wordpress.com/530/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/offground.wordpress.com/530/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=offground.wordpress.com&amp;blog=1172426&amp;post=530&amp;subd=offground&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://offground.wordpress.com/2012/01/04/xedithor-2d-sprite-editor/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b767107f41c5ec1a9654ce44b65ef50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">oth3rside</media:title>
		</media:content>
	</item>
		<item>
		<title>unresolved android.opengl.ETC1</title>
		<link>http://offground.wordpress.com/2011/10/16/unresolved-android-opengl-etc1/</link>
		<comments>http://offground.wordpress.com/2011/10/16/unresolved-android-opengl-etc1/#comments</comments>
		<pubDate>Sun, 16 Oct 2011 16:36:27 +0000</pubDate>
		<dc:creator>oth3rside</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[opengl]]></category>

		<guid isPermaLink="false">http://offground.wordpress.com/?p=499</guid>
		<description><![CDATA[unresolved problem ? import android.opengl.ETC1; import android.opengl.ETC1Util; only available in android 2.2 above.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=offground.wordpress.com&amp;blog=1172426&amp;post=499&amp;subd=offground&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>unresolved problem ?</p>
<p>import android.opengl.ETC1;<br />
import android.opengl.ETC1Util;</p>
<p>only available in android 2.2 above.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/offground.wordpress.com/499/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/offground.wordpress.com/499/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/offground.wordpress.com/499/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/offground.wordpress.com/499/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/offground.wordpress.com/499/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/offground.wordpress.com/499/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/offground.wordpress.com/499/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/offground.wordpress.com/499/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/offground.wordpress.com/499/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/offground.wordpress.com/499/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/offground.wordpress.com/499/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/offground.wordpress.com/499/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/offground.wordpress.com/499/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/offground.wordpress.com/499/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=offground.wordpress.com&amp;blog=1172426&amp;post=499&amp;subd=offground&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://offground.wordpress.com/2011/10/16/unresolved-android-opengl-etc1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b767107f41c5ec1a9654ce44b65ef50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">oth3rside</media:title>
		</media:content>
	</item>
		<item>
		<title>Mencoba untuk Fokus</title>
		<link>http://offground.wordpress.com/2011/10/15/mencoba-untuk-fokus/</link>
		<comments>http://offground.wordpress.com/2011/10/15/mencoba-untuk-fokus/#comments</comments>
		<pubDate>Sat, 15 Oct 2011 05:29:17 +0000</pubDate>
		<dc:creator>oth3rside</dc:creator>
				<category><![CDATA[mind]]></category>

		<guid isPermaLink="false">http://offground.wordpress.com/?p=505</guid>
		<description><![CDATA[Fokus dalam bekerja bukan lah yang mudah, dan memerlukan banyak latihan untuk bisa benar-benar fokus. Terutama bagi kita yang bekerja menggunakan komputer dan [apalagi] yang terhubung dengan internet. Sangat banyak gangguan dan pengalih perhatian baik yang kita sadari kalau itu memang gangguan dan yang tidak. Mengakses jejaring sosial [facebook, twitter, google+, friendster ] dalam bekerja, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=offground.wordpress.com&amp;blog=1172426&amp;post=505&amp;subd=offground&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h4 style="text-align:justify;">Fokus dalam bekerja bukan lah yang mudah, dan memerlukan banyak latihan untuk bisa benar-benar fokus. Terutama bagi kita yang bekerja menggunakan komputer dan [apalagi] yang terhubung dengan internet. Sangat banyak gangguan dan pengalih perhatian baik yang kita sadari kalau itu memang gangguan dan yang tidak. Mengakses jejaring sosial [facebook, twitter, google+, friendster ] dalam bekerja, salah satu aktivitas yang merusak fokus .&#8211;Ya kita semua tau itu, tapi tetap saja dilakukan&#8211;. dan ada hal lain yang sepertinya bukan gangguan tapi kenyataannya gangguan, misalnya notifikasi e-mail, notifikasi ada update software, atau antivirus sedang meng-interupsi : &#8220;hey komputer mu ada virus beberapa menit lagi akan meledak&#8221; dan lainnya. Mungkin notifikasi dari e-mail yang memiliki intensitas paling tinggi. Walaupun e-mail ada hubungannya dengan pekerjaan tapi itu juga harus diwaspadai :p . Satu lagi yang pasti adalah gangguan adalah chatting, yah, selain e-mail ini adalah salah satu sarana kita berkomunikasi dengan cepat lewat jaringan, dan dengan mudah pula orang lain dari jarak jauh meng-interupt kita.</h4>
<div id="attachment_514" class="wp-caption aligncenter" style="width: 310px"><a href="http://offground.files.wordpress.com/2011/10/ttfocus.png"><img class="size-medium wp-image-514 " style="border-color:initial;border-style:initial;border-width:0;margin:0;" title="ttfocus" src="http://offground.files.wordpress.com/2011/10/ttfocus.png?w=300&#038;h=300" alt="" width="300" height="300" /></a><p class="wp-caption-text">the art of focus</p></div>
<h4 style="text-align:justify;">Lalu bagaimana solusinya? . cabut kabel jaringan , matikan antivirus, matikan automatic update, pakai headset dan bekerja!. hmm.. ya itu bukan solusi elegan. solusi yang lain: lakukan pengecekan secara berkala saja. misalnya kita bekerja dari jam 8 pagi sampai jam 5 sore, kita bisa mengecek email, mengupdate status twitter, dll jam 8 pagi, 12 siang dan 4 sore masing2 10-15 menit, dan selain waktu-waktu itu tutup semuanya jangan buka. Efek dari email mungkin kita akan telat dapat info <img src='http://s0.wp.com/wp-includes/images/smilies/icon_neutral.gif' alt=':|' class='wp-smiley' /> , efek dari jejaring sosial : tidak ada, bahkan kalau kita tidak buka sama sekali juga tidak ada efeknya.hmm.. mungkin dianggap sedikit kuper <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ) .</h4>
<h4 style="text-align:justify;">Kenapa harus fokus?, sederhana: kalau kita fokus kita akan bekerja dengan 100% dari kemampuan kita dan hasilnya sangat bagus dan cepat selesai.</h4>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/offground.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/offground.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/offground.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/offground.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/offground.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/offground.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/offground.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/offground.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/offground.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/offground.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/offground.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/offground.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/offground.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/offground.wordpress.com/505/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=offground.wordpress.com&amp;blog=1172426&amp;post=505&amp;subd=offground&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://offground.wordpress.com/2011/10/15/mencoba-untuk-fokus/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b767107f41c5ec1a9654ce44b65ef50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">oth3rside</media:title>
		</media:content>

		<media:content url="http://offground.files.wordpress.com/2011/10/ttfocus.png?w=300" medium="image">
			<media:title type="html">ttfocus</media:title>
		</media:content>
	</item>
		<item>
		<title>Karena saya suka cepat !!</title>
		<link>http://offground.wordpress.com/2011/10/13/karena-saya-suka-cepat/</link>
		<comments>http://offground.wordpress.com/2011/10/13/karena-saya-suka-cepat/#comments</comments>
		<pubDate>Thu, 13 Oct 2011 16:04:51 +0000</pubDate>
		<dc:creator>oth3rside</dc:creator>
				<category><![CDATA[live]]></category>

		<guid isPermaLink="false">http://offground.wordpress.com/?p=500</guid>
		<description><![CDATA[hmm, yah mungkin bukan hanya saya, tapi semua orang suka cepat dalam segala hal, tak terkecuali di komputer { apalagi } . Saya sedang membicarakan tampilan komputer. Kita bisa mengatur tampilan komputer kita, baik di Linux maupun Ms-Windows atau OS lain, dengan 2 batas : tampilan terindah dan tampilan tercepat. Beberapa orang memang suka hal-hal [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=offground.wordpress.com&amp;blog=1172426&amp;post=500&amp;subd=offground&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h4 style="text-align:justify;">hmm, yah mungkin bukan hanya saya, tapi semua orang suka cepat dalam segala hal, tak terkecuali di komputer { apalagi } . Saya sedang membicarakan tampilan komputer. Kita bisa mengatur tampilan komputer kita, baik di Linux maupun Ms-Windows atau OS lain, dengan 2 batas : tampilan terindah dan tampilan tercepat. Beberapa orang memang suka hal-hal yang sangaaat indah, seperti tampilan GUI transparan, animasi button, dan lainnya (coba: win 7 tampilan terbaik, atau GNU/Linux Ubuntu tampilan terbaik). Dan ada orang yang suka super cepat!! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  . Super indah mengorbankan kecepatan dan super cepat mengorbankan keindahan. Bukankah komputer sekarang sudah sangat cepat. Hmm.. gimana kalo komputer yang super cepat itu di setting dengan tampilan super cepat, pasti itu yang paling cepat. Di Ms-Windows (XP di komputer ku, dan Win 7 di tempat kerja ) saya setting win classic theme, simple dan cepat. Di GNU/linux Ubuntu saya mencoba melakukan hal yang sama, namun belum nemu, karena walaupun saya setting dengan tanpa visual effect sama sekali, cursor masih menampakan shadow dan transparansi (argh.. pasti CPU ku perlu beberapa clock cycle untuk meng-generate itu).</h4>
<h4 style="text-align:justify;">Tapi saya tidak akan meng-implement pilihan &#8220;super cepat&#8221; di jalan raya, karena di situ teorinya beda <img src='http://s0.wp.com/wp-includes/images/smilies/icon_neutral.gif' alt=':-|' class='wp-smiley' />  . Dan juga tidak &#8220;super cepat&#8221;, kalau hal itu mengurangi &#8220;kesempurnaan&#8221;.  Kesimpulan yang bisa ditarik (eh diketik) :  <span style="color:#0000ff;">slow &lt;&lt; fast &lt;&lt; perfect .</span></h4>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/offground.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/offground.wordpress.com/500/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/offground.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/offground.wordpress.com/500/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/offground.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/offground.wordpress.com/500/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/offground.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/offground.wordpress.com/500/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/offground.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/offground.wordpress.com/500/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/offground.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/offground.wordpress.com/500/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/offground.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/offground.wordpress.com/500/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=offground.wordpress.com&amp;blog=1172426&amp;post=500&amp;subd=offground&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://offground.wordpress.com/2011/10/13/karena-saya-suka-cepat/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b767107f41c5ec1a9654ce44b65ef50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">oth3rside</media:title>
		</media:content>
	</item>
		<item>
		<title>love what you do</title>
		<link>http://offground.wordpress.com/2011/10/06/love-what-you-do/</link>
		<comments>http://offground.wordpress.com/2011/10/06/love-what-you-do/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 06:04:58 +0000</pubDate>
		<dc:creator>oth3rside</dc:creator>
				<category><![CDATA[mind]]></category>

		<guid isPermaLink="false">http://offground.wordpress.com/?p=497</guid>
		<description><![CDATA[learn many thing from Steve Jobs. &#8220;Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven&#8217;t found it yet, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=offground.wordpress.com&amp;blog=1172426&amp;post=497&amp;subd=offground&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>learn many thing from Steve Jobs.</p>
<p>&#8220;Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven&#8217;t found it yet, keep looking. Don&#8217;t settle. As with all matters of the heart, you&#8217;ll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don&#8217;t settle.&#8221;<br />
– Stanford commencement speech 2005</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/offground.wordpress.com/497/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/offground.wordpress.com/497/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/offground.wordpress.com/497/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/offground.wordpress.com/497/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/offground.wordpress.com/497/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/offground.wordpress.com/497/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/offground.wordpress.com/497/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/offground.wordpress.com/497/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/offground.wordpress.com/497/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/offground.wordpress.com/497/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/offground.wordpress.com/497/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/offground.wordpress.com/497/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/offground.wordpress.com/497/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/offground.wordpress.com/497/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=offground.wordpress.com&amp;blog=1172426&amp;post=497&amp;subd=offground&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://offground.wordpress.com/2011/10/06/love-what-you-do/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b767107f41c5ec1a9654ce44b65ef50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">oth3rside</media:title>
		</media:content>
	</item>
		<item>
		<title>packing resources</title>
		<link>http://offground.wordpress.com/2011/09/20/packing-resources/</link>
		<comments>http://offground.wordpress.com/2011/09/20/packing-resources/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 02:05:46 +0000</pubDate>
		<dc:creator>oth3rside</dc:creator>
				<category><![CDATA[C/C++ Diary]]></category>

		<guid isPermaLink="false">http://offground.wordpress.com/?p=479</guid>
		<description><![CDATA[Jika kita memperhatikan secara seksama semua program-program atau game yang tidak trivial (yang serius) selalu memproteksi resources/sumber daya yang digunakan. Resources disini maksudnya file-file yang berguna untuk game/program, misalnya library, gambar, sound, config file, text file, dan lainnya. Tujuannya jelas, agar tidak mudah diubah/dimodifikasi oleh user, atau setidaknya kalau pun user bisa mengubah , itu [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=offground.wordpress.com&amp;blog=1172426&amp;post=479&amp;subd=offground&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Jika kita memperhatikan secara seksama semua program-program atau game yang tidak trivial (yang serius) selalu memproteksi resources/sumber daya yang digunakan. Resources disini maksudnya file-file yang berguna untuk game/program, misalnya library, gambar, sound, config file, text file, dan lainnya. Tujuannya jelas, agar tidak mudah diubah/dimodifikasi oleh user, atau setidaknya kalau pun user bisa mengubah , itu tidak dilakukan secara mudah. (ya, tidak ada yang 100 % aman di dunia komputer ). Dari apa yang saya lihat di folder data dari program dan games yang ter-install di komputer, ada macam-macam teknik untuk memproteksinya, ada yang hanya mengubah ekstensi file, (misalnya file : gambar.jpg menjadi blablabla.dll ), melakukan enkripsi dan mengkompress file, dan ada juga yang menjadikan seluruh resources menjadi 1 file besar, misalnya data.pak . Bagaimana kalau ingin membuat proteksi semacam itu? . Saya ingin mencobanya disini, tidak perlu menulis program dari scratch, cukup menggunakan library yang sudah ada. Zlib (library kompres-dekompresi yang popular se-antero internet <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' />  ) dan C++ Boost adalah pilihan yang menarik. Dengan meng-kompresi data, kita tidak hanya membuat data tersebut tidak mudah di hack tapi juga membuat ukuran menjadi kecil a.k.a menghemat space.</p>
<p style="text-align:justify;">Saya akan membuatnya sederhana. Ada 2 hal yang jelas : [1] program yang melakukan packing, dan [2] data yang terpacking bisa dibaca ulang oleh program yang akan menggunakan data tersebut. Daripada menjadikan beberapa file menjadi 1 file besar, saya lebih memillih mem-packing beberapa file dari sebuah folder (dan sub folder didalam-nya) kedalam 1 folder besar. Untuk mempermudah pembacaan dan peng-organisasian, dari segi pembaca data yang sudah di pack , “data” seolah-olah masih berada di folder sebelum dipack ( tidak membaca dari 1 folder ) . Untuk itu saya akan menyimpan informasi file-file tersebut kedalam 1 file berformat biner, yang nantinya bisa dibaca ulang.</p>
<p style="text-align:justify;">Hmm.. so, here we go, berikut program test-nya: ( klik untuk ekspand source)</p>
<p><pre class="brush: cpp; collapse: true; light: false; toolbar: true;">
// test: packing-unpacking files
// @ edi ermawan , 20 Sept 2011
#include &lt;iostream&gt;
#include &lt;vector&gt;
#include &lt;string&gt;
#include &quot;boost/filesystem.hpp&quot;

#include &lt;fstream&gt;
#include &quot;infdef.h&quot;

using std::fstream;
using namespace boost::filesystem;

namespace xediconst
{
	const std::string FileNameIdent    =&quot;data&quot;;
	const std::string FileNameIdentExt =&quot;.pak&quot;;
	const int max_path_str             = 200;
}

using namespace xediconst;

class FileInfo
{
public:
	FileInfo()
	{

	}
	FileInfo(const std::string&amp; str): mFileID(mLastFileID++)
	{
		const char *pC = str.data();
        int length = str.size();
        strncpy( mFileName, pC, length );
		mFileName[length]='&#092;&#048;';
	}
	~FileInfo()
	{
	};
	void setFileInfo(const int id,const std::string&amp; str)
	{
		mFileID=id;

		const char *pC = str.data();
        int length = str.size();
        strncpy( mFileName, pC, length );
		mFileName[length]='&#092;&#048;';
	};
	int getFileID()
	{
		return mFileID;
	};
	std::string getFileName()
	{
		return mFileName;
	};
public:
	static int mLastFileID;
private:
	int mFileID;
	char mFileName[xediconst::max_path_str];
};

int FileInfo::mLastFileID=0;
//use boost
bool GetAllFiles(const path&amp; dir_path,std::vector&lt;FileInfo*&gt;&amp; list)
{
	if ( !exists( dir_path ) )
		return false;
	directory_iterator end_itr;
	for ( directory_iterator itr( dir_path ); itr != end_itr; ++itr )
	{
		if ( is_directory(itr-&gt;status()) )
		{
			GetAllFiles( itr-&gt;path(),list);
		}
		else
		{
			list.push_back(new FileInfo(itr-&gt;path().string()));
		}
	}
	return true;
}

void SaveFile(std::vector&lt;FileInfo*&gt;&amp; listFiles,const std::string&amp; nameFile)
{
	std::string nameFile2=nameFile+&quot;\\&quot;+FileNameIdent+FileNameIdentExt;
	fstream fileOut(nameFile2.c_str(),std::ios::out|std::ios::binary);

	std::cout&lt;&lt;&quot; Saving... &quot;&lt;&lt;nameFile&lt;&lt;std::endl;
	if(!fileOut)
	{
		std::cout&lt;&lt;&quot;Error saving file.&quot;&lt;&lt;std::endl;
		return;
	}
	int i=0;
	for(std::vector&lt;FileInfo*&gt;::iterator it=listFiles.begin();
		it!=listFiles.end();it++)
	{
		fileOut.seekp( (i++) * sizeof(FileInfo) );
		const char* c=reinterpret_cast&lt;const char*&gt;(*it);
		fileOut.write(c,sizeof(FileInfo));
	}
	fileOut.close();
}

void ReadFiles(std::vector&lt;FileInfo*&gt;&amp; listFiles,const std::string&amp; nameFile)
{
	std::string nameFile2=nameFile+&quot;\\&quot;+FileNameIdent+FileNameIdentExt;
	fstream fileIn(nameFile2.c_str(),std::ios::in | std::ios::binary);

	std::cout&lt;&lt;&quot;Reading... &quot;&lt;&lt;nameFile&lt;&lt;std::endl;
	if(!fileIn)
	{
		std::cout&lt;&lt;&quot;Error reading file.&quot;&lt;&lt;std::endl;
		return;
	}
	FileInfo* temp=new FileInfo();
	fileIn.read(reinterpret_cast&lt;char*&gt;(temp),sizeof(FileInfo));
	while(fileIn &amp;&amp; !fileIn.eof())
	{
		listFiles.push_back(temp);
		temp=new FileInfo();

		fileIn.read(reinterpret_cast&lt;char*&gt;(temp),sizeof(FileInfo));
	}
	fileIn.close();
}
//compress-decompress : use zlib
void CompressFiles(std::vector&lt;FileInfo*&gt;&amp; listFiles,const std::string&amp; nameFile)
{
	FILE *file_in;
	FILE *file_out;

	for(std::vector&lt;FileInfo*&gt;::iterator it=listFiles.begin();
		it!=listFiles.end();it++)
	{
			std::string nameIn=(*it)-&gt;getFileName();
			char c[30];
			itoa((*it)-&gt;getFileID(),c,10);
			std::string nameOut=nameFile+&quot;\\&quot;+FileNameIdent+c+FileNameIdentExt;

			std::cout&lt;&lt;&quot;File: &quot;&lt;&lt;nameIn&lt;&lt;&quot;  Compressed to :&quot;&lt;&lt;nameOut&lt;&lt;std::endl;
			file_in=fopen(nameIn.c_str(),&quot;r+b&quot;);
			file_out=fopen(nameOut.c_str(),&quot;w+b&quot;);
			int ret = def(file_in, file_out, Z_DEFAULT_COMPRESSION);
			if (ret != Z_OK)
			{
				zerr(ret);
			}
			fclose(file_in);
			fclose(file_out);
	}
}

void DecompressFiles(std::vector&lt;FileInfo*&gt;&amp; listFiles,const std::string&amp; nameFile)
{
    FILE *file_in;
	FILE *file_out;

	for(std::vector&lt;FileInfo*&gt;::iterator it=listFiles.begin();
		it!=listFiles.end();it++)
	{
			std::string nameOut=(*it)-&gt;getFileName();
			char c[30];
			itoa((*it)-&gt;getFileID(),c,10);
			std::string nameIn=nameFile+&quot;\\&quot;+FileNameIdent+c+FileNameIdentExt;

			std::cout&lt;&lt;&quot;File: &quot;&lt;&lt;nameIn&lt;&lt;&quot;  Extracted to :&quot;&lt;&lt;nameOut&lt;&lt;std::endl;
			file_in=fopen(nameIn.c_str(),&quot;r+b&quot;);
			file_out=fopen(nameOut.c_str(),&quot;w+b&quot;);
			int ret = inf(file_in, file_out);
			if (ret != Z_OK)
			{
				zerr(ret);
			}
			fclose(file_in);
			fclose(file_out);
	}
}
int main(int argc,char** argv)
{
	if(argc&lt;3)
	{
		std::cout&lt;&lt;&quot;Usage: xedicompress -P RelativePathSrc RelativePathDest&quot;&lt;&lt;std::endl;
		std::cout&lt;&lt;&quot;Usage: xedicompress -UP RelativePathDest&quot;&lt;&lt;std::endl;
		std::cout&lt;&lt;&quot;Relative path from this app.&quot;&lt;&lt;std::endl;
		return 0;
	}

	if (strcmp(argv[1], &quot;-UP&quot;) == 0)
	{
		std::cout&lt;&lt;&quot; Unpacking Files . . .&quot;&lt;&lt;std::endl;
		///path presult;
		std::vector&lt;FileInfo*&gt;listFiles_2;
		//read list of file from data.pak
		ReadFiles(listFiles_2,argv[2]);
		//after get list of files, then extract them.
		DecompressFiles(listFiles_2,argv[2]);
	}
	else if (strcmp(argv[1], &quot;-P&quot;) == 0)
	{
		std::cout&lt;&lt;&quot; Packing Files . . .&quot;&lt;&lt;std::endl;

		path presult;
		std::vector&lt;FileInfo*&gt;listFiles;
		//get all files from specified path, save it into vector
		GetAllFiles(argv[2],listFiles);
		//save list of files in data.pak, as future reference for extracting
		SaveFile(listFiles,argv[3]);
		//compress all files
		CompressFiles(listFiles,argv[3]);

	}
	else
	{
		std::cout&lt;&lt;&quot;Usage: xedicompress -P RelativePathSrc RelativePathDest&quot;&lt;&lt;std::endl;
		std::cout&lt;&lt;&quot;Usage: xedicompress -UP RelativePathDest&quot;&lt;&lt;std::endl;
		std::cout&lt;&lt;&quot;Relative path from this app.&quot;&lt;&lt;std::endl;
		return 0;
	}
}
</pre></p>
<p>format penggunaan:<br />
untuk Packing : xedicompress -P RelativePathSrc RelativePathDest<br />
untuk Unpacking : xedicompress -UP RelativePathDest<br />
contoh:<br />
<span style="color:#0000ff;">xedicompress -P ..\\test ..\\debug\\data</span><br />
akan mengkompress seluruh file didalam folder test (dan subfolder di dalam test) ke folder \debug\data. Relative path terhadap folder dimana aplikasi berada.<br />
<span style="color:#0000ff;">xedicompress -UP ..\\debug\\data</span><br />
Akan mendekompress seluruh file di debug\data ke folder asalnya.</p>
<p>#just_for_fun <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>boost ver 1.42<br />
zlib ver 1.2.5</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/offground.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/offground.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/offground.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/offground.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/offground.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/offground.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/offground.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/offground.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/offground.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/offground.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/offground.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/offground.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/offground.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/offground.wordpress.com/479/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=offground.wordpress.com&amp;blog=1172426&amp;post=479&amp;subd=offground&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://offground.wordpress.com/2011/09/20/packing-resources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b767107f41c5ec1a9654ce44b65ef50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">oth3rside</media:title>
		</media:content>
	</item>
		<item>
		<title>Pointer to function, pointer to function member of class.</title>
		<link>http://offground.wordpress.com/2011/09/14/467/</link>
		<comments>http://offground.wordpress.com/2011/09/14/467/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 07:41:16 +0000</pubDate>
		<dc:creator>oth3rside</dc:creator>
				<category><![CDATA[C/C++ Diary]]></category>

		<guid isPermaLink="false">http://offground.wordpress.com/?p=467</guid>
		<description><![CDATA[Pointer to function, pointer to function member of class. #Cara 1 : Secara tradisional Function pointer (pointer ke fungsi/penunjuk ke fungsi), dapat didefinisikan sebagai berikut: (typeReturn*) functPointer(typeArgument,typeArgument2,..,typeArgumentN) sebagai contoh, terdapat 2 fungsi dibawah ini: Contoh pemakaian function pointer dari 2 fungsi diatas, sebagai berikut: Lalu bagaimana kalau kita mau membuat function pointer yang menunjuk ke [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=offground.wordpress.com&amp;blog=1172426&amp;post=467&amp;subd=offground&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Pointer to function, pointer to function member of class.</p>
<p style="text-align:justify;"><span style="color:#0000ff;">#Cara 1 : Secara tradisional</span></p>
<p style="text-align:justify;">Function pointer (pointer ke fungsi/penunjuk ke fungsi), dapat didefinisikan sebagai berikut:</p>
<p style="text-align:center;"><span style="color:#0000ff;">(typeReturn*) functPointer(typeArgument,typeArgument2,..,typeArgumentN)</span></p>
<p style="text-align:justify;">sebagai contoh, terdapat 2 fungsi dibawah ini:</p>
<p><pre class="brush: cpp;">
	void Function1()
	{
		cout&lt;&lt;&quot; call  Function1 Function1&quot;&lt;&lt;endl;
	}
	int Function2(int a,int b)
	{
		return (a*b);
	}

</pre></p>
<p style="text-align:justify;">Contoh pemakaian function pointer dari 2 fungsi diatas, sebagai berikut:</p>
<p><pre class="brush: cpp;">
	void (*pf)();          // deklarasi
	pf=Function1;         // assignment
	pf();		      // pemanggilan

	int (*pf2)(int,int);      // deklarasi
	pf2=Function2;            // assignment
	int c=pf2(5,2);           // pemanggilan

</pre></p>
<p style="text-align:justify;">Lalu bagaimana kalau kita mau membuat function pointer yang menunjuk ke fungsi yang merupakan anggota dari sebuah class? . Deklarasi dan pemanggilannya agak berbeda, seperti contoh kelas Test dibawah ini:</p>
<p><pre class="brush: cpp;">
class Test
{
private:
	void (Test::*pf1)();            // deklarasi
	int (Test::*pf2)(int,int);	 // deklarasi
public:
	Test()
	{
		pf1=&amp;Test::Function1;     //assignment
		pf2=&amp;Test::Function2;	 //assignment
	};
	~Test(){};
	void Function1()
	{
		cout&lt;&lt;&quot; call Function1 Function1 &quot;&lt;&lt;endl;
	};
	int Function2(int a,int b)
	{
		cout&lt;&lt;&quot; call Function2 Function2 &quot;&lt;&lt;endl;
		return (a*b);
	};
	void Function3()
	{
		(this-&gt;*pf1)();               //pemanggilan
		int c=(this-&gt;*pf2)(2,9);      //pemanggilan
		cout&lt;&lt;&quot; c value: &quot;&lt;&lt;c&lt;&lt;endl;
	};
};

</pre></p>
<p style="text-align:justify;">Dengan sedikit memodifikasi function pointer di kelas Test diatas , kita bisa memakai array of function pointer to member class . Misal kita akan mengubah pf1 sebagai array dari function pointer.<br />
Deklarasi, assignment, pemanggilan:</p>
<p><pre class="brush: cpp;">
void (Test::*pf1)[10]();            // deklarasi, jumlah element array=10

	pf1[0]=&amp;Test::Function10;       //assignment
	pf1[1]=&amp;Test::Function11;       //assignment
	….
	….
	pf1[9]=&amp;Test::Function12;       //assignment

        ...
        ...
	(this-&gt;*pf1)[index]();          //pemanggilan , index= index yang di panggil
</pre></p>
<p style="text-align:justify;">Dalam penggunaannya, array dari function pointer mungkin lebih sering digunakan.</p>
<p style="text-align:justify;"><span style="color:#0000ff;">#Cara 2 : Menggunakan Boost Library ( boost::function )</span><br />
Pointer ke free function :</p>
<p><pre class="brush: cpp;">
	boost::function&lt;void ()&gt;funcp0;  / akan menunjuk ke: void Function1()
	funcp0=&amp;PrintFunction;
	funcp0();

	boost::function&lt;int (int,int)&gt;funcp1;  // akan menunjuk ke:  int Function2(int a,int b)
	funcp1=&amp;Function2;
	int h=funcp1(12,6); //maka h=72.
</pre></p>
<p style="text-align:justify;">Untuk mengetahui function pointer yang menunjuk ke fungsi yang merupakan anggota dari sebuah class, function pointer di kelas Test diatas saya ubah sebagai berikut:</p>
<p><pre class="brush: cpp;">
class Test2
{
private:
	boost::function&lt;void (Test2&amp;)&gt;pf1;
	boost::function&lt;int (Test2&amp;,int,int)&gt;pf2;
public:
	Test2()
	{
		pf1=&amp;Test2::Function1;     //assignment
		pf2=&amp;Test2::Function2;	  //assignment
	};
	~Test2(){};
	void Function1()
	{
		cout&lt;&lt;&quot; call Function1 Function1 &quot;&lt;&lt;endl;
	};
	int Function2(int a,int b)
	{
		cout&lt;&lt;&quot; call Function2 Function2 &quot;&lt;&lt;endl;
		return (a*b);
	};
	void Function3()
	{
		pf1(*this);           // pemanggilan
		int c=pf2(*this,2,9); // pemanggilan
		cout&lt;&lt;&quot; c value: &quot;&lt;&lt;c&lt;&lt;endl;
	};
};
</pre></p>
<p style="text-align:justify;">Dapat dilihat di kelas test diatas, yang berubah adalah deklarasi dan pemanggilan. Why boost? .it&#8217;s great. &lt; mbebek <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />   &gt;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/offground.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/offground.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/offground.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/offground.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/offground.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/offground.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/offground.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/offground.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/offground.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/offground.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/offground.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/offground.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/offground.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/offground.wordpress.com/467/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=offground.wordpress.com&amp;blog=1172426&amp;post=467&amp;subd=offground&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://offground.wordpress.com/2011/09/14/467/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b767107f41c5ec1a9654ce44b65ef50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">oth3rside</media:title>
		</media:content>
	</item>
		<item>
		<title>Membuat Tetris</title>
		<link>http://offground.wordpress.com/2011/08/14/membuat-tetris/</link>
		<comments>http://offground.wordpress.com/2011/08/14/membuat-tetris/#comments</comments>
		<pubDate>Sun, 14 Aug 2011 20:56:00 +0000</pubDate>
		<dc:creator>oth3rside</dc:creator>
				<category><![CDATA[C/C++ Diary]]></category>

		<guid isPermaLink="false">http://offground.wordpress.com/?p=441</guid>
		<description><![CDATA[Tetris mungkin salah satu game puzzle yang sangat populer dan hampir dimainkan setiap orang. Game ini tersedia di berbagai device, mulai dari game boy yang dedicated untuk tetris, hand phone, komputer, Nitendo, dll. Dulu saat saya masih kecil, saya main tetris pertama kali di game boy milik teman saya. Perlu diketahui dulu tidak ada orang [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=offground.wordpress.com&amp;blog=1172426&amp;post=441&amp;subd=offground&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p align="JUSTIFY">Tetris mungkin salah satu game puzzle yang sangat populer dan hampir dimainkan setiap orang. Game ini tersedia di berbagai device, mulai dari game boy yang dedicated untuk tetris, hand phone, komputer, Nitendo, dll. Dulu saat saya masih kecil, saya main tetris pertama kali di game boy milik teman saya. Perlu diketahui dulu tidak ada orang yang punya handphone di tempat tinggal saya. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .Mungkin terakhir kali saya aktif main tetris saat saya punya handphone modem Smart merk Huawey. Di situ disediakan game tetris. Saya hampir setiap saat memainkannya. Bahkan blok-blok tetris sampai terbawa mimpi. Serius !!. -hahaha-. Dan ternyata tetris memang bisa menyebabkan apa yang disebut <a title="Tetris Effect" href="http://en.wikipedia.org/wiki/Tetris_effect" target="_blank">Tetris Effect</a>. <a href="http://www.google.co.id/search?sourceid=chrome&amp;ie=UTF-8&amp;q=tetris+effect" target="_blank">Tetris Effect 2</a></p>
<p align="JUSTIFY">Beberapa hari lalu, – tepatnya awal2 ramadhan ini – punya ide untuk buat Tetris versi saya sendiri. Ya mungkin semua programmer di dunia ini punya versi tetris mereka sendiri. Hehehe. Ok saya membuatnya dari scratch, dan harus buat dari kode saya sendiri. &#8211;kalau mencari source code tetris di google itu namanya bukan tetris versi saya dunk – . Agar tetris saya mendekati “<span style="color:#0000ff;">standart tetris</span>” saya melihat referensi di  <a title="Tetris Wiki" href="http://tetris.wikia.com/wiki/Tetris_Wiki" target="_blank">Wiki Tetris</a> .&#8211; wow tetris punya wiki sendiri – . situs ini menjelaskan semua hal tentang tetris seperti: macam2 piece tetris, warna yang digunakan, system rotasi, bahkan system scoring yang digunakan.</p>
<p align="JUSTIFY">Ok, setelah info tentang standart tetris didapat saat nya ngoding. Saya masih menggunakan SDL sebagai system drawing dan input handler . Dan tentu saya pakai C++. hal yang agak berbeda disini, mungkin, saya ingin menulis seluruh code game nya dalam 1 file saja: Main.Cpp. Kenapa? -tidak apa2 cuma pingin saja- . Jadi tidak ada game state.</p>
<p align="JUSTIFY">Sesuai standar tetris terdapat 7 buah tetriminoes , dan setiap tetriminos saya representasikan sebagai array 2 dimensi 4&#215;4. Misal tetriminoes type Z seperti berikut:</p>
<p style="text-align:center;" align="JUSTIFY"><a href="http://offground.files.wordpress.com/2011/08/type_z.png"><img class="aligncenter size-full wp-image-445" title="type_Z" src="http://offground.files.wordpress.com/2011/08/type_z.png?w=490" alt=""   /></a></p>
<p align="JUSTIFY">Tetriminoes tipe yang lain yaitu : tipe I, tipe J, tipe L, tipe O, tipe S, dan tipe T. Sedangkan board ukuran 10 x 20 juga di representasikan sebagai array 10 x 20.</p>
<p align="JUSTIFY"><span style="color:#0000ff;">Collision detection</span></p>
<p align="JUSTIFY">Ceritanya setiap piece tetris akan bergerak jatuh, di waktu t, dan mempunyai posisi x dan y reletif terhadap board. Karena ukuran board 10 x20, maka maks X: 10 dan maks Y: 20. Setiap akan bergerak turun, di cek apakah terjadi collision atau tidak. Pengecekan dilakukan dengan mendetek apakah di posisi X, Y tersebut ada array bernilai 1 di array board 10&#215;20 dengan meng-iterasi matrik 4&#215;4 sesuai tipe tetriminoes.</p>
<p align="JUSTIFY">Versi pertama yang sudah bisa dimainkan sebagai berikut:</p>
<div id="attachment_455" class="wp-caption aligncenter" style="width: 310px"><a href="http://offground.files.wordpress.com/2011/08/tetrisonyx_100.png"><img class="size-medium wp-image-455" title="Tetrisonyx_100" src="http://offground.files.wordpress.com/2011/08/tetrisonyx_100.png?w=300&#038;h=273" alt="" width="300" height="273" /></a><p class="wp-caption-text">Click untuk memperbesar</p></div>
<p align="JUSTIFY">Ukuran board 10&#215;20, seperti standart tetris. Untuk warna saya tidak mengikuti standart.</p>
<p align="JUSTIFY">Info project : language:  C++, input and painting handler : SDL, graphics editing : Adobe Photosop</p>
<p align="JUSTIFY">Source Code ( SVN checkout )<span style="color:#0000ff;"> <a href="https://tetrisonyx.googlecode.com/svn/trunk">https://tetrisonyx.googlecode.com/svn/trunk</a></span></p>
<p align="JUSTIFY">Binary version 1.00 win32 win xp,win 7 :   <a href="https://tetrisonyx.googlecode.com">https://tetrisonyx.googlecode.com</a></p>
<p align="JUSTIFY"><span style="color:#808080;"># Keyword: simple SDL game, game  C/C++, game sederhana SDL, C/C++, Tetris.</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/offground.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/offground.wordpress.com/441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/offground.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/offground.wordpress.com/441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/offground.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/offground.wordpress.com/441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/offground.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/offground.wordpress.com/441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/offground.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/offground.wordpress.com/441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/offground.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/offground.wordpress.com/441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/offground.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/offground.wordpress.com/441/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=offground.wordpress.com&amp;blog=1172426&amp;post=441&amp;subd=offground&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://offground.wordpress.com/2011/08/14/membuat-tetris/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b767107f41c5ec1a9654ce44b65ef50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">oth3rside</media:title>
		</media:content>

		<media:content url="http://offground.files.wordpress.com/2011/08/type_z.png" medium="image">
			<media:title type="html">type_Z</media:title>
		</media:content>

		<media:content url="http://offground.files.wordpress.com/2011/08/tetrisonyx_100.png?w=300" medium="image">
			<media:title type="html">Tetrisonyx_100</media:title>
		</media:content>
	</item>
		<item>
		<title>post code: proximity game</title>
		<link>http://offground.wordpress.com/2011/07/18/post-code-proximity-game/</link>
		<comments>http://offground.wordpress.com/2011/07/18/post-code-proximity-game/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 15:14:17 +0000</pubDate>
		<dc:creator>oth3rside</dc:creator>
				<category><![CDATA[C/C++ Diary]]></category>

		<guid isPermaLink="false">http://offground.wordpress.com/?p=413</guid>
		<description><![CDATA[Berawal dari (May 17, 2011 : from this post ) saya upload hasilnya disini . Untuk sekarang hanya bisa play dengan komputer. Play dengan teman di LAN belum saya implementasikan. Screenshoot Main Menu: Screenshoot Gameplay: Source code (SVN check out) : https://proximity-game-clone.googlecode.com/svn/trunk Untuk binary and source code download : http://code.google.com/p/proximity-game-clone/  # Keyword: simple SDL game, game [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=offground.wordpress.com&amp;blog=1172426&amp;post=413&amp;subd=offground&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;"><span style="color:#333333;">Berawal dari (</span>May 17, 2011 : <a title="proximity begin" href="http://offground.wordpress.com/2011/05/17/proximity-game-clone/" target="_blank">from this post</a> ) saya upload hasilnya disini . Untuk sekarang hanya bisa play dengan komputer. Play dengan teman di LAN belum saya implementasikan.</p>
<p>Screenshoot Main Menu:</p>
<div id="attachment_461" class="wp-caption aligncenter" style="width: 310px"><a href="http://offground.files.wordpress.com/2011/07/proximity_mm_offground.png"><img class="size-medium wp-image-461" title="proximity_mm_offground" src="http://offground.files.wordpress.com/2011/07/proximity_mm_offground.png?w=300&#038;h=262" alt="Click untuk memperbesar" width="300" height="262" /></a><p class="wp-caption-text">Click untuk memperbesar</p></div>
<p>Screenshoot Gameplay:</p>
<div id="attachment_462" class="wp-caption aligncenter" style="width: 310px"><a href="http://offground.files.wordpress.com/2011/07/proximity_gameplay_offground.png"><img class="size-medium wp-image-462" title="proximity_gameplay_offground" src="http://offground.files.wordpress.com/2011/07/proximity_gameplay_offground.png?w=300&#038;h=261" alt="Click untuk memperbesar" width="300" height="261" /></a><p class="wp-caption-text">Click untuk memperbesar</p></div>
<p>Source code (SVN check out) :</p>
<p><span style="color:#0000ff;">https://proximity-game-clone.googlecode.com/svn/trunk</span></p>
<p>Untuk binary and source code download :</p>
<p><a href="http://code.google.com/p/proximity-game-clone/">http://code.google.com/p/proximity-game-clone/</a></p>
<p><span style="color:#ff6600;"> </span><span class="Apple-style-span" style="color:#999999;"># Keyword: simple SDL game, game  C/C++, game sederhana SDL, C/C++, puzzle.</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/offground.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/offground.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/offground.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/offground.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/offground.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/offground.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/offground.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/offground.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/offground.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/offground.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/offground.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/offground.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/offground.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/offground.wordpress.com/413/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=offground.wordpress.com&amp;blog=1172426&amp;post=413&amp;subd=offground&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://offground.wordpress.com/2011/07/18/post-code-proximity-game/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b767107f41c5ec1a9654ce44b65ef50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">oth3rside</media:title>
		</media:content>

		<media:content url="http://offground.files.wordpress.com/2011/07/proximity_mm_offground.png?w=300" medium="image">
			<media:title type="html">proximity_mm_offground</media:title>
		</media:content>

		<media:content url="http://offground.files.wordpress.com/2011/07/proximity_gameplay_offground.png?w=300" medium="image">
			<media:title type="html">proximity_gameplay_offground</media:title>
		</media:content>
	</item>
		<item>
		<title>L.O.S.T / Coldplay</title>
		<link>http://offground.wordpress.com/2011/06/10/l-o-s-t/</link>
		<comments>http://offground.wordpress.com/2011/06/10/l-o-s-t/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 16:26:00 +0000</pubDate>
		<dc:creator>oth3rside</dc:creator>
				<category><![CDATA[live]]></category>

		<guid isPermaLink="false">http://offground.wordpress.com/?p=407</guid>
		<description><![CDATA[Just because I'm losing Doesn't mean I'm lost Doesn't mean I'll stop Doesn't mean I would cross Just because I'm hurting Doesn't mean I'm hurt Doesn't mean I didn't get What I deserved No better and no worse I just got lost Every river that I tried to cross Every door I ever tried was [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=offground.wordpress.com&amp;blog=1172426&amp;post=407&amp;subd=offground&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre>Just because I'm losing
Doesn't mean I'm lost
Doesn't mean I'll stop
Doesn't mean I would cross

Just because I'm hurting
Doesn't mean I'm hurt
Doesn't mean I didn't get
What I deserved
No better and no worse

I just got lost
Every river that I tried to cross
Every door I ever tried was locked
Ohhh and I'm...
Just waiting 'til the shine wears off

You might be a big fish
In a little pond
Doesn't mean you've won
'Cause a long may come
A bigger one

And you'll be lost
Every river that you tried to cross
Every gun you ever held went off
Ohhh and I'm...
Just waiting until the firing stopped
Ohhh and I'm...
Just waiting 'til the shine wears off

Ohhh and I...
Just waiting 'til the shine wears off
Ohhh and I..
Just waiting 'til the shine wears off

Lyric: Lost / Coldplay</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/offground.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/offground.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/offground.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/offground.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/offground.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/offground.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/offground.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/offground.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/offground.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/offground.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/offground.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/offground.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/offground.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/offground.wordpress.com/407/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=offground.wordpress.com&amp;blog=1172426&amp;post=407&amp;subd=offground&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://offground.wordpress.com/2011/06/10/l-o-s-t/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b767107f41c5ec1a9654ce44b65ef50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">oth3rside</media:title>
		</media:content>
	</item>
	</channel>
</rss>
