terça-feira, 27 de dezembro de 2011

Who said developers can`t draw?

When you`re indie or in short of good designers or both you start to get your drawings done yourself or by another developer or non-designer role in the team (if there is any team), but you always say ok it`s good enough this way but the truth is that the art bad, really bad...
That happens because most of us don`t improve our arts skills or at least don`t try a little bit harder.

"SpriteAttack" on 2D Game Art For Programmers from a artist try to lead us in the right tracks. Bellow are two images that I made based on his tutorials.

Before you leave this post download Inkscape, its the software used in the tutorials, is supported in Windows, Linux and Mac OS oh and is free (open source ;D)... Is very easy to use, better than gimp in my opinion and for those who are used to Illustrator, Photoshop or Paint.NET is a even easier to work tool. Put it on your dev-tool-belt right away private!

Go on now and give it a try, the worst that can happen is having some fun.

quinta-feira, 22 de dezembro de 2011

First Game - Candypot! for Android

Hi everybody!

I coming here today not to put up my opinion or review a game, instead I'm here to show my first official game released: Candypot!

It's a casual jewel game, in our case candies made of fruits yummy!!!! It has lots of power up jewels, they are surprise (I won't spoil), it integrates with PlayPhone (which is our publisher), is hell of fun and it's free-to-play!!!

I worked on the Android version and we have a Facebook version too... can't confirm but I hope we can make an iOS version soon....

Hope you all enjoy it, please post as many comments as you like it I'll be glad to anwser ;D


quarta-feira, 2 de novembro de 2011

2ª Jornada Gamer

E ae galera!!!!

Trouxe mais um evento legal que me passaram, a 2ª Jornada Gamer que acontece em 26 de novembro aqui na PUC-SP....

O evento é gratuito e tem oficinas na parte da manhã e palestras de tarde, a limitação fica por conta do tamanho dos labs então esteja na porta esperando hein....

Além disso as presenças são notáveis de nossa pequena mas robusta indústria de games, como Webcore e Insolita....

Das 10 às 18 - 26 de novembro
PUC - SP Campus Marquês de Paranaguá Rua Marquês de Paranaguá, 111. Consolação. São Paulo – SP.

Dê uma passada no site para maiores infos....e vamos lotar o lugar!

Jornada Gamer

segunda-feira, 17 de outubro de 2011

SPJAM - Maratona de Dev de Game...YES!


Dessa vez o recado é expresso, vamos desenvolver games em 48h numa maratona frenética com companhias super legais, gente de todo tipo num ambiente pronto pra isso? 

Esse lugar é o SPJam, parecido com o Global Game Jam, mas aqui na nossa terra ... inscrevam suas equipes até 16 novembro, lembrando que valem jogos digitais, de tabuleiro, card e rpgs ;D


terça-feira, 27 de setembro de 2011

iOS Quick Tip - Turning Off Automatic Reference Counting aka ARC

When developing your new apps under the newest XCode beta with iOS 5 you`ll get the ARC as gift, ok not a full git YET, but still a powerful gift.
So the question(s) arises: "What to do with code that isn`t under ARC yet?", "Can I turn it off?", "Can I turn it off only in a few files?"

Easy now, that is not a big trouble, I do hope that Apple engineering team improve this but for now let`s stick with what we got.

Turning ARC off for a new project (XCode Preview 7 onward *we hope*)

This is the easiest way, when creating a new project just check/uncheck "Use Automatic Reference Counting"

Turning it off for a few files
I`m personally not a huge fan of compile parameters but at least we have then when nothing else help us.
So open your project and select your desired target. Then select Build Phases, expand Compile Sources. There you`ll find the files that XCode is compiling, select everyone that will not use ARC and hit "enter". In the white box type -fno-objc-arc and hit enter. Done!

That`s all we need to stop using ARC in some of our project files, and whenever you change your mind just remove the flag.

quarta-feira, 21 de setembro de 2011

Fabulosa ilustração do nosso amado Legend of Zelda

Vi no capinaremos

Apps for iOS - Jetpack Joyride

We are used to lots of apps every month but some times one or another really does all that "OMG THAT`S AWESOME!" and Jetpack Joyride from @halfbrick is exactly that kind of app. Congrats @halfbrick team, this is a great and inspiring job for us devs and gamers.

It`s as simple as a running game with a cool machine, rainbow, shark and other jetpacks, some machine to ride and lots of awesomeness. The game is very beautiful, his background goes fast backwards in parallax movement (different speed for each background layer) while you go forward flying or riding a hot machine. The characters have expressions in their movements, even being a little small, and the animations are smooth.

Its very easy to play, your only command is up and down holding or releasing the touch screen, if you catch a ride a nice machine will appear and touching transforms in the machine command. Besides the music and the sound effects are nice too, sometimes the music starts to repeat to much but you never get  tired of it since you probably will have breaks between one play round and another.

Oh and there is all those kick ass itens like dynamites, head starts, golden machines, new cloths and new jetpacks, and more. And if you get a special x coin you can spin the machine to get a prize after you die, sometimes you can revive others you`ll simply explode with bombs and get shot a little further in the level.

The screen video bellow show a friend o`mine playing on its ipod touch and the other video is the official trailer. The last message I have to give you all, if you play this you won`t stop playing....don`t say I didn`t warned you.

sábado, 17 de setembro de 2011

iOS Quick Tips - Flip Animation

Whenever you have views in your fancy applications you`re probably thinking about some animations to make navigation smoother between some screens or between views.
Let`s imagine that we are building a card based game and that at some point we want to touch the card and it`ll flip revealing it front side.

Start by creating a new project on xcode. File > New > New Project or simply command+shift+N.
Select single view application and click next. Fill the info in the next screen, don`t check anything and let iphone device selected.

Create two new files a view nib and a view controller named FlipAnimationCardView and FlipAnimationCardViewController.
After creating them open the nib and attach its file owner to our view controller and attach our root view to the view controller.
After it you can put two UIButton, make them fullscreen with different image in each one, them link them and its touch up actions to our view controller.
The video bellow show how to do these steps.

Now we can place our animation in action with onCardBackTouched and onCardFrontTouched.
UIView has a static methods for animation, we`ll use transitionWithView but you can play with animateWithDuration too.

In the code above we are saying to the UIView class that we want a transition using btnCardBack during 1.5 seconds and we are setting the animation to be a Flip From Right type and telling the UIView to animate it with a EaseInOut curve so it will be smooth. There are more options and you only need to separate the parameters with | so the function identify what it have to do.
During the animation we ask the view to change btnCardBack and btnCardFront alpha property to 0.0 and 1.0, so it will vanish from the screen showing the front part (btnCardFront).
Every property that can be animated and is inserted into animations block will be animated by the UIView method.

The code above only animate our back part of the card, how can we animate its front card at the same time so it will appear like we are really flipping it?

We need to add this second part, the same code but passing btnCardFront as the view to use in the transition.

From here you can insert this into onCardBackTouched and the result should be 

Before we go testing lets tie app delegate to our new view controller so it`ll appear when the app execute.

Your appdelegate.h should be like this

In the .m file your didFinishLaunching method should be similar to this

Now build your code and test it on the simulator, you will see the card flipping nice and smoothly, but when you touch it again nothing happens, why? Because we didn`t created any animation to make it flip back. To do this insert the following code into onCardFrontTouched

If you execute it at this stage you will see the card flip back after you see the front part, very nice and not so hard to do. This code we made works for both fullscreen and not-fullscreen cards, but there is a shortcut for fullscreen cards.

Change our touch actions code to be like this

Cleaner than before but doesn`t work for cards smaller than the screen the reason is that transitionFromView:toView: animate the view and its parent.

Now to the last golden egg, what if we want the card to flip automagically after some time? We have two options performSelector and NSTimer, the first one will call our method after a time delay the second is a timer that can be scheduled to happen and have a loop parameter.
They have its pros and cons and I`ll not discuss this right now and for this tip we will use performSelector.
I decided to use viewWillAppear, but you can call your performSelector or register your timer wherever you want.

Add viewWillAppear to you view controller or code the performSelector inside it passing onCardBackTouched as parameter

Build and play with it, you can go further and flip it back automagically, insert multiple cards, make a category helper class to call this code from a view instance or something similar, just have fun!

quinta-feira, 7 de julho de 2011

Competição E-games do Senac

 O e-games é um concurso cultural que promove o desenvolvimento de jogos eletrônicos (vulgo game para os íntimos) e está em sua 3º edição. Recomendo participar pela experiência, visibilidade e principalmente diversão.
Segue uma parte das regras de participação e os prêmios.

e-Games - Concurso de Desenvolvimento de Jogos Digitais do Senac São Paulo (3ª edição)
Mais informações do evento e todo o regulamento consta no site e-games
Poderão participar do e-Games pessoas físicas maiores de 14 (quatorze) anos, com cidadania brasileira e residentes em todo o território nacional, individualmente ou em equipes com até 3 (três) integrantes, com qualquer nível de escolaridade e atuando em qualquer área do conhecimento.

Os participantes devem concorrer com apenas 1 (uma) única inscrição e com jogos que ainda não concorreram ao e-Games em edições passadas. Os jogos e seus documentos auxiliares deverão ser desenvolvidos obrigatoriamente em língua portuguesa. Caso o participante tenha feito sua inscrição individualmente, não deverá também fazê-la como integrante de uma equipe e vice-versa.

A participação no e-Games deverá acontecer de acordo com as seguintes categorias:

5.1. Categoria Vídeo Game & PC
Os jogos desta categoria devem ser obrigatoriamente criados para rodar em uma das seguintes plataformas:

·         PC - Windows Vista
·         PC – Windows 7
·         Video Game - XBOX 360

Eles podem ser desenvolvidos utilizando qualquer tecnologia, como por exemplo:

·         XNA
·         C
·         C++
·         Flash
·         Java
·         Silverlight

5.2. Categoria Mobile
Os jogos desta categoria devem ser obrigatoriamente criados para rodar em uma das seguintes plataformas:

·         Mobile – Iphone
·         Mobile – Windows Mobile 6.5
·         Mobile – Windows Phone 7.0

Eles podem ser desenvolvidos utilizando qualquer tecnologia, como por exemplo:

·         XNA
·         C
·         C++
·         Flash
·         Java
·         Silverlight

5.3. Categoria Jogando na Nuvem
Para esta categoria os jogos podem ser criados em qualquer linguagem e podem rodar em qualquer plataforma. A única exigência é que o jogo tenha uma integração com Windows Azure, utilizando a plataforma de Nuvem da Microsoft, o que pode ou não contemplar SQL Azure.


1° lugar – Categoria Vídeo Game & PC
XBOX  360 
Troféu e-Games 2011

1º lugar – Categoria Mobile
 Ipad 2 
Troféu e-Games 2011

1º lugar – Categoria Jogando na Nuvem
XBOX com Kinect
Troféu e-Games 2011

2° e 3º lugares de todas as categorias
Troféu e-Games 2011
Livro da Editora Senac  

sexta-feira, 1 de julho de 2011

Bundler -> bad interpreter: No such file or directory

This is a very short post...I`m having some problems with ruby on rails environment and in the middle of one of thousands of cleanup tries I got the error bellow when trying to run bundle install command:

-bash: /Users/myself/.rvm/gems/ree-1.8.7-2011.03/bin/bundle: /Users/myself/.rvm/rubies/ruby-1.9.2-
p180/bin/ruby: bad interpreter: No such file or directory

After wandering in the internet I didn`t find a solution....so simply uninstalled bundler:
gem uninstall bundler (use sudo only if needed)

Now just install it back
gem install bundler

This solved bundler problem for me, the real cause is some misconfigured reference but I couldn`t find it, if you know a better solution or explanation please share it.

sexta-feira, 17 de junho de 2011

Using mercurial and bitbucket for projects

People tend to look for alternatives to SVN, MS Team Foundation Server, Git and others.

One option is a combo of mercurial and bitbucket. 
Why mercurial? Because is similar to git, is easy to use even in terminal and works in linux, mac and windows. Why BitBucket? Because its free source code hosting that works with mercurial, accept up to 5 members, has no limits of private and public repositories and no limit to its size.

What do you need on windows?
Install Mercurial (If you`re going to install Tortoise HG you don`t need to download Mercurial and THG alone, there is a package with both at mercurial`s page)
Install  TortoiseHG
Have any doubts on how to use? Access this manual http://tortoisehg.bitbucket.org/manual/0.9/explorer.html

What do you need on macosx?
Install Developer Tools (If you already have xcode don`t bother about this item)
Install Mercurial
Install MacHG
If you want another diff/merge application try DiffMerge

I didn`t have used it on linux yet but it shouldn`t be too dificult, if you did it please let me know so I can update this post, thanks.

What do you need to do on BitBucket?
Set up your account
Insert an ssh key, there is a excelente post at github that show how to do this -> GitHub Help

Any doubts? Send it to me or use stackoverflow!!

sábado, 28 de maio de 2011

50 coisas que aprendemos jogando videogame.

Não sei de onde meu amigo tirou isso mas é bem legal 

1. As tartarugas vermelhas são mais inteligentes (e perigosas) que as verdes.
2. Se você estiver dirigindo e vir um raio brilhante ou qualquer objeto estranho de cores chamativas e agradáveis, passe por cima, seu carro terá poderes especiais.
3. Atirar na cabeça é mais eficaz do que em qualquer outra parte do corpo.
4. Se você não tiver armas ou não souber dar socos, pule na cabeça do desgraçado.
5. Nem todas as caixas podem ser empurradas. Muito menos todas as portas podem ser abertas.
6. Só pise no acelerador quando o sinal abrir.
7. Jamais corra fora da pista.
8. Basta apertar “Start” e o tempo pára.
9. Em alguns casos, estrelas são mais importantes que moedas.
10. Não importa qual a distância que você esteja do gol, sempre chute da lateral.
11. Carrinho de lado não é falta.
12. Falta no goleiro leva à expulsão.
13. Golpes especiais, como saltar e dar um soco, fazem você perder vida (desde que você acerte o oponente).
14. Com socos e chutes, você quebra carros com mais facilidade do que usando barras de ferro.
15. Não importa o modelo. O carro azul corre mais.
16. Gol olímpico é mais fácil que gol de falta.
17. Nunca é a última fase.
18. Select é tão útil quanto o Scroll Lock ou um bloco amarelo com uma exclamação.
19. Um ataque de zumbis não é nada caso você tenha uma Glock com 10 balas e uma boa mira.
20. Às vezes, uma facada funciona melhor que um tiro.
21. A vida não tem continues infinitos.
22. “Winners don’t use drugs – William S. Sessions – FBI”.
23. Não importa qual o seu problema, ele pode ser resolvido com um lança chamas.
24. Ninjas sabem jogar golfe.
25. Você pode construir uma civilização somente com pedras, ouro e madeira.
26. Quando uma pessoa morre ela pisca até desaparecer.
27. Vampiros? Arrumem uma corrente.
28. Meia lua para frente + soco forte = algo interessante.
29. Paredes com rachaduras costumam guardar segredos.
30. Quanto maior o lutador, pior ele é.
31. O reforço sempre chega depois que você mata todo mundo
32. Nem tudo na vida é Save Game. Portanto, nunca deixe de anotar o password.
33. No final das contas, você se ferra para salvar o mundo ou uma mulher por que a gente nunca salva um homem? Mimimi
34. Dirigir pode ser muito mais interessante caso você esteja ouvindo “Highway Star”, “Paranoid” ou “Born to Be Wild”.
35. As melhores épocas de nossas vidas são as fases bônus.
36. PAC MAN nada mais é que correr atrás de balinhas enquanto se ouve uma música repetitiva. Ou seja, uma rave.
37. Você não precisa saber uma única nota musical para ser um astro do rock. Basta ter coordenação motora não consigo jogar Guitar Hero...
38. Paradas para abastecer o carro ou o avião atrapalham muito deixa cair, sempre tem um checkpoint.
39. Nem todas as caixas de madeira são quebráveis. Só as mais brilhantes.
40. Barris explosivos são muito bons para matar um grande grupo de pessoas. Basta um tiro certeiro.
41. Nem todos os canos verdes o levam até o esgoto.
42. Não existem castelos sem lava.
43. Quase todos os heróis começam a vida deitados numa cama.
44. Pouco me importa se não adianta nada. Morreremos apertando Start para a introdução passar mais rapidamente.
45. As chaves podem ser do seu tamanho, ou maior, você achará um lugar para guardá-las eu até ia comentar algo sobre isso, mas achei melhor poupar vocês da bagaça.
46. Correr no gelo escorrega. Muito.
47. Nem todos os rios estão para nado.
48. Comidas costumam te encher de vida.
49. Seu carro capotou, saiu da pista e explodiu? Ok, aguarde um instante que ele vai voltar piscando.
50. Cogumelos verdes. Não morra antes de provar pelo menos um. 

sexta-feira, 27 de maio de 2011

I want to use Lua....but what about the IDE?

I think that the title said it all, you look to Lua as a good language to create whatever you're planning to, but then you face a neat problem: The IDE.
This post is dedicated to Lua devs and game devs, specially those that decided to use Corona SDK as an application platform (more game SDK than app SDK).

The steps to follow are:

  1. Download and install IntelliJ Community Edition or pay for other versions (is not really necessary if you don't really need) from here http://www.jetbrains.com/idea/download/index.html
  2. Download Lua plugin for IntelliJ here http://plugins.intellij.net/plugin/?idea_ce&id=5055
  3. Now unzip Lua plugin and copy IDLua folder to intelliJ's plugin folder in a path like this C:\Program Files (x86)\IntelliJ IDEA Community Edition 10.5\plugins (is very likely that your folder path is another one)
  4. Open IntelliJ and access Settings in the file menu or type Ctrl+Alt+S. In IDE Settings section you'll see the Plugins area, click it and check if Lua is listed on the right panel. If isn't appearing there try to install trough available list or follow this tutorial https://bitbucket.org/sylvanaar2/lua-for-idea/wiki/Home
  5. Hey its done!!! When you start project creation you'll see Lua option in the list...
Now for Corona SDK
  1. Download the Corona SDK for IntelliJ here https://bitbucket.org/sylvanaar2/idlua-sdk-corona/wiki/Home
  2. Unzip the package into a fixed place, this means that this folder (Corona SDK for IntelliJ) must remain there as long as you're using it with the IDE
  3. After creating the project you will work into select project's root and type F4 to access project structure.
  4. Here click in SDKs in Platform Settings section and in Lua sdk add a new Classpath, in this case the path to your Corona SDK fixed folder.
  5. Ready to rumble!!! Now you have intellisense for Corona code and the documentation (type ctrl+q to access it)
Note: You must add SDK's and API's in every project you need them.

If you have any problems adding sdk's and api's follow the tutorials bellow or email me: vitor dot navarro87 at gmail dot com 

domingo, 8 de maio de 2011

Quick Tips - IOS Dev - Documentation Shortcut

This tip was given me by @marcolindoso, one of my co-workers and friend at Parsec Digital.

Most of the times Apple documentation is very useful but we have to copy the code and go to google or the Apple site, so instead of doing this we can use xcode sdk docs. Ok nice idea but the shortcut its too dificult to remember or even to guess if you don't look for it in preferences.

So let's change this:
With XCode opened enter in Preferences (Type: command + ,)
Open key bindings and type "Documentation" in the search field, now you gonna see a list and in that list is the key binding "Search Documentation for Selected Text", select it and type enter
When the key binding open for editing input command + D

Done, now you have easy to remember shortcut for documentation access, to use it put your cursor over any piece of apple documented code and use the shortcut.

Happy coding....

segunda-feira, 2 de maio de 2011

Quick Tip - IOS DEV - UIColor

This is a good fast tip for ios newbies (like me)....I was trying to use UIColor to create a color with RGB values like this:

But this natural approach is wrong and if you read Apple class reference here (as I did) you probably will realize that each color must be between 0 and 1....what a damn confusion uh Apple...

For those that didn't realize it before just divide it by 255 and everything goes well:

That's it folks!!!

sábado, 30 de abril de 2011

More pixel Art!!!!

The guys from Contra 4 Team made this awesome Thor pixel art sheet that is usually used to make games and also this can be a preview of a possible thor game...or is just a very cool pixel art.

Like Vikings? Like Trampolines?

What happens when you put together the coolest of the warriors: Vikings with something everyone wants to try once in life: Trampolines?
I didn't know until D-Pad Studio announced Viking on Trampolines. It's a well polished pixelated game, with beautiful images and nice music at least that is what it appears to be in the following trailer: Furthermore there is a 4 players multiplayer match hell yeah!!!! And there will be different civilizations (for those of you that dislike vikings...) and a 1p campaign too....wow this will be good.

Hey D-Pad Studios launch this game soon please because we are so eager to play it....(I am and the rest of you probably are going to be too)

sexta-feira, 29 de abril de 2011

How an android looks like in the inside...

This cool image shows an Android robot inside..... hey there is a hearth and a donut stash over there!!!!

Cordy - Android Game

The video below shows  Cordy, an cute 3D adventure game for Android....
I downloaded it last night and right away got addicted to its image and game play, worth the download since it is FREE, yeah F-R-E-E.

By the way Cordy is the best free game I got since I bought my Moto Defy with Android 2.1, oh and runs very well, with some lags but is ok.

Hope they think about bringing this to the iphone/ipad too....

Enjoy the video

And some images...

The games was made by Silver Tree Media and both the company and Cordy deserve our attention...

segunda-feira, 18 de abril de 2011

Pixel Art

This is my first pixel art and behind is Derek Yu's tutorial. I have a lot to improve since I'm not a designer but maybe I'll try some more, what do guys think?

domingo, 17 de abril de 2011

NDS and its final jewels - Monster Tale

Everybody knows by now that nds is exchanged by Nintendo 3DS, but many of us, gamers or not, are still playing and will still gonna play even after his "official death".

The good part is that is in these times that we start to find some jewels amongst the main games and one of these is Monster Tale from Majesco/DreamRift.

The game has a simple history nothing to much refined but still holds you into it, nice colorful graphics and its gameplay is a mix of pokemon and castlevania. Why would you ask, because you play with a little girl lost in the monsters world that find a companion monster wich can evolute in different forms and both of them have a bunch of skills....

The music sometimes is repetitive but the fun factor and all those monster evolutions will make you want to play it to the end...
This jewel deserver to be in nds final play list, if you want to see more access the official website, but go directly to screenshots and video because other areas spoil good things about the game....don't say I didn't warned you all...

sábado, 9 de abril de 2011

Alice Madness Returns - This is Madness!!!!

Alice in wonderland is a history that most consider a child classic, but some years ago Eletronic Arts produced American McGee's Alice which was the first Alice adventure outside it's cute world to a darker version of the history...I'm not going to tell all the details but the thing is that EA guys are bringing us Alice Madness Returns the sequel of the previous game.

What do you think....does this alice seems much more fun than the original one? Via kotaku us

sábado, 12 de março de 2011

Lua engines for games development

Today I just started my post graduation (please tell me which is the correct term in english for a specialists after the graduation course that is not a master degree =D) and I saw one really good 3D engine with lua: Shiva from StoneTrip Oh the free version has lots of features almost all of the pay features are in the free version too, for lone wolves or small start up teams seems to be a good option. Then I remembered Love, another engine but a 2D, a good one =D also written in Lua. I know that this turn I'm not posting how to use them but at least is a start to know what is out there in the world for programming good games =D. Oh and just to a small note Lua is a brazilian programming language and I'm happy to say that is better than some crappy things we see out there =D

domingo, 20 de fevereiro de 2011

XNA Adventures: Building a Sprite Class

Hi everybody!
After some time playing with XNA I decided to start spreading what I know so others don't need to suffer in some problems and can enjoy as much or even more than I'm enjoying play with it.
In this first tutorial I'll show you something very basic that is a simple base Sprite class that you can expand or use in any project (I'll use it in my next tutorial to show 2D animation).

Visual Studio 2010 or 2008; (I'm using VS2010)
XNA 4.0 or 3.x; (I'm using 4.0 so somethings might need changes, just ask me if you got any problems ok?)
Start by creating a new windows game project in visual studio then create a new class named Sprite. This class will be the base for any sprite (i.e. char sprite, life sprite, background and so on) that you create so don't add any specific logic here.

A sprite needs a texture (the image), a position, a size, a scale and his asset name. Let's add them as attributes

The properties are now in their place but we don't set any of them, we're going to do this using two methods: Rescale and LoadContent
-Rescale: This method will verify if the texture exists and then will rescale the image trough Size property; -LoadContent: This method will load our texture and rescale the image properly calling Rescale.

Ok almost there, we just need to draw our sprite and update it so it'll be prepared to future movement input.
To achieve that we will add two drawing methods and one update method.
-Draw: Use a SpriteBatch.Draw method to draw our texture in the screen;
-Update: Change position using sprite speed and direction and the game time.
The drawing method should be like this

Basically the parameters we're passing to SpriteBatch.Draw are:
-Texture: _spriteTexture;
-Position: Position;
-SourceRectangle: sourceRectangle; This represents the area of your image that actually will be draw to the screen, everything that is not inside this rectangle will be ignored.
-Color: Color.White; This is the a color to tint your sprite. Use white if you don't want to add any color layer to your image.
-Rotation: 0.0f;
-Origin:Your sprite origin, in this case it will be upper-left corner (0,0).
-SpriteEffects: flip your image here or use none;
-LayerDepth: xna draw textures in layers, use 0 so xna organize the layers or specify a number to set your texture layer;
To finish our Sprite class we only need an update method

From here you can change and adapt it as you desire.
If you just want to test it go on and change your Game class with the following code

That's it guys!

sábado, 5 de fevereiro de 2011

Before starting to code for Android

So many people asked me "what is needed to start creating apps for Android?" that I decided to make a small guide here to help you in this awesome quest. First of all download the following:
Now start by installing JDK package, if you already have be sure that it's updated to version 5 or 6.
Then extract the sdk zip file in an easy to find folder. Do the same for eclipse but in another folder.
Now I'll try to make this easy so follow the image:
  • Click in Install New Software on Help;

  • Wait for it to update and select Developer Tools. Now you see the installation list, read the license agreements (accept it otherwise you can't install anything :P);
  • Reestart Eclipse. 

In the future when you need to update your SDK, simply repeat the steps above, just skip the Software Site adding.

To complete the SDK installation  we need a few final steps.

  • Open Eclipse, if isn't already opened, click on Window > Android SDK and AVD Manager. The manager gives you the capability of controlling your virtual devices (like iphone simulator), your installed packages and install the availables packages. 

  • After that your gonna select available packages > select all of android packages (if you want to select the third party packages is ok but will take longer to download). 

  • Click in install selected and go drink some juice. 

The installation is completed but we're not there yet, there's still the AVD to configure.
Access the Android SDK and AVD Manager again, once there click on Virtual Devices > New, the window bellow should appear. Fill the information and click  in Create AVD.

Name -> A name for your virtual device;
Target -> Which version of the Android OS the device will simulate;
SD Card -> If you need it fill the size or use a file (a .iso file);
Snapshot -> Check this if you want to save state. The same as vmware/sun virtualbox snapshot;
Skin -> Specify the resolution, I often use built-in;
Hardware -> Set your hardware needs. Like GPS and Track ball for example.

Good to go guys!!! Have fun... Any problems, doubts, sugestions plz let me know. Oh almost forgot the reference: Android Development Site


If anything goes wrong check if the SDK folder is set in preferences. Access Preferences on Window and you should see the image bellow. Select Android and then browse the SDK location

quinta-feira, 13 de janeiro de 2011

Coding what? Coding Dojo!!!

Since I started to participate in py dojo people I invited have been asking me what is a coding dojo? In the beginning I didn't have the right awnser  to this question but as I went trough the dojos this awnser became more clear in my mind.

The awnser to the question: What is a Coding Dojo?

Basically a coding dojo is a meeting of developers group where they solve problems together in an specific language. Is good to remember that the type of dojo I'm describing here is non-competitive and fun where any level of skill is permitted, as far as I know there are other type of dojos with different focus.

The objectives are: of course have fun; improve your skills in the language used, your team work and your brainskills to solve problems (normally they are quite challenging).

Ok then, but what is needed for a coding dojo? The minimum requirements are an PC or Laptop, a local for the meeting, a projector and a minimum of one developer with great knowledge for being the guru.

The master is the guy that guides the dojo and guides the group in moments of doubt about the language.

How the dojo is organized

Now we already know what it is and what is needed. The next step is the execution, it happens more or less like this:
  • 20 min for choosing the problem and the initial approach.
  • a quick lunch, like 10 min or less (is easier to think after you eat).
  • First part with a real action, 1st hour coding.
  • another quick lunch, more 10 min or less (just to take a breath, sometimes the group solved the first challenge at this point).
  • Second part with more real action, 40 min or so coding.
  • After finishing we do a quick retrospective about the session with the good and bad things. The tip here is to use a board and put post-its with + and - signs, people tend to feel more confortable writting than talking.

How to the code the code

The meeting is organized but how we're supposed to code is not. If my memories are ok at the dojo I'm participating we use Randori Kata which is a way of saying how things happen.
  • The problem is solved in pairs, like extreme programming, a driver and a copilot.
  • Everyone is invited to help on the right time (I'm going to get the list of rules and update here).
  • Each pair has a timebox to advance, 7 min works for us.
  • Use TDD and BabySteps, is hard I know but you'll have to give your best.
  • Every time a timebox ends the driver gives his place to the copilot and another person takes place as the new copilot.
Things that worked for us

Add a white board and post-its as requirements. The white board is used to solve the problem, remember the problem, to place the rules of the dojo and for the retrospective time when we place the posts-its with good and bad things.

Try to change where the meeting occurs, like three weeks in one company, other three in an university and so on. This is good for seeing new places and new people.

Also try to change the days of the week it occurs, one week on monday the other on wednesday and so on. This helps newcomers and members being more constant.

My vision

All this explanation and I didn't mention a single word about what I think. For me the dojo exercise/teach us some important points:
  • Problems are not always only a matter of language.
  • Playing as a team is important, but think as one is a learning process.
  • TDD, boy this skills is fun and good but hell is dificult to get used to.
  • You're not alone in the world, the exchange of knowledge is a must have, exercise it! (is good to meet new people)
  • Attention, if you don't pay attention you'll loose yourself in the process.
  • Oh and I can't forget the fact that we are increasing our skills in the choosen language.
  • Having fun!!!
These are just a few reasons for participating of a coding dojo, pick one and happy coding.
To end I must thanks Rodolpho and Chester for leading such a great group of python coding dojo at São Paulo, Brazil.

Welcome to Windows JRuby!!!! Painless Ruby in Windows????

I read an interesting and funny post about JRuby on Windows and an appeal to Ruby community to make nicer to develop Ruby programs in Windows.

The best thing about this post is the fact that he was originated from a member of the community, Engine Yard. Why this is so nice? I guess its because we devs should worry about creating a program in Ruby not in buying the best hardware to program into it.

I really hope that Ruby grows in such way that Windows market share turns a natural part of its actual market share. The painless part about Ruby, in this case JRuby, in Windows is not needing any pre-reqs installed, just run JRuby installer and go rocking the world creating Rails applications or Ruby GUI applications immediately, awesome isn't it?

domingo, 9 de janeiro de 2011

CES 2011 - Technology Rocking the House

I was looking for CES news at CNET,Engadget and Gizmodo US and found lots of interesting things, but specially I wanted to show here two of them. This awesome robot from DreamBots that does massage on us and his name is WheeMee.
The other one is the list with CES best tablets until the moment by Gizmodo. I'm not copying all the info from there but I can say that my choices are Xoom and PlayBook, yeah they are both the top ones in the list but they are really good candidates to be the ones to compete with IPad. Xoom by Motorola
Playbook by BlackBerry
Doesn't matter if you're liking or hating CES we have all to agree that technology industry have really good surprises for 2011. Let them come!!!!