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

segunda-feira, 6 de fevereiro de 2012

Monster Puzzle RPG - My Game

So I released in the last few days a game called Monster Puzzle RPG. It's my third game in the Android Market. It's not successful so far, though. I made it together with my cousin, he told me about an interesting mechanic he wanted to pursue and, after some convincing, I went along with it.

Download Monster Puzzle RPG on Android Market!

Monster Puzzle RPG on ModDB!

Let's analyze the game(our own game xD), then.

Gameplay
The main mechanic of the game is a grid. A grid of blocks where you have to destroy the blocks and rotate the screen to get an advantage, so you can avoid AND attack the monsters. It's feels quite puzzle-ish, which is why it has the puzzle in it's name. To reinforce the puzzle aspect, I decided to grade the player based on his score and allow the player to retry the stage freely to increase his rank, similar to Angry Birds.


A picture of the puzzle-battle thing



While not inside a puzzle-battle, you proceed through the story in a visual novel manner, similar to games like 999. This way of telling the story was chosen because it's easier and faster to make, since we are indies, but even so it's still an effective way of telling a story, I believe.






We went for an sort of addictive gameplay thing where you kinda wanna make yourself unlock the S rank in every stage. Not sure if it worked, though.

Story
We went with a traditional medieval theme and a story about a treasure hunter that's looking for an specific treasure. I think that it fits well with the puzzle theme and that isn't integrated in to the gameplay yet, I suppose. The story is light-hearted and develops as Soleil, the main character, interacts with his companion, a little girl by the name of Ciel. They are both happy people, so the story stays warm through the demo, but if we continue the game it will go deeper in to darker themes.

Graphics
We went with pastel colors since we find that lighter on the eyes, so light colors are seemed though the entire game. The graphics are mainly vectorized stuff. We're not graphics specialists, but the game still went nicely, we believe.

Sounds
The sound effects are generic stuff, but they fit well. The music was compoused my cousin, who's really amazing and managed to create some cool songs for the game. We went with MID stuff, which kinda limited his potential, but the musics are still great and might justify a download, I hope. He used a program called Fruity Loops Studio

So there you have it! So the game still isn't successful(we hope we can turn that around), but we do not thing the game is faulty, it's just a matter of exposion.

segunda-feira, 7 de novembro de 2011

Integrating Facebook and Twitter in to your Android app

Today I'll show the way to integrate Facebook and Twitter in to your Android app!

Don't know what Android is? Wanna get started? Follow this link:
Getting started on Android!

So you have a game and you have that one great idea to integrate in to the social networks that will really launch it up and it'll be great for marketing? Or maybe a new gameplay mechanic that uses those? Tell me about them, because I can't really think of any great uses.

Or if you don't wanna make a game per see, but you have THE idea for an application that uses those networks that will net you endless money? Well, let's get going then.

Lucky for you, both Facebook and Twitter are really easy to integrate because most of the work is already done in the internet, especially on Facebook. Twitter is a little bit more tricky to find the right resources, but I've done just that for you, dear reader. For Facebook I'm going to give you a step-by-step in to using the SDK,

Skip to the end of the post if you just want some samples :D

Integrating to Facebook

  1. Create an APP in your account
  2. Download the Facebook SDK for Android and put it on Eclipse as a library project
  3. Import that in to your Android application 
  4. Get to know the SDK by messing with the samples!
The Facebook logo. Pretty, huh?
Create an APP in your account
For Facebook, you're gonna need an account. https://developers.facebook.com/apps go here and you'll be prompted to login. In that screen you can create an application, after you've sign up to be a developer (this can be tricky, since you need to authenticate with a cellphone and stuff). That application is sort of like, the point of access your Android application will use to access the Facebook API. Keep this page open, you're gonna need to come back to it, to get the API Key.

Download the Facebook SDK for Android and put it on Eclipse as library project
https://github.com/facebook/facebook-android-sdk/tree/master/facebook go here and click on the ZIP button to download everything as a single ZIP file. Inside the ZIP, look for a "facebook" folder. That has the basic project that you need to access the API.
Then, you're gonna need to create a new Android application(any name and Android version will do) and you have to copy the contents of the "facebook" folder in to the folder your new application, replacing the files. At Eclipse, press F5 in your project to refresh and show the new changes. Then, right-click in your project and go to properties. Go to Android and check the checkbox "is a library", if it isn't already checked. You should have something like this(doesn't have to be the exact same):

It doesn't have to look exactly like this, but you get the idea
Import that in to your Android application
Right click on the project you wanna import it in to, properties, Android, in the Library lower part, click on Add. Pick the Facebook project and hit ok. Now play around with the classes!


Get to know the SDK by messing with the samples!
In the ZIP you downloaded with the SDK, there are also samples. Just create new Android projects and copy-paste the samples codes in to the projects to try them out on the emulator. Don't forget to examine the code to switch up the API Key in the code with the API key of your facebook application! Happy programming :)

Integrating to Twitter

You're going to need to be an Twitter developer, (you're gonna need an twitter account too)
https://dev.twitter.com/ go here and hit sign in, in the upper right screen. Afterwards, click "Create an APP", fill the fields, hit ok, go. Then, you need to get the Consumer Key and the Consumer Secret of your twitter application, since you'll have to feed those in to your Android App.

The twitter application you create in the website is more like a point of access for your Android App

Then you need to code the Android part:
Ok, this is how I did it... I downloaded dewaele's sample twitter project and it worked!

https://github.com/ddewaele this is his profile on gitHub
https://github.com/ddewaele/AndroidTwitterSample and this is the twitter sample.

Download it and import it in to Eclipse (with file => import => import existing projects in to workspace => Pick the folder with the sample)
This already has all the necessary libraries, easily configured. The whole OAUTH is kinda hard to code by yourself, so it's best to use this sample. Fill in the Consumer key and secret in to the Activity class. Happy programming :)


Some words on OAUTH
This is basically Open Authorization. It is a way to access a site's content without exposing password, it is used for security purposes. If you're looking in to using webservices and things like that in your applications, you would best learn a lot of it, since this is what you'll need to implement in order to integrate with any site that uses them(both twitter and facebook use them, naturally), that way you'll be able to integrate technologies that haven't been integrated before, giving you a lot of power :)

http://en.wikipedia.org/wiki/OAuth

Final words
So basically you can now use Facebook and Twitter in your applications. If the above text is too complicated, just follow these links of ddewale (he rocks):
https://github.com/ddewaele/AndroidTwitterSample
https://github.com/ddewaele/AndroidFacebookSample
But don't forget you need to be an developer in each site with an APP registered there :D

Woosh, I wrote this because I actually have do to these things for a game in a college assignment... I'll share that one with you in another opportunity :)

Comment if you run in to trouble... Go program now!

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!