<?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/"
	>

<channel>
	<title>CubaGames &#187; FlyGuy</title>
	<atom:link href="http://www.cubagames.com.br/category/flyguy/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cubagames.com.br</link>
	<description>Notícias sobre o mundo dos games, artigos sobre gamedev, reflexões, tutoriais, games e jogos online</description>
	<lastBuildDate>Wed, 01 Feb 2012 16:40:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Parabéns (totalmente atrasado)!</title>
		<link>http://www.cubagames.com.br/parabens-totalmente-atrasado/</link>
		<comments>http://www.cubagames.com.br/parabens-totalmente-atrasado/#comments</comments>
		<pubDate>Tue, 20 Nov 2007 14:36:48 +0000</pubDate>
		<dc:creator>Romulo De Lazzari</dc:creator>
				<category><![CDATA[CubaGames]]></category>
		<category><![CDATA[Flash - ActionScript]]></category>
		<category><![CDATA[FlyGuy]]></category>

		<guid isPermaLink="false">http://www.cubagames.com.br/parabens-totalmente-atrasado/</guid>
		<description><![CDATA[<p>O Guilherme está desenvolvendo <a href="http://www.cubagames.com.br/category/flyguy/">a série FlyGuy</a> faz um bom tempo e ela está tendo uma boa repercussão entre os leitores da CubaGames. O formato escolhido para os últimos posts feitos nesta série, vídeo-tutoriais, se encaixou perfeitamente para a finalidade real do post, ensinar noções de actionscript.</p>
<p>Eu gostaria de parabenizar o <a href="http://www.neyestrabelli.com/blog/">Ney Estrabelli</a> pelo <a href="http://pspframework.sourceforge.net/wordpress/2007/10/28/exemplo-flyguy/">excelente trabalho feito na versão do FlyGuy para PSP</a>, ficou muito legal! Assim como <a href="http://www.rodrigoflausino.com/blog/2007/11/17/serie-faca-o-seu-jogo-da-cubagames/">eu disse nos comentários do Flausino</a>: <em>&#8220;é muito gratificante saber que a CubaGames está se tornando uma referência legal na área de  desenvolvimento de jogos no Brasil&#8221;</em>.</p>
<p>O vídeo abaixo mostra o FlyGuy rodando no PSP. Parabéns Ney!</p>
<div class="wpv_videoc">
<div class="wpv_video"><object data="http://www.youtube.com/v/ROk-brtv-Jo" type="application/x-shockwave-flash" width="100%" height="100%"><param name="movie" value="http://www.youtube.com/v/ROk-brtv-Jo"></param></object></div>
</div>
]]></description>
		<wfw:commentRss>http://www.cubagames.com.br/parabens-totalmente-atrasado/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FlyGuy Parte 6 &#8211; Vôo</title>
		<link>http://www.cubagames.com.br/flyguy-parte-6-voo/</link>
		<comments>http://www.cubagames.com.br/flyguy-parte-6-voo/#comments</comments>
		<pubDate>Fri, 26 Oct 2007 21:25:03 +0000</pubDate>
		<dc:creator>Guilherme Moschen</dc:creator>
				<category><![CDATA[Desenvolvimento]]></category>
		<category><![CDATA[Flash - ActionScript]]></category>
		<category><![CDATA[FlyGuy]]></category>

		<guid isPermaLink="false">http://www.cubagames.com.br/flyguy-parte-6-voo/</guid>
		<description><![CDATA[<p>Dando continuidade a série FlyGuy, eu apresento agora a sexta parte série, o vôo.</p>
<p>Mantendo o formato do tutorial das duas últimas partes, eu apresento um <a href="http://www.vimeo.com/7844092" target="_blank">vídeo tutorial</a> desse módulo.<br />
Eu acredito que essa versão da minha explicação não ficou como esperado, mas acredito que já seja o suficiente pra dar início ao entendimento dessa parte.</p>
<p>Qualquer dúvida, ou sugestão, é só berrar.</p>
<p>Para efetuar o download dos fontes do projeto <a href="http://www.cubagames.com.br/exemplos/flyguy/parte6/parte6.zip" target="_blank">clique aqui</a> e para visualizar a nova versão do FlyGuy <a href="http://www.cubagames.com.br/exemplos/flyguy/parte6" target="_blank">clique aqui</a>.</p>
<p>Aquele abraço.</p>
]]></description>
		<wfw:commentRss>http://www.cubagames.com.br/flyguy-parte-6-voo/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>FlyGuy Parte 5 &#8211; Som</title>
		<link>http://www.cubagames.com.br/flyguy-parte-5-som/</link>
		<comments>http://www.cubagames.com.br/flyguy-parte-5-som/#comments</comments>
		<pubDate>Wed, 03 Oct 2007 16:25:30 +0000</pubDate>
		<dc:creator>Guilherme Moschen</dc:creator>
				<category><![CDATA[Desenvolvimento]]></category>
		<category><![CDATA[Flash - ActionScript]]></category>
		<category><![CDATA[FlyGuy]]></category>

		<guid isPermaLink="false">http://www.cubagames.com.br/flyguy-parte-5-som/</guid>
		<description><![CDATA[<p>Como prometido, agora eu abordarei a parte de som do FlyGuy. Novamente, eu fiz um vídeo tutorial para explicar e exemplificar a questão.</p>
<p><a href="http://www.vimeo.com/7843798">Vídeo FlyGuy Parte 5 &#8211; Som</a></p>
<p>Para acessar o exemplo do FlyGuy <a href="http://cubagames.com.br/exemplos/flyguy/parte5/" target="_blank">clique aqui</a>, para fazer download dos fontes <a href="http://cubagames.com.br/exemplos/flyguy/parte5/parte5.zip" target="_blank">clique aqui</a>.</p>
<p>Aquele abraço.</p>
]]></description>
		<wfw:commentRss>http://www.cubagames.com.br/flyguy-parte-5-som/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FlyGuy Parte 4 &#8211; Scroll</title>
		<link>http://www.cubagames.com.br/flyguy-parte-4-scroll/</link>
		<comments>http://www.cubagames.com.br/flyguy-parte-4-scroll/#comments</comments>
		<pubDate>Thu, 06 Sep 2007 04:40:56 +0000</pubDate>
		<dc:creator>Guilherme Moschen</dc:creator>
				<category><![CDATA[Desenvolvimento]]></category>
		<category><![CDATA[Flash - ActionScript]]></category>
		<category><![CDATA[FlyGuy]]></category>

		<guid isPermaLink="false">http://www.cubagames.com.br/flyguy-parte-4-scroll/</guid>
		<description><![CDATA[<p>Dando continuidade a série FlyGuy, eu fiz um vídeo tutorial demonstrando a funcionalidade scroll dos objetos da tela.</p>
<p>Esse foi o meu primeiro vídeo tutorial, eu sofri um pouco pra fazer. Sabe como que é, a falta de experiência é uma coisa terrível. Tanto é que quando eu digo 180, referente ao limite horizontal, entende-se 80.<br />
Infelizmente desta vez não será possível ver pelo site da CubaGames o vídeo. Prometo que da próxima vez será possível.</p>
<p><a href="http://www.vimeo.com/7843525">Vídeo FlyGuy Parte 4 &#8211; Scroll</a></p>
<p>Para acessar o exemplo do FlyGuy <a href="http://cubagames.com.br/exemplos/flyguy/parte4/" target="_blank">clique aqui</a>, para fazer download dos fontes <a href="http://cubagames.com.br/exemplos/flyguy/parte4/parte4.zip" target="_blank">clique aqui</a>.</p>
<p>Críticas ou  sugestões, os comentários estão aí pra isso mesmo.</p>
<p>Aquele abraço.</p>
]]></description>
		<wfw:commentRss>http://www.cubagames.com.br/flyguy-parte-4-scroll/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FlyGuy o Retorno – Parte 3</title>
		<link>http://www.cubagames.com.br/flyguy-o-retorno-%e2%80%93-parte-3/</link>
		<comments>http://www.cubagames.com.br/flyguy-o-retorno-%e2%80%93-parte-3/#comments</comments>
		<pubDate>Thu, 30 Aug 2007 03:48:43 +0000</pubDate>
		<dc:creator>Guilherme Moschen</dc:creator>
				<category><![CDATA[Desenvolvimento]]></category>
		<category><![CDATA[Flash - ActionScript]]></category>
		<category><![CDATA[FlyGuy]]></category>

		<guid isPermaLink="false">http://www.cubagames.com.br/flyguy-o-retorno-%e2%80%93-parte-3/</guid>
		<description><![CDATA[<p><a href="http://www.cubagames.com.br/eu-voltei/" target="_blank">Como prometido</a> e relembrado pela <a href="http://www.meiobit.com/destaque/entrevista_cuba_games">Fabiane,</a> a série FlyGuy voltou.<br />
Lembrando, agora ele será desenvolvido em AS3.</p>
<p>Primeiramente vamos relembrar aonde eu parei. No último post, eu mostrei como é simples o gerenciamento da animação de movimento do personagem principal. Afinal basta verificar quando os direcionais estão pressionados e dar play na animação e quando for o direcional esquerda, tem que inverter o MovieClip e dar o mesmo play. Isso para que o FlyGuy não imite o nosso querido Michael Jackson e ande de costas.<br />
Vamos ao código AS3:</p>
<div class="igBar"><span id="lactionscript-1"><a href="#" onclick="javascript:showPlainTxt('actionscript-1'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-1">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">package <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">ui</span>.<span style="color: #006600;">Keyboard</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">cubagames</span>.<span style="color: #006600;">flyguy</span>.<span style="color: #006600;">FlyGuy</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">cubagames</span>.<span style="color: #006600;">util</span>.<span style="color: #0066CC;">Key</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #0066CC;">extends</span> Sprite<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> POSICAO_PARA_ANDAR:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;color:#800000;">190</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> LARGURA = <span style="color: #cc66cc;color:#800000;">500</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> ALTURA = <span style="color: #cc66cc;color:#800000;">300</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> flyGuy:FlyGuy;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> rua:Rua;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Cria e configura o FlyGuy</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">flyGuy</span> = <span style="color: #000000; font-weight: bold;">new</span> FlyGuy<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">flyGuy</span>.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;color:#800000;">100</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">flyGuy</span>.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;color:#800000;">190</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Cria e configura a Rua</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">rua</span> = <span style="color: #000000; font-weight: bold;">new</span> Rua<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">rua</span>.<span style="color: #006600;">x</span> = -<span style="color: #cc66cc;color:#800000;">1021</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">rua</span>.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;color:#800000;">151</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Adiciona os MovieClips no contexto principal</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>rua<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>flyGuy<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Configura o Classe Key com o stage, que seria o container todo o swf. O nosso antigo _root</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">Key</span>.<span style="color: #006600;">initialize</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">stage</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Adiciona o evento</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">ENTER_FRAME</span>, <span style="color: #0066CC;">this</span>.<span style="color: #006600;">enterFrame</span> <span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> enterFrame<span style="color: #66cc66;">&#40;</span> event:Event <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">Key</span>.<span style="color: #0066CC;">isDown</span><span style="color: #66cc66;">&#40;</span>Keyboard.<span style="color: #0066CC;">LEFT</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">flyGuy</span>.<span style="color: #006600;">scaleX</span> = -<span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">abs</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">flyGuy</span>.<span style="color: #006600;">scaleX</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">flyGuy</span>.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">this</span>.<span style="color: #006600;">flyGuy</span>.<span style="color: #006600;">x</span>&gt;= <span style="color: #cc66cc;color:#800000;">80</span> <span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">flyGuy</span>.<span style="color: #006600;">x</span> -= FlyGuy.<span style="color: #006600;">VELOCIDADE_X</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">Key</span>.<span style="color: #0066CC;">isDown</span><span style="color: #66cc66;">&#40;</span>Keyboard.<span style="color: #0066CC;">RIGHT</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">flyGuy</span>.<span style="color: #006600;">scaleX</span> = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">abs</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">flyGuy</span>.<span style="color: #006600;">scaleX</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">flyGuy</span>.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">this</span>.<span style="color: #006600;">flyGuy</span>.<span style="color: #006600;">x</span> &lt;= <span style="color: #66cc66;">&#40;</span>Main.<span style="color: #006600;">LARGURA</span> - <span style="color: #cc66cc;color:#800000;">80</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">flyGuy</span>.<span style="color: #006600;">x</span> += FlyGuy.<span style="color: #006600;">VELOCIDADE_X</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">flyGuy</span>.<span style="color: #0066CC;">gotoAndStop</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">1</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Agora tudo é classe e tudo é orientado a objeto. Então temos a classe da nossa Sprite principal, o Main, temos a classe FlyGuy e temos a classe Key. O exemplo é bem simples como o post passado, porém agora o FlyGuy anda realmente. O scroll do cenário será implementado no próximo post.</p>
<p>Um ponto importante a ser notado é a classe Key. Eu tive que utilizá-la porque o Framework 3.0 do Flash não dá suporte ao método estático necessário. Ou seja, não existe alguém que possa te responder se uma tecla está sendo pressionada. A plataforma apenas avisa quando uma tecla é pressionada. O gerenciamento tem que ser feito na mão. Eu achei uma classe num <a href="http://board.flashkit.com/board/showthread.php?t=742726" target="_blank">blog gringo</a>, fiz algumas alterações necessárias e coloquei alguns comentários. E agora ela pertence ao Framework Flash da CubaGames.</p>
<p>O exemplo pode ser visto <a href="http://www.cubagames.com.br/exemplos/flyguy/parte3/" target="_blank">aqui</a> e baixado <a href="http://www.cubagames.com.br/exemplos/flyguy/parte3/parte3.zip">aqui</a>. Na próxima semana tem mais.</p>
<p>OBS: Utilizei o <a href="http://www.flashdevelop.org/" target="_blank">FlashDevelop</a> pra desenvolver, por enquanto estou gostando dele.</p>
<p>Aquele abraço!</p>
]]></description>
		<wfw:commentRss>http://www.cubagames.com.br/flyguy-o-retorno-%e2%80%93-parte-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fly Guy &#8211; Parte 2 &#8211; Primeiros Passos</title>
		<link>http://www.cubagames.com.br/fly-guy-parte-2-primeiros-passos/</link>
		<comments>http://www.cubagames.com.br/fly-guy-parte-2-primeiros-passos/#comments</comments>
		<pubDate>Wed, 14 Feb 2007 01:59:48 +0000</pubDate>
		<dc:creator>Guilherme Moschen</dc:creator>
				<category><![CDATA[Desenvolvimento]]></category>
		<category><![CDATA[Flash - ActionScript]]></category>
		<category><![CDATA[FlyGuy]]></category>

		<guid isPermaLink="false">http://www.cubagames.com.br/fly-guy-parte-2-primeiros-passos/</guid>
		<description><![CDATA[<p>Antes que vocês perguntem, eu respondo. Não, não estou fazendo o Fly Guy do zero.<br />
Primeiramente eu sou um mero programador, não farei as animações e as imagens. Pegarei pronto.<br />
<span style="font-weight: bold"> Como?</span></p>
<p>Existem softwares, como <a href="http://www.sothink.com/product/flashdecompiler/" target="_blank">SWF Decompiler</a>, que permitem a abertura de um arquivo SWF. Nesta abertura é possível pegar imagens, sprites, sons e até códigos.<br />
Até os códigos? Então assim até eu consigo fazer o Fly Guy!<br />
Muito bem campeão, mas as coisas não são tão simples assim.<br />
Ele até consegue recuperar uns ifs e whiles, não o faz fielmente. Quando você tenta fazer engenharia reversa de algum arquivo compilado, nunca fica como o original. Tente usar um java decompiler e veja o resultado, ou até mesmo um C/C++ decompiler. Sempre fica uma caca.<br />
E com toda essa bagunça, com o meu jeitão pró ativo e o meu orgulho chingado pelos meus sócios, acabo sempre fazendo as coisas. Ainda mais que o intuito dessa série de posts é passar de uma forma didática o Fly Guy a vocês.</p>
<p><span style="font-weight: bold"> Vamos lá!</span></p>
<p>Fiz um <a href="http://www.cubagames.com.br/exemplos/flyguy/parte2/" target="_blank">pequeno exemplinho</a> pra mostrar o Fly Guy andando.<br />
Claro, está sem classe alguma, sem modelagem nenhuma, é apenas uma demonstração separada do Fly Guy.<br />
Eu a coloquei aqui pra mostrar a simplicidade do código.</p>
<div class="igBar"><span id="lactionscript-2"><a href="#" onclick="javascript:showPlainTxt('actionscript-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-2">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">flyGuy.<span style="color: #0066CC;">onEnterFrame</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">Key</span>.<span style="color: #0066CC;">isDown</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Key</span>.<span style="color: #0066CC;">LEFT</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; flyGuy.<span style="color: #0066CC;">_xscale</span> = -<span style="color: #cc66cc;color:#800000;">100</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; flyGuy.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">Key</span>.<span style="color: #0066CC;">isDown</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Key</span>.<span style="color: #0066CC;">RIGHT</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; flyGuy.<span style="color: #0066CC;">_xscale</span> = <span style="color: #cc66cc;color:#800000;">100</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; flyGuy.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; flyGuy.<span style="color: #0066CC;">stop</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">flyGuy.<span style="color: #0066CC;">stop</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
O algoritmo é bem simples, como podem ver. O único mini segredo é o _xscale. Esse cara serve pra inverter horizontalmente um MovieClip. Eu fiz dessa maneira pra não ter que fazer uma animação invertida no MovieClip Fly Guy.</p>
<p>Para fazer download do fla, clique <a href="http://www.cubagames.com.br/exemplos/flyguy/parte2/FlyGuy.zip" target="_blank">aqui</a>.</p>
<p>Eu fiz uma versão com classes e tudo mais, mas prefiro aprimorá-la um pouco mais pra começar a falar sobre ela. Falarei no próximo post.</p>
<p>Aquele abraço.</p>
]]></description>
		<wfw:commentRss>http://www.cubagames.com.br/fly-guy-parte-2-primeiros-passos/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fly Guy &#8211; Parte 1 &#8211; Introdução</title>
		<link>http://www.cubagames.com.br/fly-guy-parte-1-introducao/</link>
		<comments>http://www.cubagames.com.br/fly-guy-parte-1-introducao/#comments</comments>
		<pubDate>Tue, 06 Feb 2007 00:28:54 +0000</pubDate>
		<dc:creator>Guilherme Moschen</dc:creator>
				<category><![CDATA[Desenvolvimento]]></category>
		<category><![CDATA[Flash - ActionScript]]></category>
		<category><![CDATA[FlyGuy]]></category>

		<guid isPermaLink="false">http://www.cubagames.com.br/fly-guy-parte-1-introducao/</guid>
		<description><![CDATA[<p>Começarei a postar uma vez por semana sobre o desenvolvimento do <a href="http://www.trevorvanmeter.com/flyguy/" target="_blank">Fly Guy</a>.<br />
Muito bem, chega papo, vamos pra prática. Espera!<br />
Antes de sair desenvolvendo feito um louco, precisamos entender o Fly Guy e saber como ele funciona.</p>
<p><img src="http://www.cubagames.com.br/wp-content/uploads/2007/02/flutuando.gif" style="float: right" id="image197" alt="flutuando.gif" /></p>
<p>Ao analisarmos, vemos um jogo em terceira pessoa, o qual o personagem principal se movimento de duas formas no cenário: andando e voando. O cenário é relativamente grande, tendo algumas divisões, tais como: chão, céu, espaço e fundo do mar. Existem vários personagens que podem, ou não, estarem se movimentando e podem, ou não, interagir, com o protagonista da do jogo. Alguns personagens depois de interagir com o Fly Guy mudam o seu estado, veja a mulher.</p>
<p><img src="http://www.cubagames.com.br/wp-content/uploads/2007/02/andando.gif" style="float: left" id="image198" alt="andando.gif" />Quando o Fly Guy se movimenta horizontalmente pelo cenário temos a sensação do infinito, pois não há um fim e sim uma repetição do cenário, isso ocorre com os personagens também.<br />
Percebemos que o Fly Guy ao chegar perto de determinado personagem que emitem som e o volume aumenta, ou diminui, dependendo da distância que o Fly Guy está do personagem. Para que o protagonista possa interagir com os coadjuvantes, ele precisa estar em pontos específicos do cenário para disparar a interação, animação.</p>
<p>Esse controle de cenário infinito é bem interessante, pois os personagens secundários também passeiam infinitamente pelo cenário e isso é esboçado de forma transparente ao usuário.<br />
Terei um grande trabalho pela frente, não pra fazer, mas sim para conseguir explicar tudo de uma forma sucinta a todos.</p>
<p>Aquele abraço.</p>
]]></description>
		<wfw:commentRss>http://www.cubagames.com.br/fly-guy-parte-1-introducao/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

