Midnight Tangent Devblog

2 Devs Talking About The Crazy Things They Do

  • Home
  • About Us
    • Personal Posts
    • About the Artist
    • About the Programmer
  • Art
    • Art Posts
  • Design
    • Design Posts
    • Programming Posts
  • Login

Home Stretch

So it’s been a while since my last post, so I thought I’d get on here and fill you in on what we’ve accomplished the past couple weeks. We took a little time off with the Thanksgiving holiday, and I was pretty much out of commision while I went through the puppy love stage with my new laptop, but now I finally got Eclipse back up and running and all my files transferred over so I’m ready to really get cranking with improved efficiency galore!

First things first: If you haven’t seen our new trailer then prepare to be amazed! read more

Posted in Design, Featured Tagged Android, Android Game, Android Game Blog, Android Game Development, Android OpenFeint, Game Art, Game Design, Game Music, Game Sound, Game Trailer, Indie Game, OpenFeint 1 Comment

Thanksgiving Treats

Happy Thanksgiving! Boy, do we have some on-the-couch-buckle-undone-lay-back-and-let-that-belly-rest entertainment for you! We finally finished up a trailer, and although it was a challenge in itself, we managed to make it pretty epic! It highlights a few games (specifically the one with title art, which finally now has a use!) and talks about our game features and what you can expect!

Maybe after I fill up on some typtophan and take a spot on the couch to watch some Turkey Day football, I can draft up another post on how we made this trailer, and what steps we had to take to get real-time emulator footage on our PC’s… Enjoy! read more

Posted in Art, Design, Featured Tagged 2D Art, Android, Android Artwork, Android Game, Android Game Blog, Android Game Development, Android OpenFeint, Android Programming, Animation, Artwork, Blog, Design, Droid, First Game, Game Design, OpenFeint, Trailer Leave a comment

Implementing OpenFeint with Android

UPDATE

Since this has become one of our more popular pages I just wanted to update it to say that UPSAT has now launched! If you find this page useful or just want to see some of the cool things we did with OpenFeint, including custom notifications, then please consider supporting us by getting the full version of UPSAT and by following us on Facebook or Twitter!

UPDATE

So you have an amazing Android game and you’ve decided you want to join the 21st century and add social connectivity? Well kudos and welcome to the party!

If you’re reading this then you’re probably at least somewhat interested in OpenFeint and what is entailed in getting this working with your game. The good news is it’s actually really easy. The bad news, since OpenFeint is relatively new on Android, the documentation can be a bit lacking which makes the task SEEM very daunting. I have to admit that I was a little bit nervous about doing this before I started, but in the end it only took me around 5 hours. So, if you have any coding skills whatsoever (unlike myself) then you could probably get it done in less. I’ve decided to write this little tutorial to help future users who find themselves running into the same problems as I did and to begin chipping away at the community support void that OpenFeint for Android is currently experiencing.

IMPLEMENTATION SPECIFICS

Since my game was created using the Android SurfaceView class and not OpenGL, I can’t attest as to the viability of this tutorial in other situations. That being said, the fundamentals should still be the same for any multi-thread gaming environment. At it’s core, Android is just Activities and Views, and both GLSurfaceView and SurfaceView classes are just views that operate on separate threads. So if you’re using something besides the regular SurfaceView class, don’t stop reading, this information could still prove useful. I’m running Windows 7 and using Eclipse 3.7.0. I’m going to focus on Step 4 of the getting started with OpenFeint tutorial from the developer support site, as steps 1-3 are essentially repeated here.We’re also going to assume you already have your project in Eclipse.

GETTING STARTED: IMPORTING OPENFEINT

I’m going to go ahead and skip steps 1-4 on this page because it’s all pretty self explanatory. If you can’t figure that out then I don’t think any number of tutorials will help you. So our first task is actually getting OpenFeint imported into your workspace. You’ll want to make sure you download and extract the OF SDK to somewhere convenient. I put mine in the same location as my Android SDK. To import the API’s follow these steps

Right-click on your project in the project or package explorer Click Import. On the following screen select General and then click Existing Projects into Workspace.. Click Next.

OpenFeint tutorial Import Window

  • Click on Select Root Directory and then Browse
  • Browse to the directory in which the OpenFeintAPI and GameFeed libraries are stored.
  • Click OK.

    OpenFeint Tutorial Import Projects

  • Click the checkboxes for GameFeed and OpenFeintAPI. If you’ve already imported the projects they will be grayed out as is shown here
  • Select Copy projects into workspace
  • Click Finish.
  • OpenFeint Tutorial Projects Imported

    You should now see the two projects in your package/project explorer. If they are not there, try deleting them out of your workspace through Windows Explorer and then following the steps above. If your images don’t look exactly like mine, that’s ok. I have some of my files in SVN repositories so they display a little differently.

    BUILDING AND SETTING UP THE PROJECT

    Next we need to verify that the projects have been built and that both projects are classified as libraries. This part seems to be the main area of confusion and I had the most trouble here. From reading other forums, it seems as though, depending on how you perform the import, the files may automatically be classified as libraries, in which case your project would be fine. If this doesn’t happen then you will start seeing errors as you actually implement the API into your code. It’s best just to perform these quick verification steps to be safe.

    In the top menu bar, select Project and then check to see if Build Automatically is selected. If it is, go to the next step. If it’s not, then select Build All and then select Build Automatically 

    OpenFeint Tutorial Build Projects

  • Right click on the OpenFeintAPI project in the project explorer and select Properties
  • In the window that appears select Android and then make sure Target is set to Android 1.6 and Is Library is selected as well. I had issues with the project being set to anything besides 1.6, but if it works for you then that’s fine too.

    OpenFeint Tutorial Properties Setting

  • Click OK
  • Follow steps 2 -4 for the GameFeed project in the project explorer
  • Right click on your game project in the project explorer and select Properties
  • On the Android tab make sure Is Library is NOT selected.
  • Click Add and then select both the GameFeed and OpenFeintAPI projects and select OK. You should now see the two references with green check marks.
  • Click OK to close the window.
  • Your project is now set up and you’re ready to begin coding. At this point you shouldn’t have any errors. If you do then please retry all the steps and if you are still having issues feel free to comment here and I will try to help you out.

    INITIALIZING OPENFEINT IN YOUR GAME

    “Ladies and Gentleman, Boys and Girls…. It’s time for the MAAAAAAIIIINNNNN Event!” This is the part you’ve no doubt been waiting for. Before we get started I want to take a minute to explain my setup and how I’ll be implementing the code. Simplifying greatly, my project consists of one Activity (AndroidGame) which is the UI thread and one SurfaceView( Screen) which is the worker thread where I perform all my game logic and rendering. Through some trial and error coding, I found that the OpenFeint methods have to be called from within an Activity class or context and not a view (or SurfaceView for that matter). This means that as far as I know, the calls must be made from the UI thread. I also found some apparent errors in the code given on the OpenFeint developers site and will point these out to you.

    The first few steps for editing the Android Manifest file are pretty straightforward:

    Edit the AndroidManifest.xml file in your project: Add the following activities inside your <application>tag:

    <activity android:name="com.openfeint.internal.ui.IntroFlow" android:label="IntroFlow" android:configChanges="orientation|keyboardHidden" android:theme="@style/OFNestedWindow"/> <activity android:name="com.openfeint.api.ui.Dashboard" android:label="Dashboard" android:configChanges="orientation|keyboardHidden" android:theme="@style/OFNestedWindow"/> <activity android:name="com.openfeint.internal.ui.Settings" android:label="Settings" android:configChanges="orientation|keyboardHidden" android:theme="@style/OFNestedWindow"/> <activity android:name="com.openfeint.internal.ui.NativeBrowser" android:label="NativeBrowser" android:configChanges="orientation|keyboardHidden" android:theme="@style/OFNestedWindow"/> read more

    Posted in Programming Tagged Android, Android Game, Android Game Blog, Android Game Development, Android OpenFeint, Android Programming, Blog, Coding, Design, Development, Droid, First Game, Indie Game, Java, OpenFeint, Programming 17 Comments

    POW! We have interwebs

    What’s that you say? You like playing games with social features that let you connect with your friends on Facebook and see their highscores and challenge them for bragging rights? Well then have I got a game for you!

    That’s right. As of last night at around 1AM we now have online functionality a la OpenFeint! This is very big news for us as I believe it elevates our game to the next level. In case you don’t already know, OpenFeint is the biggest mobile social gaming network. It allows players to create a profile which they can use to post their highscores to online leaderboards, unlock achievements, and connect with their friends. This profile can then be used with any game that they play, creating a seamless social experience which makes life easy for developers and fun for players. They have over 50 million users and 3800 games, so chances are you’ve probably already played an OpenFeint game. read more

    Posted in Design, Featured Tagged Android, Android Game, Android Game Development, Android OpenFeint, Android Programming, Development, First Game, Game Design, Indie Game, OpenFeint, OpenFeint Implementation 4 Comments

    Art Update: Working Out For The Ladies…

    It’s been a real long time since I have made an appearance here, but rest assured, the eye-candy for this game is continuing to be churned out. Barring a power outage last weekend, I managed to get two more games finished this week: Punching Bag and Hula Dance. The Punching Bag game is a ‘tap-tap’ game, where you have to hit the bag a number of times (less times on the higher/faster levels) to correctly complete it. The Hula Dance game is another game that uses the spiffy accelerometer, where you have to swivel your phone to make the girl dance! read more

    Posted in Art, Featured Tagged 2D Art, Android, Android Artwork, Android Game Development, Animation, Art, Artwork, Blog, Design, Development, Droid, First Game, Game, Game Art, Game Design, Indie, Indie Game 2 Comments

      Stay Connected

      • View Midnight-Tangent-Studios-138280219624318’s profile on Facebook
      • View midnighttangent’s profile on Twitter

      Posts

      • April 2018
      • March 2018
      • January 2018
      • December 2012
      • July 2012
      • June 2012
      • May 2012
      • March 2012
      • January 2012
      • December 2011
      • November 2011
      • October 2011

      WordPress Theme Custom Community 2 developed by Macho Themes