Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Open Feint help for beginner
Started by mediakitchen Oct 23 2010 03:58 PM

- - - - -
39 replies to this topic
[TOPIC CONTROLS]
Page 1 of 2 1 2
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

mediakitchen

[GLOBAL: userInfoPane.html]
mediakitchen
  • Contributor

  • 433 posts
  • Corona SDK

I have signed up on the Open Feint site as a developer and crated an application and a leaderboard.

I have put the following code at the beginning of my main.lua


require "openfeint"

openfeint.init( "my product key", "my product secret", "Test" )


And when my game is over I have the following code


openfeint.setHighScore( { leaderboardID="myleaderboard Id", score=numScore } )


When I launch my game on the iphone, after the default loading screen, the first time I played it got a full screen Open Feint screen appearing asking if I wanted to enable open feint or something like that and I chose yes.

Launching subsequent times I get a welcome back open feint message the bottom of the screen. Clicking on this opens full screen open feint screen.

If I navigate to the My Games section I see 3 other games I have downloaded from app store but not my game.

Any idea what I am doing wrong or how I can check if my code to submit a high score is working?

Perhaps there is something more I need to do on the Open Feint site? Prepare for submission?

Thanks

Paul
uid: 7863 topic_id: 3035 reply_id: 303035


[TOPIC: post.html]
#2

mediakitchen

[GLOBAL: userInfoPane.html]
mediakitchen
  • Contributor

  • 433 posts
  • Corona SDK

Was hoping someone had successfully used OpenFeint in a Corona game and could offer some advice on the basis steps to get this up and running.

I was under the impression I had set everything up on the Open Feint site but don't seem to be able to see any reference to my game when open feint is launched within my Corona game.

Any chance of a quick summary of the steps required to get this to work for a basic leaderboard?

Thanks

Paul
uid: 7863 topic_id: 3035 reply_id: 9126


[TOPIC: post.html]
#3

jonbeebe

[GLOBAL: userInfoPane.html]
jonbeebe
  • Contributor

  • 511 posts
  • Corona SDK

Hi Paul,

Here's how to do it:

* Go to http://www.openfeint.com/developers and sign up for an account (it's free).

* Once you're in, add your app and fill out as much details as possible (it doesn't have to be live in the app store just yet).

* Create at least one leaderboard and fill out the iPhone app store listing section (there might be some other requirement, it'll tell you though), and then in one of the sections on the left (just go through them, it's not too hard to find), click 'Submit for Review' (probably not the exact wording but something to that effect).

* You should receive an email within a few days letting you know that your app has been approved.

Also note that you don't have to wait for your game to be approved before integrating OF into your app for development. While you're waiting for it to be approved, you can still get your product key and product secret (click 'App Home' on the left once you're logged into the OF developer's panel to get that info).

Once you create a leaderboard, the leaderboard ID will be shown in the listing next to each leaderboard. It'll be a series of numbers, but make sure you enclose it as a string when you call openfeint.setHighScore (put double quotes around it).

Hope that helps! Feel free to post more questions if you need anymore help, I'll get an email notification if you reply to this thread now, so you'll definitely get a response.

Good luck!

Jonathan Beebe
uid: 7849 topic_id: 3035 reply_id: 9247


[TOPIC: post.html]
#4

mediakitchen

[GLOBAL: userInfoPane.html]
mediakitchen
  • Contributor

  • 433 posts
  • Corona SDK

Thank you Jonathan - I really appreciate the advice.

I don't think I submitted my game for review though I do have the leaderboard ID. I also just noticed when open feint opens in my game that it says the game name at the top of the open feint screen. ie "Now Playing [my game name]"

It also asks me if I would like to use my current location - don't think this is related to my problem.

I assume when it is working that I should see a reference to my game under the "My Games" section in open feint?

I will look on open feint site now to see if i had submitted it.

Thanks

Paul
uid: 7863 topic_id: 3035 reply_id: 9251


[TOPIC: post.html]
#5

mediakitchen

[GLOBAL: userInfoPane.html]
mediakitchen
  • Contributor

  • 433 posts
  • Corona SDK

I see there is an option to Submit but when I try to do this I get an error

An error has occurred. Application must have an iPurchase page setup.

Any idea what I need to do here?
uid: 7863 topic_id: 3035 reply_id: 9252


[TOPIC: post.html]
#6

jonbeebe

[GLOBAL: userInfoPane.html]
jonbeebe
  • Contributor

  • 511 posts
  • Corona SDK

The iPurchase page is one of the sections (or sub-sections) on the left in the OpenFeint developer's panel. Just look through the list of items in the left sidebar and you'll find it. Once there, fill it out and submit.

Your game won't appear in the 'My Games' section until it has been approved by OpenFeint, though everything will still work for development and testing in the meantime.
uid: 7849 topic_id: 3035 reply_id: 9253


[TOPIC: post.html]
#7

mediakitchen

[GLOBAL: userInfoPane.html]
mediakitchen
  • Contributor

  • 433 posts
  • Corona SDK

I guess that explains why it isn't working. I thought I couldn't fill out that iPurchase page until my game was on the App store - chicken and egg situation. I will fill this in now.

Thank you for the swift reply.
uid: 7863 topic_id: 3035 reply_id: 9254


[TOPIC: post.html]
#8

mediakitchen

[GLOBAL: userInfoPane.html]
mediakitchen
  • Contributor

  • 433 posts
  • Corona SDK

Jonathan

You said

" Your game won't appear in the 'My Games' section until it has been approved by OpenFeint, though everything will still work for development and testing in the meantime.

Can you explain what I am able to see with regards everything still working for development and testing? i.e what can I test and where can I see the results of these tests?

For example, at the end of my game, I am calling the following

openfeint.setHighScore( { leaderboardID="[MY LEADERBOARD ID]", score=1000 } )

But I have no idea how to check if this score has been added to the leaderboard as I am not able to view this leaderboard anywhere.

When oOpenFeint opens within my game, I notice there is no leaderboards icon - just "Forums and chat", "fan club" and "who's playing"

Thanks again

Paul
uid: 7863 topic_id: 3035 reply_id: 9255


[TOPIC: post.html]
#9

jonbeebe

[GLOBAL: userInfoPane.html]
jonbeebe
  • Contributor

  • 511 posts
  • Corona SDK

When you log into OpenFeint developer's panel in your browser, the same place you created your leaderboard (look under Features in the left sidebar) will be where you can view your leaderboard online.

I'm not sure why your leaderboard isn't showing in your game, perhaps they changed it to where your game must be approved before you can see it during development (in your app, that is).

uid: 7849 topic_id: 3035 reply_id: 9285


[TOPIC: post.html]
#10

mediakitchen

[GLOBAL: userInfoPane.html]
mediakitchen
  • Contributor

  • 433 posts
  • Corona SDK

Thanks Jonathan

Yes I can see the leaderboard listed there however there doesn't appear to be any way to view the actual leaderboard. I see the following:
ffHighScores 52214 min version max version 0 edit »
Perhaps it is not displaying an actual leaderboard because there are no highscores in it? Though I have called the code to add highscores multiple times from my game.

Hmm.....
uid: 7863 topic_id: 3035 reply_id: 9287


[TOPIC: post.html]
#11

jonbeebe

[GLOBAL: userInfoPane.html]
jonbeebe
  • Contributor

  • 511 posts
  • Corona SDK

Can you click the Edit link? It's usually within there...
uid: 7849 topic_id: 3035 reply_id: 9288


[TOPIC: post.html]
#12

mediakitchen

[GLOBAL: userInfoPane.html]
mediakitchen
  • Contributor

  • 433 posts
  • Corona SDK

Sorry Jonathan - not sure why mine isn't working as normal.

If I click edit it takes me to a page titled "Manage ffHighScores"

This page allows me to set the following:
Active
Visible
Descending Sort Order
Allow Worse Scores
Start Version
End Version

No leaderboard though
uid: 7863 topic_id: 3035 reply_id: 9293


[TOPIC: post.html]
#13

jonbeebe

[GLOBAL: userInfoPane.html]
jonbeebe
  • Contributor

  • 511 posts
  • Corona SDK

The top 25 leaderboard scores should be under the 'Submit' 'Cancel' and 'Delete' buttons, so if you're not seeing anything there, you probably don't have any high scores registered.

Your best bet is to 'Submit' your app for review in the OpenFeint panel and wait for them to approve it and then try again.

In my experience, they usually approve either the same day, or within a couple days.
uid: 7849 topic_id: 3035 reply_id: 9294


[TOPIC: post.html]
#14

mediakitchen

[GLOBAL: userInfoPane.html]
mediakitchen
  • Contributor

  • 433 posts
  • Corona SDK

Thanks Jonathan. I think I have submitted it so I will just wait.

Thanks for all your help
uid: 7863 topic_id: 3035 reply_id: 9295


[TOPIC: post.html]
#15

mediakitchen

[GLOBAL: userInfoPane.html]
mediakitchen
  • Contributor

  • 433 posts
  • Corona SDK

My game has now been approved by OpenFeint and I can see a leaderboard within my game. Having problems submitting scores.

Is the following correct syntax?


local numScore = 1999
openfeint.setHighScore( { leaderboardID="535244", score=numScore } )


I am calling the following after setting the score and this correctly opens the Dashboard. I have tried it without this call and still for some reason my score is not being saved to leaderboard


openfeint.launchDashboard()

uid: 7863 topic_id: 3035 reply_id: 9340


[TOPIC: post.html]
#16

Dotnaught

[GLOBAL: userInfoPane.html]
Dotnaught
  • Contributor

  • 370 posts
  • Corona SDK

I've been able to get the deprecated format to work:
openfeint.setHighScore( lbID, points )
but not the newer one. Ansca said there had been an OF API change. I believe they're planning a fix, though when I don't know.
uid: 1560 topic_id: 3035 reply_id: 9342


[TOPIC: post.html]
#17

mediakitchen

[GLOBAL: userInfoPane.html]
mediakitchen
  • Contributor

  • 433 posts
  • Corona SDK

Thanks Dotnaught.

It certainly seems to be very awkward to get this to work.

I seem to get a message every time I create a new build within my game saying "New highscore saving locally" but this happens only ONCE.

If I close the game down and launch it again it doesn't ever happen again.

I have made a simple stripped down main.lua as follows


require "openfeint"

openfeint.init( "HsfJWsIiQTs3dfxikJ6WtWw", "XJh2TwnDCTqvn90bwndsebbkEd6q3hH4knFazxTHY", "My Game" )

openfeint.setHighScore( "535244", 1000)

And this


require "openfeint"

openfeint.init( "HsfJWsIiQTs3dfxikJ6WtWw", "XJh2TwnDCTqvn90bwndsebbkEd6q3hH4knFazxTHY", "My Game" )

openfeint.setHighScore( 535244, 1000)
And this


require "openfeint"

openfeint.init( "HsfJWsIiQTs3dfxikJ6WtWw", "XJh2TwnDCTqvn90bwndsebbkEd6q3hH4knFazxTHY", "My Game" )

openfeint.setHighScore( { leaderboardID="535244", score=2000 } )

But I am having no joy with any of these
uid: 7863 topic_id: 3035 reply_id: 9344


[TOPIC: post.html]
#18

mediakitchen

[GLOBAL: userInfoPane.html]
mediakitchen
  • Contributor

  • 433 posts
  • Corona SDK

Trying to get to the bottom of this problem.

I seem to be able to save one high score for one user in the leaderboard. Once it has saved one highscore for a user ir does not add any additional highscores for this user unless I create a new build. If i create a new build, it overwrites the previous score for this user? P

Thinking about it perhaps this is the correct functionality and the leaderboard only saves one high score per user, this score being their highest ever score. Doh that may explain it!! Is this the case?

I am used to having all my scores added to a highscore board, not just my highest.
uid: 7863 topic_id: 3035 reply_id: 9347


[TOPIC: post.html]
#19

mediakitchen

[GLOBAL: userInfoPane.html]
mediakitchen
  • Contributor

  • 433 posts
  • Corona SDK

Ok I seem to have cracked it now using the following syntax where numScore is a variable storing the players score in my game.


openfeint.setHighScore( 535244, numScore)


This works on 3 devices and with different users. It does appear to only store one high score per player but I quite like this as it prevents one person filling up the leaderboard.

I didn't have much joy with the new syntax so would be interested to know if anyone is using the new syntax successfully?
Thanks to all for the assistance getting this up and running.

uid: 7863 topic_id: 3035 reply_id: 9364


[TOPIC: post.html]
#20

peachpellen

[GLOBAL: userInfoPane.html]
peachpellen
  • Contributor

  • 365 posts
  • Guests

I am nearing the point of playing with leaderboards, but currently can't get any achievements to work due to do the new syntax; has anyone managed to do so, as they have with scores?

If so please post, I'd dearly love to know how to do that :)
uid: 10144 topic_id: 3035 reply_id: 9507


[TOPIC: post.html]
#21

jonbeebe

[GLOBAL: userInfoPane.html]
jonbeebe
  • Contributor

  • 511 posts
  • Corona SDK

Leaderboards are broken in 2010.109. They were working in the previous release, but OpenFeint changed their syntax with the newer version (which Corona upgraded to) and some small things got broken in the process, Achievements one of them.

In the next release it'll be fixed though. What I did, since I didn't find that out until AFTER I tried to code in all my achievements, is just comment out the Achievements code, and set all your OF achievements to "secret" in the OF backend, that way when it is fixed in the next release, it's just a matter of "un-secreting" and "un-commenting" everything.

I had to ship my update to Dungeon Tap (1.1.0) without Achievements this time around but will have 20 in the next version.
uid: 7849 topic_id: 3035 reply_id: 9509


[TOPIC: post.html]
#22

peachpellen

[GLOBAL: userInfoPane.html]
peachpellen
  • Contributor

  • 365 posts
  • Guests

I wanted to ask you, do you know how to make Facebook work, or is it well and truly broken currently? I downloaded Doodle Dash the other day and saw it was working in that, so if you had any advice to offer it'd be great. ^-^;
uid: 10144 topic_id: 3035 reply_id: 9512


[TOPIC: post.html]
#23

Dotnaught

[GLOBAL: userInfoPane.html]
Dotnaught
  • Contributor

  • 370 posts
  • Corona SDK

Facebook is broken too: the demo app no longer works. I am hoping they'll fix it soon as I have an app that's about ready to be submitted and I don't want to disable FB connectivity.
uid: 1560 topic_id: 3035 reply_id: 9514


[TOPIC: post.html]
#24

jonbeebe

[GLOBAL: userInfoPane.html]
jonbeebe
  • Contributor

  • 511 posts
  • Corona SDK

Facebook works, it's currently in Dungeon Tap and the just-approved update to Dragon's Keep and both were built with 2010.109.

For general Facebook-status posting, it's copy/paste code from the included Facebook sample app (might be in the original SDK, not Game Edition--just download the trial dmg if you don't have the original).

Some advice:

It can be a little confusing when it comes to setting up the application WITHIN Facebook and getting all the settings just right. I wrestled with this one quite a bit.

In my Facebook Friends Leaderboard tutorial, it outlines step by step instructions on getting your Facebook app setup within the Facebook developers backend (Step 2), and shows you what settings you need to use. Some of it is irrelevant to JUST Facebook status posting though, because the tutorial was meant to set up an entire Facebook Friends Leaderboard (like you see in Doodle Jump & Bejeweled Blitz), so I think you can ignore the 'domain' steps but everything else still applies (oh, and in the tutorial you DON'T need your API key for facebook leaderboard, but you WILL need it for Facebook status posting per the included Corona sample app).

Here's a link to the tutorial:

http://ideveloper.kodingen.com/2010/facebook-friends-leaderboard/

Other than the stuff you have to do on the Facebook site itself, once again, the rest is just copy/paste (and replacing with your own api key and stuff) from the Facebook sample app.
uid: 7849 topic_id: 3035 reply_id: 9515


[TOPIC: post.html]
#25

jonbeebe

[GLOBAL: userInfoPane.html]
jonbeebe
  • Contributor

  • 511 posts
  • Corona SDK

@Dotnaught: Facebook posting is working fine in all of my games, I even have a Facebook Friends Leaderboard in two of them.

In the sample app, are you replacing the api key and everything with your own Facebook application info? The sample app won't work by itself, because you have to register as a Facebook developer, set up an "application" and then get your credentials from their backend.

Here's a huge tip that, while in the process of figuring it out, through me through a bunch of hoops:

Once you're logged into the Facebook developer's backend, in the Mobile and Devices sub-panel, make sure Application Type is set to HTML 5 / mobile web. It’s a little ironic, but trust me status messages just WOULNDN'T POST when I had it set otherwise and it took me forever to pinpoint the problem. Should save you a huge headache.

----

Also note that the above "hardships" with Facebook currently lie within the way Facebook applications/status posting etc. work and is not something Corona or Ansca has control of, I wish Facebook would make it a little more streamlined.
uid: 7849 topic_id: 3035 reply_id: 9516



[topic_controls]
Page 1 of 2 1 2
 
[/topic_controls]