quarta-feira, 14 de janeiro de 2015

[QuickTips] Git Ignore....

This is going to be a blazing fast tip. We all have had problems with .gitignore files not being properly setup or not being the way we wanted them to be.

Along with that comes the fact that we maintain lots of notes about each technology we use to determine how the file should be filled.

But then there is those kind-hearted souls who decided to give us a boost

First I wanted to reference the github repository named gitignore containing templates like Objective-C.gitignore and VisualStudio.gitignore and many more.

Last but not least is the site that remembers Google, just a search field and a click of distance to access lots of .gitignore templates: gitignore.io.

That's it for now, enjoy a new world without the troubles of those lovely files.

sexta-feira, 14 de novembro de 2014

[Quicktips] Tools for web dev - curl e hurl.it

Often developers ask others about tools to solve or help solving problems of all kinds and sizes.

When it comes to restful API's we have one (amongst others) annoying problem: testing the endpoints.

So how do you do this? Not all API's have tools made by their teams to test them.  The same is true for your own one.

And here goes a tip, two tools to help you, the first one your computer probably has one, the second one is a web tool.

Curl

It's a terminal tool  for transferring data with URL syntax in different protocols with a myriad of options, open your terminal and type curl -h to see the magic.

Why is it here? Why is it good?


  • Easy to use
  • Json friendly
  • Command line tool!
Why not?
  • May become cumbersome to type
  • Not any user friendly

Hurl.it

A free HTTP request tool, similar to curl but works in the browser.

Why is it good?
  • User friendly
  • Free
  • Works in the browser
 Why not?
  • Web only
  • HTTP only
Check it here

segunda-feira, 29 de setembro de 2014

[iOS Quicktips] Transparency error on iTunes

Apple normaly gets things right about improving their hardware and software, but in regards of devs support some times things don't go quite well.

One of this samples is the last iTunes Connect update (Xcode 6 / iOS 8  in 2014) which changed something on how they expect your images to be uploaded and made a bunch of us quite sad.

If you have the same problema as me you were receiving this message: "Images can't contain alpha channels or transparencies."

By the time this problem came to me the design team have already tried almost everything they could think of, and I went to a simple path of looking in the net one last time.

So I got to this  stackoverflow post, and Smikey anwser solved my problem.

He simply suggests that we re-export the asset using Preview with Alpha option unchecked. By the way we were using a .png image.
Thats it problem solved.

Hope this help you ;)

sábado, 2 de agosto de 2014

[Quicktips] iOS - Follow Keyboard Animation Behaviour

On getting back to iOS programming I restarted to check into interesting subjects, like the right way of creating view controllers, behaviours and more.

One thing I had to create these last days was some code for a text field to follow the keyboard open/close animation. Then it come to me that we were going to use that behaviour was needed in more places and that it didn't belong to the view controller neither to the view using it.

So in order to achieve that I decided to create a behaviour class which features are:
  • To receive a target view
  • Register under keyboard events
  • Animate the target view to follow the keyboard open/close animation
  • Keep target view before (on top) of keyboard, meaning that target will be hidden when keyboard is closed
This set of features don't break the single responsibility principle since it is responsible only for controlling the animation behaviour of a view following the iOS keyboard.

To achieve our desire the class must subscribe to keyboard notifications and follow keyboard info dictionary in order to animate the same way the keyboard does.



In 1. we retrieve the type of animation, the duration and the final position of the keyboard. The problem with the animation type is that Apple uses a internal value which only works directly with the old animation style.
To use it with animationWithDuration methods we would have to shift the value, this isn't easy to understand and read later so is preferable to keep the old style in this case.

In 2. we use the animation calls on UIView to prepare animation with keyboard info.

In 3. we animate using the keyboard final position, in my case I'm positioning the view right above keyboard, and when dismissed the view will be hidden outside of the screen in the bottom. Also we have to commitAnimations so evertyhing will work properly.

That is all we need to create a behaviour that works with any view.

The class and the demo are available on github.



segunda-feira, 14 de abril de 2014

A few things I've learned with Ruby and Rails

The past 3 months have been a heavy storm with hail rain and everything, still there is always a bright side on life events.

During my last job at Code Miner I had the pleasure to work with:
  • Ruby on Rails (and the huge amount of things that come along with it)
  • Good professionals
This short time lead me to decide to share my small knowledge with the others that may struggle, like I did at some points. 

So first things first: Ruby on Rails. This pack made it appearance several times in all those years and deserves a cool place in things you would like to learn or at least should learn.

The Ruby and the Rails community, along with my teammates, taught me lots of new skills and improved old ones, so let's get to the sweeties.

1 - Debug, debug... and.... did I said debug?

The most important thing to learn when programming in any language is how to debug your code. Ruby has this quite good Gem to help you: pry

All you have to do to use it is requiring: require 'pry' then you add binding.pry anywhere on your code and ta-da! when you run your app it will stop at that command and from this time on there is access to code variables, next steps and a few more useful things (take a look at github)

2 - My precious! My gems, gollum gollum

You probably already heard that cliche line: Don't reinvent the wheel.

Ruby has those precious libraries of working software called Gems. 
Need something to debug your code? Bam: Pry gem. 
Need something to parse xml? Boom: Nokogiri gem.
Need some background processing? Pow: Sidekiq gem.
Need your sidekiq jobs to be scheduled? Bang: Sidetiq gem.

There is a huge sort of gems sitting there just waiting to help in solving pesky problems so you can focus on creating an awesome app. Oh and there is a lot of them dedicated directly to Rails like the famous ActiveAdmin.

Ruby Toolbox and Ruby Gems may help you finding the ones you need.

3 - Did you saw that bug?

Sadly Test Driven Development (TDD) isn't used as much as it should be and  I can understand that. 

Most of  the non TDD teams have lots of excuses but almost none of them spent or want to spend enough time using it, otherwise they would see how beautiful and useful it is.

TDD has proven worthy to me after much struggling still with objective-c in iOS world, which community is not so visibly into it. 

Here is 4 reasons why I love it:

1. Bugs reduction and faster bug finding:

The first happens because you're thinking ahead, you need a way to check your code output even before it exists. The later happens because when changes are made you know what is the desired output.

2. Improves code readability and quality

It's hard to believe, but you tend to be more careful with what you're writing since you and others will be getting back to the tests a thousand of times. 

Since you're being more careful with the code it's architecture will receive a boost, be prepared to read tons of articles/book on the subject.

3.  Changes the way you see refactoring

You start to hate when its difficult to test your code, and that will be more often than you think. Refactoring begins to be more clear and this feeling fades away  before you know.

Besides with a good testing suite refactoring  will be easier and delightful.

4. Working in teams is nicer

Hey have you never hated that hard to use friend's code? Now if you have tests you probably will just have to run them a few times and there you go. 

4. Everyone loves free candies, but do you give them too?

This one is short, we all love to use open source projects (yep Gems for example), but most of us don't have the guts to contribute.

Hey no one will shove you off if you're really helping, just give it a try. Oh and those beautiful projects of yours, release them properly as Open Source too, who knows, maybe you get some katas for that attitude.

I didn't learned this here with Ruby, but this feeling is stronger amongst its community.

This absolutely isn't all the things I wanted to share, there is more, but I think this is enough to my purpose, to give you a glimpse of the good things from the many which will improve yourself as a programmer when you enter, even for a moment, in the Ruby and Rails world.

By the way, I can't address how fulfilling is working with a great team, so if you have the chance of doing this please just go for it.

sexta-feira, 14 de fevereiro de 2014

[Ruby] Using gzip with string

Gzipping a string is quite straight forward once you know how to do it, so to help myself and others in the future I'm making a note here.



I'm not doing anything new or fancy here but I guess someone have to let some bread crumbles in the way.

terça-feira, 27 de agosto de 2013

[QuickTip] SublimeText Build System for Love2D

For those using Love2D as game engine and SublimeText2 as IDE this *.sublime-build can come handy if you want to rapidly generate *.love file for testing. (using command+B in mac for instance)

{ "cmd": ["zip -9 -r --exclude=.love game.love .; ls"], "selector": "source.lua.love", "shell": true }

This will generate a game.love inside your current folder excluding the .love files itself, also will show on SublimeText shell the output of the command.

By the way, if you want to run .love in the sequence just use the following

{ "cmd": ["zip -9 -r --exclude=.love game.love .; ls; /Applications/love.app/Contents/MacOS/love game.love"], "selector": "source.lua.love", "shell": true }
CMD receives a string used in terminal so using: /pathToLoveExecutable name.love; Will call the love executable as you would do in Terminal. 

And that should do the trick ;)

terça-feira, 16 de julho de 2013

Signing your TAG with Git - MacOSX

Recently I was asked to start versioning our master with tags and while doing some research about it I found a relevant blog post from Mike Gerwitz Git Horror Story about signing git commits.

I won't get inside the subject but I think signing at least your tags is a good initial step towards security.

In this guide you will:
- Install GPG (Gnu Privacy Guard)
- Create a signed key
- Create a signed tag
- Push tag to git server

You should already have git installed, of course.

So let's get started.

Installing MacGPG


You should follow MacGPG instructions at MacGPG at Sourceforge

Or if you like tools that solves your problems hidding the neat part use GPG Tools, altough I personally didn't test it.

Creating a signed key

Before we can really use tag command we must create a key, in a similar way that we do when using ssh private keys for GitHub.

In a terminal use:
gpg --gen-key
The terminal should ask you to select your key type like this:
Please select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
Your selection?
The default selection is prefered in this case, unless you REALLY KNOWS why you would want to choose other options.

Next he asks you to choose a size:
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048)
I guess 2048 is good enough for me, pick a size you need.

Now it will asks for an expire date, even if you have really strong reasons for not setting an expire date THINK AGAIN.
Please specify how long the key should be valid.
0 = key does not expire
= key expires in n daysw = key expires in n weeksm = key expires in n monthsy = key expires in n years Key is valid for? (0)
On this step you need to use your REAL information: name, email and passphrase. A comment can be inserted also, but isn't required (I recommend using it to differ this key amongst other keys).

You need a user ID to identify your key; the software constructs the user ID from the Real Name, Comment and Email Address in this form: "Heinrich Heine (Der Dichter) <heinrichh@duesseldorf.de="">

Type O when you have finished and the terminal will prompt for a passphrase
And you're done for this step, let's create some tags.

Type O when you have finished and the terminal will prompt for a passphrase

And you're done for this step, let's create some tags.

Creating Tags with Git

I won't go in deep details about git tags, so if you want to read some about the subject first this is the right place: Git Basics Tagging

First you should get your key identifier, run the following command

gpg --list-secret-keys
This should print anything similar to:
sec 2048R/8EE30EAB 2013-07-16 [expires: 2015-07-16] uid Name (Comment) <youremail@email.com=""> ssb 2048R/hexvalueB 2013-07-16
Copy the 8EE30EAB from sec (yours probably is different)

Go to your repository folder on terminal and config git to use this key (remove the --global param to apply only for current repository)

git config --global user.signingkey 8EE30EAB
Finally create the tag
git tag -s v1.5 -m 'my signed 1.5 tag'
Show it with
git show v1.5
Push it with
git push origin v1.5
If you have more than one tag you can use
git push origin --tags
And that's it. If you have any problems leave it on comments I'll be glad to help if I can.

sexta-feira, 15 de fevereiro de 2013

[iOS] Using UIRefreshControl

In iOS 6 Apple presented us the UIRefreshControl to use with "Pull to Refresh" actions. This control is really easy to use and can be currently used with UITableView, UIScrollView and UICollectionView.

On your -(void)viewDidLoad method or the place where your controller will load for the first time, create and add the refresh control as a subview of the views mentioned above.





The next step is to create the refreshView method, just add it anywhere on your view controller.




That is it, nice and smooth.


quinta-feira, 10 de janeiro de 2013

[Rails] Feedzirra and custom fields

When we read RSS on any programming language normally only the default fields are necessary, but sometimes a comment page link, a subtitle or other important info is stored into custom fields.

I was working with Rails and Feedzirra when this problem appeared to me and with the example+solution below I hope other people don't have to struggle much on this.



For a common rss you would use


And now the magic line to register article:subtitle...


So the final code should be



You can even map to field to same single resulting field, when you have two different sources with different subtitle fields for instance.



That solves the issue

sexta-feira, 14 de dezembro de 2012

Instalando PostgreSQL no Mountain Lion

Antes de tentar instalar o postegres eu recomendo tentar o postgresapp, rápido e fácil.

Documentação: http://postgresapp.com/documentation

Agora se você mesmo assim quiser instalar direto na máquina

Pré-requisitos:
Homebrew

No terminal rode uma linha por vez:
- brew install postgresql
- initdb /usr/local/var/postgres -E utf8
- mkdir -p /Library/LaunchAgents
- cp /usr/local/Cellar/postgresql/%versãodopostgresql%/homebrew.mxcl.postgresql.plist /Library/LaunchAgents/ launchctl load -w /Library/LaunchAgents/homebrew.mxcl.postgresql.plist
Obs: substitua %versãodopostgresql% pela versão utilizada, ex: 9.2.2

Se o brew cuspir um erro de syslink como por exemplo esse:
Error: Could not symlink file: /usr/local/Cellar/postgresql/9.2.2/share/doc/postgresql /usr/local/share/doc is not writable. You should change its permissions.
Abra a pasta em questão e dê permissão ao seu usuário de escrita e leitura e depois execute:
brew link postgresql

Existe um fix necessário com relação ao socket para pg, execute os seguintes passos: - mkdir /var/pgsql_socket
- sudo chown $USER /var/pgsql_socket
- Abra /usr/local/var/postgres/postgresql.conf num editor de texto e descomente unix_socket_directory editando para unix_socket_directory = '/var/pgsql_socket'

Use o comando abaixo para rodar o server:
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
E esse outro para parar o server:
pg_ctl -D /usr/local/var/postgres stop -s -m fast

Se o server não conseguir desligar, descarregue o autolaunch e tente novamente: launchctl unload -w /Library/LaunchAgents/org.postgresql.postgres.plist

Se o psql --version for uma versão diferente da instalada então o Mac está usando o command line pré instalado do psql. Exporte o PATH no bash_profile para fazer com que o OS use o correto.
- Execute no terminal: open /.bash_profile
- Adicione a linha e salve: export PATH="/usr/local/bin:/usr/local/sbin:/bin:$PATH"
- Reinicie o terminal para que as configs estejam corretas

Pronto você já deve conseguir conectar no host com:
psql -h localhost -d "nomedobanco" (rodando psql -l é mostrado o nome do banco)

Quando conectado você pode executar comandos sql suportados pelo postgre e use \q para sair do console.

Baseado em Install Postgresql on Mountain Lion

segunda-feira, 29 de outubro de 2012

Using multi touch in CoronaSDK

Multi-touch is a very useful feature for games and mobile apps and comes frees of charge in native applications, but how do you use it in CoronaSDK?

Its simpler than one can imagine.

On your main.lua add the following activation codeline


With this your "touch" listener will have more than one touch in its event variable, an id property is available to identify each different touch.

Ok but it would not be me posting if I let you guys with only that ummm lets say dumb tip.

To try it out create a blank project with a new main.lua and our multitouch activation.

Let us place two round buttons to control a ball that will move it horizontally and vertically when these buttons are pressed. Also add a name variable with a differente identifier for each button, we will use it to know when each one has been touched.


You're probably seeing something similar to this

Now to the moving part.

Create a function for listening the touch actions and add it to both buttons.



When you execute it in the CoronaSDK Simulator one thing will come to mind: "How the hell I test it if I can only use single touches?"

Yes my friend that is an annoying problem, you will have to build your application and test it directly into your device. If you don't have one I suggest you to check if corona ultimote or luaglider (cider) have anything useful on this case.

Happy touching.

quarta-feira, 11 de julho de 2012

Using sprite sheets in CoronaSDK

A thing that is very common and useful in game development is the application of sprite sheets. Most of us make of this a day-to-day tool, but some don't know what it is or how to use it depending on the platform or because of any other problem.

So before we start I'm going to give quick defs.
- Sprite - its the assets representing an image in your game. Like an 1up mushroom from SMB.

- Sprite Sheet - its a group of sprites in a single file, can represent various animations or simply a group of static images used in the game. Like the zero sprite sheet bellow.

For the first demo we're going to use a classic character the jelly!

The jelly sprite sheet is equally divided, that way we don't need to care about specifying each frame individual settings.

Start importing the sprite classes from CoronaSDK, they are required to our code.



Each jelly sprite has 37x47 and we have 16 frames on our sheet so Corona needs to be informed of this, for that purpose we use a simple lua table.



Now we can call the graphics.newImageSheet using the sprite sheet filename and our table.



So we have our sheet with a few lines, now we need to specify the frames we want to display and create the image onscreen.



If you run now the simulator now the jelly will appear correctly in the screen but won't animate. Try to add sprite:play() after the scaling code line and watch our jelly flick like craze in the screen.

Lets improve our sample and change our animationData table to the following



Now our jelly feels more "natural". Why is that?

That happened when we added a time for our "walking_down" animation, if you play with it you can speed it up/down, don't forget that the time is given in miliseconds.

 Still we can't switch between animations.

For that purpose we need to improve our code with a couple of lines. Begin changing the animationData to



And to see the changes add some touch logic after the sprite:play() call (in fact you can even replace it)



When you touch left or right of our jelly sprite you'll see it change bettwen walking_left and walking_right animations. That was achieved using sprite:setSequence("animation_name") method.
After calling setSequence on a sprite is necessary to call play() if you want it to run the animation otherwise it will switch to the first frame (start parameter for example) and stay still.

Now it feels better uh, but wait! What if we move our jelly while animating?

Insert a transition call after onTouch sprite:play() line like that:



With these basic steps you added a sprite from a sprite sheet in the screen and made it move left and right.

Hey but it isn´t over yet! When the sprite sheet is like zero sample (from megaman, remeber?) we have to use more complex info on sheetSettings variable and also when we have non sequential animation we need to be more specific on our animationData variable.

Using short samples our animationData could have it walking_left animation re-written to



What we did here is jump through frames 5,2,7 and 3 always in that order for 800ms 2 times.

And to keep things simple, instead of given a gigantic sheet lets imagine sheetSettings can be re-written with every frame of our green jelly that we already know.



Even though this is useless in this case, we can use it for more complex sprite sheet images.


Last question before letting you code for yourself: How the hell am I supposed to build these sheets?

Well you can use some useful tools, let me give 2 hints:
- Texture Packer
- Zwoptex


Leave your questions and thoughts and happy coding!!

quarta-feira, 28 de março de 2012

Lessons learned - Get in the Games Industry

*Procurando pela versão em português? Acesse o NextLevel *

Hi everybody!

Back there when I was watching some GDC sessions I met Lindsey from 38 studios on her talk about dos & dont's on breaking into games industry.
It was such a good talk that I couldn't let that get away without helping the rest of my fellow companions that are also trying to work with their passion (GAMES YEAH!)

She was very kind to me and gave me all the session info edited in a nice pdf.

Enough with the chat lets go to the goodies.
* Most of these ideas belongs to 38Studios and should not be used without their permission, also this is not exactly their text, I mixed some of my ideas too*

Top 5 - Good ways to network

# 5 - Apply directly
- Try gamedevmap.com for info on companies in your area
- Try jobportals. I'd personally recommend: gamasutra, Edge jobs and Games Industry Jobs
- Try submitting resume in events (GDC for instance)
- Try job fairs

Tips:
- On interviewing be prepared to make tests, specific tests, tough tests!
- Prepare a list of questions that you want to make. That way is easy to talk with the interviewer.
- Always, I said always ask for feedback, that shows you're concerned about improving yours skills and also commitment.
- Don't be afraid of picking jobs that aren't initially on your area of specialty. You can start as a QA and try to build up your way to the top, being in the industry is the best way to get a job in the industry (I know it sound strange but is true).

#4 - Social Networking
- Prepare your linked in/stackoverflow account. Don't have one? Stop right now and go signup! (kidding just continue reading ok?). Put everything that matters on your account, don't use it for friends stuff, this is pros place. Events, games, prototypes, recommendations, school, jobs, everything goes here!
- Twitter. You have two options here go pro with your personal account and add companies, team members and job accounts OR Make a professional account where you follow and post only job related stuff.
- Facebook and Google+. I don't really like this option since basically they are personal social networks, but if you want to try them look for apps that target business contacts like BranchOut on FB or build business circles on G+. And please keep embarrassing stuff out of the internet.
- Look for other networking sites, there is lots of stuff happening out there on the web.
- Try placing your demos, prototypes and other related videos on youtube. That will make your name a little more findable on the web and also will show off some of your talent.
- Have a blog! This way you can express yourself about everything you have learned so far, show a portfolio, share experiences. Just remember this is public so be careful on what you write on it ok?
- Playing Games...what? Yes most of the people in game industry play something, so you have a chance of meeting someone online.

#3 - Groups and Communities
- game dev clubs & competitions. Pay attention to game jams they are extremely crucial for getting attention and improving yourself, also is a good way of knowing new people or forming a group of friends. Compohub have mapped some game jams.
- modding communities. This is a good way of starting, here apply the same tip as the previous one.
- if you're an artist check  digital art communities & competition, like CGSociety, CGHub, and Ani-Boom.
- Be part of game development groups like IGDA, WIGI and others.
- This falls on some other tips: volunteering - community management, events, or beta testing. Playing, modding and making games are some effective ways of breaking in.
- Depending on which forums & fansites you post into you can use it on your behalf. Just remember to build constructive and valuable posts, that way even if you're not saying that something is good try to be adding a point of view and a suggestion of improvement (be nice devs/artists have feelings too).

#2 - Conferences and Events
- GDC, GDC Online, a bunch of others.
- Consumer Shows (PAX, E3, etc)
- University-hosted events
- Networking events/parties and meeting
-  Developer open houses/portfolio review

Tips:
- It's not easy to go into these places and probably that would require some money (often more than you could afford), but if you can be prepared with cards and firm handshakes.
- Take into account each event situation, consumer show isn't hiring centered but GDC has its career pavillion.
- Don't be shy and make them remember you (in a good way)

#1 - Friends
- This may sound silly but having friends that work in industry can help you to be a step ahead. If you made all your previous lessons and have enough good background your friends will talk about you when the time come.
- A huge tip: there is no point of having a friend on Blizzard (pick any company here) if you're not even trying to be an awesome developer/artist/your role here. If you're good at something your friend will talk about you, don't insist from five to five trough sms asking him "Can you talk to your boss about me?" or  "Hey a need a job can you lend me a hand", just let him know once what you're doing. After all you're already friends right?


Top 5 Worst Ways to Network
#5 Inquire through inappropriate means
- Follow the procedures and instructions on job pages, they are there for good reason. If someone asked you not to call don't call.
- Avoid spamming developers, if they don't answer you probably they are to busy to do so, give them time. Also never stop by a studio and hassle people, that is ugly (bad bad professional no donuts for you). There are good ways of meeting people, Lindsey provide some in her document.

#4 Have someone else do all the leg work for you
- Basically don't cheat, meet the people and maintain relationship by yourself. It is your job to get hired not yours girlfriend/friend/parents.

#3 Don't make promises that you can't keep
- If you send an email to someone and that person don't answer you then you get sad with him right? So why would you do the same? If you going to promise something remind of actually doing it, give back what others have given to you, isn't that hard.

#2 Lie
- Again, don't cheat, the industry is small when bad things happen (truth rides a turtle and lie rides a fast airplane). Try to make yourself clear on what you're saying and is better not to get a job than be on a negative situation because of a lie in your resume.

#1 Point fingers or take it personal
- This is the best way to not get a job and even curse yourself. I'll quote Lindsey exact words "This industry WANTS you to succeed. Recruiters want to hire you, Developers want to know more about you, people want to interact with what you create. But there’s a time and place for everything, and even rejections are a part of the process. Keep in mind that it’s rarely about you."
- What she says is a fact if you destroy you own roads instead of building them to new cities how you think you going to get where you want?


There are more must read tips and goog examples on Lindsey`s pdf, so please read it all and you won't regret it I promise.
Get it here

Again a special thanks to Lindsey and 38studios, thank you!!

If you want to know more or just talk about it I'll be glad to do so, just send me an email vitor.navarro87 at gmail.com

sábado, 25 de fevereiro de 2012

Quick Tip - Lua and Mac OSX

This more fast than a bullet tip can seem misplaced but as I`m closer to Lua, in result of my development on CoronaSDK, somethings I started to try on this new frontier script language (she is quite nice).

So what if you get in love with lua and say ok I`m having fun but I want to get further using it for development in Mac and Windows and Linux WOW.

I going to show you the easiest way possible for Mac (that I`m aware of), follow the steps:

Step One


We are going to use brew to install Lua, this link has more info about brew http://mxcl.github.com/homebrew/
Open your terminal (command+space and type terminal then enter)
Now type: /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
Wait it to finish but don`t close the terminal yet


*UPDATE*: The ruby script has moved from https://raw.github.com/gist/323731 to https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb

Step Two


In terminal type: brew install lua
Now wait to the magic to finish...

Step Three


There is no step three, really you only have to use it.
To use it from terminal type Lua. You should see something like this:

bla:bla user$ lua
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> _

Try typing print("yay it works!")

Bonus Tip


Hey this is nice, fun and I want some extra sweet chocolate on it. This time the chocolate is love2d, a cross-plataform game development framework tat uses Lua as programming language. 

Try to download it and use by yourself.
https://love2d.org/
But I promise that love2d will come back in another post.... soon enough.... I hope.


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

https://market.android.com/details?id=com.playphone.games.candypot
https://apps.facebook.com/candypot/                                     













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!

Galera,

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

[]`s


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.