Mostrando postagens com marcador Beginner. Mostrar todas as postagens
Mostrando postagens com marcador Beginner. Mostrar todas as postagens

sábado, 5 de novembro de 2011

Getting started developing for Android

So, one day you woke up and decided "I wanna program for Android!", that's actually pretty smart. The mobile market is growing and although some people state the android market in particular is bad (that's an subject for later, though ), I still believe it's a good idea.

Don't know what Android is? http://en.wikipedia.org/wiki/Android_(operating_system) Wikipedia is your best friend!

I have some good news for you. It's absolutely free to start programming in Android. You just need to download some stuff and you can start programming.

You have to begin somewhere

You download the SDK (Starter Development Kit) in the link below:
http://developer.android.com/sdk/index.html 
That little green robot is the Android's mascot. He's not a robot though, he's actually an android. Why did they choose an android to be the mascot? Beats me.

After your download is done (but before installing), go here: http://developer.android.com/sdk/installing.html
You should just follow the procedures in the site and everything should be fine. And before I forget, take the Eclipse path!

About Eclipse:
Eclipse is an IDE( integrated development environment ) that will make your life easier when programming for Android, among other things.
So maybe you like Netbeans( another IDE )? Don't use Netbeans for Android! Google itself supports Eclipse for Android and maybe other IDEs can hold a candle to Eclipse, but if you try using Netbeans and it's plugin, you're inviting headaches. Believe me, I have tried!
If you don't even know what an IDE is, get Eclipse and find out by yourself how much easier it makes your life!

Will problems happen? Maybe. Just comment in the blog and I'll try to help you out!

Some known problems:
  • Try to install the SDK in a folder that has NO WHITESPACES, since that may cause bugs, maybe on the main folder of your hard disk( C: , most likely).
    • The reason for this? I have no idea.
  • You have the JDK(Java Development Kit) but Android SDK Installer says you don't. Well, just hit back once and advance. It should work.

Afterwards you can try to setup the Hello World example.

Ok, now what?

Congratulations if you have setup the SDK, got the emulator running and everything.

Just so you know, Android uses Java as an programming language. I believe that at this point, you have 3 choices:

  • Java is a popular, useful language. Why not program in Android AND some basic Java at the same time? Skip this if you already know some Java.
  • If you want to program any type of application in Android( not just games ), using the native UI( user interface ), maybe get some money in the Android Market, then you should study some basic android:
  • Wanna program for Android solely for games? Then it's better to jump in to a framework straight ahead!
This is Android's native User Interface
But first, what is this native UI that I speak of? It's the default buttons and interfaces that Android comes packed with. You should use them for creating some basic applications, since it saves time and the users are already used to them. You can try to design a game using those things, and while it is possible, it's not a good idea at all, because you'll have little control over rendering (the drawing of your game's graphics), which is BAD, among other problems. And I speak of experience, I've already made that mistake. More about that later, though :D

By using an Framework for games, somebody else has already optimized and organized the way you should handle rendering, input and sound, among other things, which means you'll face less problems trying to design your games and fighting bugs.

One of those Frameworks is AndEngine!

http://www.andengine.org/

Which is pretty well established already and uses OpenGL (Open Graphic Library) , which is a great skill to start picking up. I've never used AndEngine, though. Instead I'm using another Framework... Libgdx.
http://code.google.com/p/libgdx/  
It has a huge trump (for me, anyways)... You program your game once, and it runs on both Desktop AND Android! And since it's Java, that means both Windows and Linux, and maybe anything that has the necessary Java Virtual Machine. Or maybe an Applet straight from the browser? You can do that too! Awesome. It uses OpenGL, like AndEngine.

Frameworks, I'm an expert, I'll make my own!
So maybe you wanna deeply learn Android games mechanics, maybe create your own framework to use in your games, giving you max control and max learning?
Then go program some stuff, get to know a lot about basic Android programmin... And then, start learning about this little guy:
http://android-coding.blogspot.com/2011/05/drawing-on-surfaceview.html

It's called a surface view. It's basically a way for you to control the rendering process completely! If you have this down(you're gonna have to know some threads, so it takes advanced Java), you'll be able to create a good framework. Just search up "SurfaceView Android" on Google and you'll get a lot of stuff.

Uhnnn, I wanna make my own Framework, but...

So maybe you don't know anything about Threads? And you wanna make a pretty good Framework? You wanna have some guiding light? Then I have a book just for you...

http://www.amazon.com/Beginning-Android-Games-Mario-Zechner/dp/1430230428

It takes you step-by-step in to creating a framework in Android and also through creating games(there are 3 game examples made through the book). It's a great read, from the creator of libGDX.

You don't have the money, though? You can still look at his Source Codes as he progresses through the chapters, building frameworks and games:

Look up SVN if you don't already know what it is, to download all the codes at once.

Woosh... I'm tired.

Well, just go program now!

segunda-feira, 31 de outubro de 2011

The game you wanna play is the game you should make!

What I mean to say is, if you're an indie game designer, you should design the game experience you enjoy!
Design games in your favorite style or games you really wish you could play!
Does that mean it'll be extremely popular? Maybe. If you like something really mainstream, like first person shooters or something, then yes!
But if you like rabbit political fighting games you probably won't get a very good audience for a game like that. But that's not the point!

The real point is threefold!

The first one is: if you're making the game experience you want to make, you'll be happier making it. If you find pleasure in what you do, you'll have a higher probability of actually getting the game finished. Unfinished games are a plague in the indie game industry and you should fight it in anyway you can!

The second one: if you're making the game you really enjoy, you'll be more in sync with the needs of the gamer, since you'll have the experiences from playing those games, and you'll be able to find flaws more easily in the design of the game, so you'l be able to make the whole experience much better! You'll be able to create the features that the players that enjoy that type of game really want, since you're one of them. Who are those players that enjoy this one type of game...? That brings us in to the third point.

The third one: normally, the players that play indie games are looking for an experience they can't find in the regular game industry, so they'll have peculiar tastes. They are a combination of niche markets that you want to reach out for! And how do you know if that niche market exists for your game? Well, if you like that style of game, then you are already a niche market! And if you make a game that you really wanna play other people may want that same game you always wanted! No matter how weird your idea is, it most likely has a niche market somewhere that you should reach out for, instead of making one more generic platformer game.

Those are my three points for why you should design the games you wish you could play: Motivation, Quality and Niche Market.

I, myself, really enjoy story-oriented games, so the games I make tend to focus a lot of them, and I center the story in the qualities I really like. I might return to this later!

The most important thing is to keep on making them! But if you enjoy it, it's much better, right?

Hugs, readers!

HOW to be a Game Programmer?

I'm gonna start with something pretty beginner-oriented and not too specific.
So you wanna be a game programmer? Do you already program? Have you ever programmed for games?
The main advice is to not be concerned about what you get and what you don't get, even if you're a total beginner, you just have to keep on trying things, messing around, see how they work.

You don't need to understand an entire language to mess with some code!

Well, get to it! First off, you need to choose a language! Personally, I recommend ActionScript, Flash, to beginners. There are a lot of sites to host the games, lots of frameworks and tutorials, anyone with an internet browser(and the plugin) can play it.

http://www.adobe.com/devnet/actionscript.html

Right off Google, why not check this little guy out: http://www.emanueleferonato.com/2006/10/29/flash-game-creation-tutorial-part-1/ just to get a hang of how things work, of what programming and ActionScript is. Forget about programming concepts, just mess around, read code, modify it, create something, make things.

Putting your hands to do real work is better than fully learning languages, that's what I believe in. Of course, understanding the language will make you a better programmer.

You can also program games on top of programs and their engines, like GameMaker:

http://en.wikipedia.org/wiki/Game_Maker
Which is good for beginners and there is a lot of community involved around it, so it's good. You need to script a lot of things to make the game work as you want, so you'll learn, but the IDE(Integrated Development Environment) also makes things quite easy. But you should never be afraid to try something new, so it's not good to hang on to Game Maker and running away of getting to know programming languages and frameworks.

You could also program in Unity:
http://unity3d.com/
I don't think Unity's good for beginners at all, and I also think you should take your time with simpler things like 2D games in ActionScript or Gamemaker before falling in to this. But it's powerful if you want to make 3D games fast and you know what you're doing. If you MUST program 3D games, then go for this since the learning curve isn't steep.

To tell you the truth, though, I prefer to program in Java. I'm sure people will point out a lot of things that are wrong with Java and some of them are true, but I enjoy it. However, it's more complicated to program in Java, since it's an object oriented language, so to program well in it, it's best to know some core concepts, so it's definitely not for beginners. I have even programmed games using Swing(you don't know why yet, but it's a bad idea), Java's GUI system(graphical user interface)

The good thing about Java is that it's cross-platform too, anything that has the Java Virtual Machine can run it. After learning some Java you can then start programming for Android (Google's smart phone system), which uses Java too.

So that is pretty much that! Don't be lazy, why not start programming some ActionScript or creating something in GameMaker RIGHT NOW?

If the above text was too confusing, ignore everything and just go here: