1
Beacon Midi
OjyaLeaderboard Stencyl
Contacts
OjyaLeaderboard Unity 3D
Ojya Replace
Job Opportunity
Beacon Midi is an iOS app that automates midi controls by the proximity value of a beacon BLE device.
The fields of application are various. From live-theater to studio recording applications.
It connects to any DAW application and sends midi values to midi controllers.
Easy to configure.
Example root: Beacon device --> iOS device --> usb-midi or wireless midi --> Logic Pro X
A theatrical application example.
- Control the amount of a reverb plugin of each actor by his/her proximity on the audience, front of stage.
- Play notes ,sounds Fxs by the proximity effect, similar to a theremin.
- Dimmer lights by sending midi values to a light midi-controlled console.
And now in version 1.1 , for each beacon, you can specify 'rssi intervals' sending different midi information for each interval.
I am happy to communicate that STENCYL finaly has a facebook leaderboard extension.
We are developing a game with stencyl that will come out soon but we needed to integrate it with facebook.
As you may know games like Candy Crash or many other games have these success not only for the game play but because users challenge friends with the facebook , sending helps and posting scores. And of course you may see a map of your friends score on your leaderboard.
Started first as an html facebook project in September 2014 but than decided to make only an native extension for ios and android.
As you many know, attempts were made in the past with no results in Stencyl platform.
The extension now has all the features a game developer could ask, for making a powerful leaderboard and connect all players together.
Of course you can use this extension only to post on Facebook timeline Images and info, without using the leaderboard part in your game
Now you can: 1. Install your application and Login in facebook with the permissions, so you
can post scores, retreive information of your facebook friends.
THE MOST IMPORTANT for gaming !
2. Get the json-list of scores of your friends that play the game.
3. Make facebook apprequest , meaning ask, give and accept bonus like lifes, stars etc.
4. Challenge friends and posting score,images and information on their facebook timeline.
4 methods: Custom image , Screenshot, file image, URL.
5. There is also, above the specific blocks of certain Facebook functions, a general block
that you can write your own facebook graph api action in stencyl.
6. And last the NEW Open Graph Level Scores with a logic mechanism build inside Stencyl.
a. Create for first time or update existing level-scores in Facebook server.
b. Save all the scores also in local device.
c. Play the game and post scores offline if there is no connection, and post later
when the user is connected.
d. Compare and join the scores of the local devices and server scores with an
option if the user wants to keep only the highest score of that level.
e. With the level and scores you can post also bonus achievement that
your friends can see. - ex: Level 1 with (Score:2000 Bonus:20)
f. The level-scores mechanism is build in that way to minimize errors of posting
score or loosing data.
g. Two leaderboard Maps. One for each level where the Facebook user's icon
follow the path , and one map with all the levels of the game.
Above the facebook OjyaLB blocks i wanted all of you to have not only the extension but a real game leaderboard so i included with the extension also a sample game.
So you can test facebook connection and the leaderboard as soon as you create ofcourse a facebook application on facebook developer site.
In the game there are also blocks and code that you will find really useful for your games. It is a work of months!
It is for the work of all this months and i think all of you will appreciate the effort. The extension will have a code,password that will be sent with an email to you and with a link to download the extension.
Please, follow always the Facebook policies that may change. I will remove a block only if it will be removed totally as a call by Facebook API and not if will be changed as a result or behavior only.
OjyaLeaderboard extension uses classic calls of Facebook. The app review by Facebook concerns only the developer of the game. Use our calls as Facebook policy says in respect with the current API.
Inside our PDF you will find a quick section of how to obtain your facebook app review easily.
You have to change also the graphics , to suit your game idea, as some illustrations are used only for the demo-developer purpose and NOT for the end game-leaderboard release in public, as they could be under copyright.
From July 2019 and using facebook API 3.3 , you need to have a web-hosting service with ftp and sql access , using sql-scores.
Facebook has depreciated the function Ojyaleaderboard was using for the scores.
Although, it is more professional and secure to use an SQL-database for the scores. And it is very simple and automatic to setup the sql-database using Ojyaleaderboard.
Current Version 13a
The extension is tested with Stencyl 3.4.0 build 9300, Stencyl 4.0.4 and Stencyl 4.1.0
Facebook iOS, Android SDKs 8, Xcode 10.1 as minimum to compile.
Tested with the latest Facebook API v10.
Compatible with iOS and Android.
Information updated in 3-03-2021
Ojya Leaderboard Version v8 and above has Unicode support .
Download always the latest PDF from Section 'Fixes-Updates'.
I will support the extension ofcourse and will be updated often.
Thank you and good developing with Stencyl !
A.Venetis - Ojya Games
Version 13a
First take the attachment file of the email we sent to you.
For version 8 there is ndll4.zip for OjyaLeaderboard4 extension and ndll5 for OjyaLeaderboard5 extension .
Then download the zip file from the link in your email.
The zip file has: OjyaLeaderboard4 (Stencyl Extension version 7g), the new OjyaLeaderboard5 (Stencyl extension v8), Ojya Leaderb Game v8, AndroidManifest.xml file , PROJ-info.plist file, folder 'export v8', folder 'slimed NDLL for ios' compiled files for distribution and the PDF of the extension.
In your email there is also your password.
Ojyaleaderboard facebook extension to work needs:
1. inthebox-macros installed2. The AndroidManifest.xml for Android and PROJ-info.plist for iOS files that you have to modify . So your game can comunicate with your facebook native application.3. Install the extensions OjyaLeaderboard4 and OjyaLeaderboard5 (in stencylworks/engine-extensions)4. Replace inside OjyaLeaderboard4 folder the ndll folder with the one we sent in your email, named nddl4.zip and inside the OjyaLeaderboard5 folder the one named nddl5.zip
-----------------------------------------------------------------------------------------------------------------------------------------------------
1. Install inthebox-macros MAC-OS VERSION :
A. If you have ever installed Haxe from Haxe site in your system use this:
a. in terminal type: haxelib setup /Applications/Stencyl-full/plaf/haxe/lib (change the Haxe lib folder repository)
b. make with the terminal default directory: cd /Applications/Stencyl-full/plaf/haxe
c. in terminal type: haxelib install inthebox-macros , it will download and install from internet.
B. Otherwise you can use Haxe inside Stencyl for installing inthebox-macros:
Update for xcode 7 and El Capitan using Haxelib inside Stencyl
a. Make Haxe repository the lib folder inside Stencyl with terminal:
/Applications/Stencyl-full/plaf/haxe/haxelib setup /Applications/Stencyl-full/plaf/haxe/lib
b. Than Install inthebox-macros:
/Applications/Stencyl-full/plaf/haxe/haxelib install inthebox-macros
1B. Install inthebox-macros WINDOWS VERSION :
To avoid show errors that Neko.ndll doesn't exists please install Haxe from the site haxe.org. This will install
Haxe and Neko libraries in the system leaving also Haxe and Neko folders inside Stencyl.
After the installation you have to do 2 things:
a. Make Stencyl's Haxe lib folder the default repository. Where Haxe downloads and put all the libraries
from Internet. Run cmd.exe and type the next thing:
haxelib setup "C:\Program Files (x86)\Stencyl\plaf\haxe\lib"
You will receive this: haxelib repository is now C:\Program Files (x86)\Stencyl\plaf\haxe\lib/
b. Download in the box macros: Important!! to download and install run cmd.exe as Administrator.
type this: haxelib install inthebox-macros
Download will start and at the end you will have inside C:\Program Files (x86)\Stencyl\plaf\haxe\lib
inthebox-macros folder installed.
2. Create a Facebook application as described in section 'FACEBOOK PART',
and create a Test App of this application, so you can have the information to modify AndroidManifest.xml and PROJ-info.plist.
Locate in your Facebook developer site the number AppID of your TestApp and also your FacebookdisplayName.
After that edit ONLY the iOS file PROJ-info.plist as below. The AndroidManifest.xml is updated automatically.
( Please, for users of prior versions, replace the original AndroidManifest.xml of stencyl inside the locations
Stencyl-full/plaf/haxe/lib/lime/lime/legacy/templates/android/template and
Stencyl-full/plaf/haxe/lib/lime/lime/templates/android/template )
A. First go to 'include.nmml' file inside OjyaLeaderboard4 extension folder and with a texteditor insert your 'facebook app_id' and your 'display name':
For Android and AndroidManifest.xml the precedure is automatic when compiling. This from version 7e
B. For iOS in the PRO-info.plist put you AppID example 6748773882999 like this: <string>fb6748773882999<string> with fb.. at the begining rigth down the key <key>CFCundleURLSchemes<key> .
PROJ-info.plist for iOS
Replace PROJ-info.plist in : Stencyl-full/plaf/haxe/lib/lime/lime/templates/iphone/PROJ/
and in legacy path also: Stencyl-full/plaf/haxe/lib/lime/lime/legacy/templates/iphone/PROJ/ with the one you modified.
So now you have both files replaced with your facebook application AppID and Facebook displayname. Now your game will open facebook native app, login and then return back to your app-game. As other games do on login with facebook.
----------------------------------------------------------------------------------------------------------------------------------------------------
3. After that just install or drag and drop the OjyaLeaderboard4 extension folder inside the path /stencylworks/engine-extension/ , as you do with all stencyl extensions.
Do the same also for OjyaLeaderboard5 extension.
----------------------------------------------------------------------------------------------------------------------------------------------------
4. Next you need to replace inside the OjyaLeaderboard4 folder the ndll folder with the one that i sent you with your email. This contains your password-code. the name is nddl4.zip
path: /stencylworks/engine-extensions/OjyaLeaderboard4/ndll/
From version 8 , you need also to copy manually the 4 iOS framework files inside the NDLL/iPhone folder.
Those files are located inside the folder 'Install NDLL folder in ext' of your OjyaLeaderboard package zip folder you downloaded.
The same goes with OjyaLeaderboard5 extension and the nddl5.zip
After that you are DONE !! Open our sample game or make yours. Select either OjyaLeaderboard4 or 5 extension.
(Note: it is better to delete the folder 'export' inside generated-games folder every time you switch extension 4 or 5.)
Read the PDF 'Info install NDLL folder' inside the OjyaLeaderboard package folder you downloaded.
After Installation and the Facebook part you can test your game.
Go to Settings and in the voice Mobile fill all the required information.
This is the same procedure as Stencyl suggest you when making a game for Android and iOS. Make also the certificates for iOS and for Android.
! IMPORTANT THING: The App ID on stencyl-settings-mobile MUST be the same as that in Facebook Developer App settings site.
For IOS is the field Bundle ID and for Android the field Google Play Package Name
Than test your game.
Please see also the OjyaLB KeyHash for Android and how to use it.
For the Ojyaleaderboard to test you need to create a Facebook App and have those 3 things:
1. the AppID of your Facebook Testing App.
2. ID Page Facebook, needed to post challenges in friend's timeline.
3. Insert those values in the game.
First you need to create a Facebook application, as the facebook developer site will guide you, and also a test application, TestApp, of your application. Facebook site will guide you and it is very simple.
IMPORTANT: set your facebook app as a 'game' in the application category.
1. Create the iOS and Android sections by pressing "+add platform " and maybe you need to create also a Facebook Canvas. (There is no need to create a Facebook Canvas).
Follow the screen bellow as settings.
On the "Advanced" tab activate on top Native or Desktop App - YES
See also the PDF for more details , that came with your package.
2. Now you need to have the ID Page Facebook.
For the ID Page Facebook , create a Facebook Page of your game.
You can fine this ID in your Facebook Page, section INFORMATIOM and in the bottom you can see the ID Page Facebook number.
This ID goes in the field "place" of the extension block OjyaLB Post Challenge. (The ID Facebook Page works like a TAG-Place)
Last, create Virtual Facebook Test users and also make them friends together so you can test your game as in real life. Just Select ROLES in the left menu in your FacebookDev application site and select TEST-USERS on the top menu
3. Now Insert those value in the game.
Open the scene behavior FbAppPref and insert the following:
a. Fb AppID
b. Code we sent you via email and last your
c. facebook page ID created before in the attribute 'G-ID FB Page for Challenge'
Leave the other information.
General demostration
New OjyaLB Post Challenge block version 2
Ojya Leaderboard Facebook Kit V5 Tutorial
Import Ojya Leaderboard game Kit in your game
Create the Leaderboard path
Version 9a - Multi type Sharing Items
Version 9b - Bonus Sharing Items saved in facebook server
Although we don't provide support for our game, cause it is ment to use it for helping other developers create their own leaderboard it can be used to understand the mechanism and also if you want modify ours.
Order of actions our game handles the scores (OpenGraphScores)
VERSION 4 (also version5)
1. User makes a score on scene Startgame.
2. Game loads the localscoresList (scores stored before in device- if any)
3. Game Compares the actual score with the localscoresList. If "action", ActionHighestScores is "1" then keeps the highest score of the level.
This is used also for offline gaming.
4. After Game gets the User Scores from FB Server , saved in attribute GraphScoresRespMe ,using the Open Graph block with the certain actionType.
5. Game compares also the localscores and the FBserver scores and keeps the highest if ActionHighestScore is 1. After that saves all user levels scores in FB server and also in localdevice( local saving using "FBlevel_score to localScoresList" custom block)
6. After that game gets all friends scores from FBserver, the users scores exists just from step 4, and designs the leaderboard.
After each step the game saves the scores also to localdevice of the user and of the friends, for backup and offline gaming.
1. Startposcores is just a simple start.
2. localscores: This is indeed an offline saving scores inside the mobile before posting in internet to facebook server.. It is usefull for playing the game if you don't have internet access. It collects all the data and when you have internet , the next time unificates all the score in internet with the scores of your mobile.
There is also an attribute ActionHighestScores that if it is 1 keeps only the Highest score done for a certain level.
3. After that use GetMeScores. This gets the user scores from Internet. If there are no scores posted before or internet failure connection will execute popupdialog Event and ask you to retry or pubblish the scores for first time.
Attention if you have JUST posted scores before will create a new action and the other scores will get lost.
Use PUBBLISH only for the first time you post scores, the user use your game first time.
Otherwise push RETRY or CANCEL of the popupdialog.
4. CreateScoresFT: This POST Scores for first Time. Create an actionType with the scores. Must be used as said before only the first time.
5. PostScoresFB: This UPDATES an existing actionType ID with the new scores of the player in FB server.
This function compare the localscoresList (the user's localscores-just played) with the one from FB server graphScoresRespMe.
So makes the unification and keeps tha last level score played or the highest score of the level. Depends of the attribute ActionHighestScores.
a. Update level and bonus (if bonus is 0 or greater)
b. Update only Score if bonus is -1.
c. Create a new level if the level doesn't exists (same with bonus -1 or >=0)
6. FBScores To Local: This Saves user scores got from Internet to Local List
7. Cancelbutton: This is a help for the popupdialog error that if there is no internet connection loads the leaderboard offline.
8. designleaderboard: Start designing the leaderboard
9. Graphscores: Gets the user Scores graphScoresRespMe attribute and friends scores graphScoresResp attribute.
This also saves the scores from FB to local device.
(the graphScoresRespMe was taken before using the GETMESCORES)
10. graphscores JSON: analyses the Json of graphScoresRespMe and graphScoresResp . Than Start designing the leaderboard.
11. IMGTOTEXT : save andylist2 List (the list for caching FB user images for better performance localy in device). Needed for offline gaming
12. TexttoImage: Loads andylist2 List from device. Needed for offline gaming.
SORTING SCORES AND DESIGNING THE LEADERBOARD
13. Designlb2 and leaderboard: Design the leaderboard. It uses the PathFBuser. The order of the users MUST be from highest to lower. The sort is done by the custom block orderscoreid
14. orderscoresid: Orders the leaderboard score starting from highest score of the level.
15. PathFBuser. Draw FBuser images and scores in the correct position by guiding the graphic path of the leaderboard. Defined by attribute XpathlbList and YpathlbList , cordinates of the yellow path.
This is for making apprequest to friends. Exchanging Bonus, lifes etc.
1. openbonusdialog: Design and open the bonus dialog.
2. getrequestlist: Gets from internet the apprequest of the user.
separates those of ask (frinds ask from you) and get bonus( friends give to you
creates two LISTS listaskbonus and listgetbonus.
3. reqsaskbonus: Design the askbonusdialog (friends that ask you to give bonus)
4. getbonusdialog: Design the getbonusdialog (friends that give you a bonus)
5. updateaskbonus(Not used on version4-included above): just as the above but designs again the other 9 users. SWIPE effect
6. updategetbonus(Not used on version4-included above): just as the above but designs again the other 9 users. SWIPE effect
7. SWIPE left and rigth
8. Closebonusdialog: Give bonus to selected friends
9. closegetbonusdialog: Get the bonus
10. updatebonus: new v4 function. This updates the bonuslist without opening the dialog. It is used only to update the numbers of requests under the buttons "Get Bonus" and "Friends Ask"
Update: "updateaskbonus" and "updategetbonus" are now inside "reqaskbonus" and "getbonusdialog" perspectively.
Requestdialog. Open the dialog that YOU ask bonus from your friends
This is for posting to frineds timeline
1. challengedialog: Design the dialog with Fbusers images and friend image you want to tag
2. Postchallenge: Post to FB user timeline
3. Opendialog: open the dialog
4. Closedialog: Close the dialog
PopupDialog: This is the dialog that appears in two situations:
a. If this is the first time the user post a score. The game will ask you to post the
scores. Will create an actionType with unique ID. By doing this, localscores will
be written to FBserver. DONT USE THIS if there is just an actionType ID,
meaning if the player has just posted scores before.
b. The dialog will appear if there is no internet connection. By pressing "cancel"
will go for offline gaming.
First time you see RETRY Button. Makes an attempt to get the scores
Pubblish button: Create for first time actionType ID that contains the scores.
Cancel button: design the leaderboard offline
OjyaLeaderboard setup game:
1. Created: Draw the map of the leaderboard and the buttons bu using trigger "drawbackground"
2. defineAttributes: This defines the game attributes by name, the fonts and one group for anchor to screen the buttons actors of the scene. see the "IMPORT GAME" section.
3. defineFacebook: This defines all the attributes and codes taken by the Facebook Developer site.
4. drawbackground: This draws the leaderboard scene. Only the map, the debugimage for testing and the buttons on screen. Please change the attributes of XY of each element to place them on screen as you want.
1. deleteallreqs: This is only for the developer to delete all the bonus requests from FB server of the user.
2. buttonsachor and unanchor: This is a service trigger only. This anchor the screen buttons on screen when a popupdialog appears. Otherwise by the effect of camera-panning the buttons when the dialog opens or close makes the buttons disappears.
By using this custom block at scene ojyaleaderboard/behavior Ojyaledaerboard/created Event
you post the score of that level , bonus and if the Action is 0, just replace the local and Facebook score with the new one.
If Action is 1 keeps only the Highest score of that level in both local scores and Fb server scores.
If bonus is -1 updates only the score of that level and keep the previous bonus.
If you set this variable to TRUE uses the new OpenGraph Action Scores method.
If FALSE uses the original Facebook one score mechanism.
OpenGraph Levels Scores action
Quick Guide
See PDF for details of using and examples
This is the block for posting level-scores-bonus to facebook Server. Not the classic only score default of facebook.
You have 5 options: Post , Update , GetFriends, GetMe, Delete.
You don't need to create ANY opengraph action or object in the facebook site.
All is done automatically, using only this block.
You have to provide ONLY 1 field. The string of scores. The other fields are defined by OjyaLeaderboard.
The fixed fields are explained inside the PDF with the instructions, in case you want to use only the extension and not our game.
fields objectURL and Field_B are not used
1. The Post action must be used to create for the first time the score field.
Than just write the string score in the field level_score.
The response will be an ID number of that action created.
The next time you have only to Update this action by writing the ID in the field idAction and ofcourse the new scores in the field level_score.
2. UPDATE action.
As said above, this is the most used option that you will use each time you have to update the levels , scores and bonus.
To update select update from the ToDO dropdown menu and use only the ID of the actionType created the first time.
Than just write the new scores in the field level_score.
3. GETME action.
Select this to get the scores from the user. Meaning the scores of the facebook user.
The Json response will have all the information like the string scores, the ID of the actionType, the name and the id of the facebook user and other information of that action.
4. GETFRIENDS action.
Select this to get the scores of your friends that play your game. Leave all the fields the same as you did with the POST option.
5. DELETE action
This option will delete the action by using the ID number of that action. No other fields need to be written.
Ofcourse this is ment only for the developers as it is rare to delete scores from the server while using the game normaly in real life.
This is a guide for importing our sample leaderboard game ,that comes with the extension , in your existing game. For better understanding please use our game "OjyaLeaderboard v4-v5-v6" before doing this procedure.
Our game is in landscape mode and uses 2 scenes.
Please locate the folder "export".
Steps
1. Install our extension Ojyaleaderboard4 as described before to your existing game.
2. Copy to your "extras" folder of your game the files inside our "Ojya Leaderboard v4" game extras folder.
3. Open your game and activate "OjyaLeaderboard4" extension. Close and reopen the game.
4. Create 11 Game Attributes with the EXACT names:
a. fbuserid (text)
b. fbusername (text)
c. xboxglobal (number)
d. bonuslevel (number)
e. draglevel (number)
f. andylist2 (list)
g. deleteuser (boolean)
h. leaderboard name (text)
i. scenegame name (text)
j. buttonfirst (boolean)
k. FBusercheckonce (boolean)
5. Create an actor group in the settings menu, named "buttonsanchor".
IMPORTING ACTORS-SOUNDS-FONTS AND BEHAVIORS
6. Import the Actors in your game from our folder export. Those are png files
NOTE: Importing the actors imports automatically also their behavior. If not, do it manually as explained bellow.
7. Locate the 5 actors with the below names and assign them to "buttonsanchor" group in properties.
a. backtogame
b. buttongetbonus
c. buttonaskreqs
d. buttonrequests
e. levelframe
8. Import the fonts and the sounds
9. Create 2 scenes one named "Startgame" 1024x640 pix and the other named "leaderboard" 8064x1568 pix.
Create also 5 tile layers for each scene above.
10. Import all the actor behaviors from our export folder in your game. The name start with "Act".
example: "Act actorinvisible" . This is the behavior to assign for actor with name "actorinvisible"
11. Import the 3 scene behaviors , "FBloginStart" , "OjyaLeaderBoard" and "FbAppPref"(new version5e).
There is also a "debugDraw" in version 6c.
ASSIGNING BEHAVIORS TO ACTORS(Usually not needed) AND THE 2 SCENES
12. Assign to all the actors their respective behavior(Note:Read above importing actors)
example: for actor "actorinvisible" the behavior "Act actorinvisible" , etc
IMPORTANT: only for actor "actorinvisible" assign 2 behaviors. "Act actorinvisible" and
"panningslave to img ActorInv"
13. Assign for the 2 scenes: Scene "Startgame" the behavior "FBloginStart" and for scene "leaderboard" the
behavior "OjyaLeaderBoard" and "debugDraw" for version 6c
Assign also the scene behavior 'FbAppPref' to both of the scenes ('Startgame" and "leaderboard" scene)
DONE !!!
After that open scene behavior "FBloginStart" , locate "defineAttributes" custom block and assign the fonts to the fonts Attributes matching the exact name.
example: font attribute "F-Loginuser" to font "Loginuser: imported from our export folder.
Then locate defineFacebook and insert all the information from your Facebook Application and your code.
Now do the same with scene behavior "OjyaLeaderboard"
Locate defineAttributes and assign to the font attributes the same name of the font.
Assign at the end also to the group attribute "buttonsanchor" the group created before "buttonsanchor".
Make also sure you have created before the Game attributes with the exact name as below.
Now locate the custom block "defineFacebook" and insert all the necessary information of your facebook App.
Note for Version 5e and v6 with scene behavior 'FbAppPref'.
To insert the facebook application information in your game you need to use only the behavior 'FbAppPref'.
No need to insert the info on the block 'defineFacebook' for each scene behavior as described above.
This 3rd new scene behavior has the facebook app information for both other scene behaviors.
Keep in mind that for API 2.8 and version v6 there is no need to create custom opengraph objects and acionsTypes. So the "G-Object ID" and "G-OG objectURL" attributes are obsolete.
To run the game you need to define 3 attributes (v6):
'Fb AppID' , 'Code', 'G-ID FB Page for Challenge'.
Leave the others as they are defined.
(define before The AndroidManifest.xml for Android and PROJ-info.plist in the 'INSTALL' section)
Important note:
Run first scene "Startgame" and after the scene "leaderboard" because the facebook user id has to be created first with login and this is in the scene "Startgame".
The scene "Startgame" has also the score attribute "xboxglobal" game attribute for using it with scene "leaderboard"
As you can see all the actors , scenes, sounds and the 11 game attributes are defined by the block with their exact names. With this way you only need to create actors, sounds and game attributes that match the name.
This is useful for importing to different games elements and avoiding having after blank blocks in stencyl.
This is a great feature in stencyl.
After that , and after you have inserted all the facebook information you can test the game.
If there are some graphic issues in designing the leaderboard, you can change some X Y coordinates and other attributes in the trigger behavior "drawbackground" in the scene behavior "OjyaLeaderBoard".
Please note that we don't provide support for the game imported. The game is for helping creating your own leaderboard.
Although, the game has great features like offline gaming and is studied as error proof and avoiding loosing information of scores and levels.
Ojyaleadrboard is ment only using our extension "Ojyaleadrboard2" with your games
Game Ojya Leaderboard
version 5 and above
Custom blocks and trigger events for the user to set the game .
Understand the 3 actions (POST, LEVEL, LEADERB)
Attributes to control drawing the background leaderboard map
«leaderboard action» Game attribute = post , level or leaderb
(same as «G-leaderboard action» attribute ojyaleaderboard BEHAV = post , level or leaderb)
The new v5 game works using 3 actions of the above attribute.
Post : post the scores and designs the individual level
Level: design the individual level (post scores if there are scores played in offline)
Leaderb: design all levels – the leaderboard (post scores if there are scores played in offline)
Post and Level uses one png max 4096x762
Leaderb uses 2 pngs 4000x1500 combined: 8000x1500
Please in this tutorial when we refer as game action we mean those 3 options.
Main Attributes to consider the user for setting the game v5:
“define attributes” CUSTOM BLOCK
leaderboard action (game attribute): The action (Post , Level, Leaderb. Explained above)
draglevel (game attribute) : Its is the level of the game attribute
xboxglobal (game attribute): It is the score of a level attribute
bonusLevel (attribute – ojyaleaderboard BEHAV.) : It is the bonus of the level
attribute. (if -1 doesn’t update the bonus of that level)
ActionPostScore (attribute – Ojyaleaderboard BEHAV.): It is the condition to keep only
the high score or overwrite score of a certain level (1 high score, 0 replace)
noUserleaderb (attribute – Ojyaleaderboard BEHAV.): It is the number of users that
are displayed on the leaderboard map with all the levels.
attribute “leaderboard action=leaderb”. The game allows up to 3 FB users displayed.
Default is 1. ( allowed numbers : 1 , 2 or 3)
NoLeaderbLevels (attribute – Ojyaleaderboard BEHAV.): It is the number of the
game levels: default is 61.
If you change it please change also the coordinates of each level actor
on the two lists: Xpathlblist8 , Ypathlblist8
So the game has the right coordinates to draw the levels and the users on the path.
This is used of course for all levels leaderboard design. (leaderboard action=leaderb)
G-set X maxscale (attribute – Ojyaleaderboard BEHAV.):
It is the maximum score the X scale of the design map path can hold.
For example the single level map can handle for design a max score = 10000 points.
If the user sets the value to 0 than the game sets
X scale maximum score to the highest score done of that level made by a FBuser.
This is for “POST and LEVEL” action design. So single level design.
Instead for “Leaderb” action please this to the number to the maximum length of the
PNG Image of the leaderboard map. (if the the leaderboard map of all levels is
combined by 2 other pngs then this is the sum of them)
The default of our game is 8000 (pixels).
For drawing purposes and designing the background leaderboard map
At trigger event “drawbackground”:
To control the drawing of the pngs maps , the panning of the camera and the limits
of the leaderboard map please use and change those values of the attributes:
Those attributes have the function to stop the panning when the leaderboard map comes to the end of the size.
1. “Xmaxpanning” and “Ymaxpanning” attributes ojyaleaderboard BEHAV.:
Are equal to the length in pixels of the background png file.
In leader action(designing all levels) the game combines 2 pngs of 4000 pixels width
each: So 8000x1500 pixels
(extras folder: pathstencyl10a.png and pathstencyl10b.png)
So the leaderboard map maximum panning coordinates but in negate
are: -8000 and -1500
Instead for the other two actions it is: 4064x762 and it is only 1 png .
(extras folder: pathstencyl2.png)
2. xstartbackimg(0) and ystartbackimg(0)
It is the draw start coordinates of the pngs.
3. Xcamstart and Ycamstart
It is the position of the camera actor. It is in negate the half screen size of the game.
The screen size of our game is 1152x768.
So Xcamstart is 1152/2 = 576 and Yxamstart 768/2=384
«leaderboard action» Game "POST, LEVEL,LEADERB" CODE
“POST” (custom blocks and triggers names CB, TRG in sequence)
a. Online
b. Offline (unable to get data from internet)
“LEVEL” (custom blocks and triggers names CB, TRG in sequence)
-Only design level – Posts incase there are scores made offline before-
“LEADERB” (custom blocks and triggers names CB, TRG in sequence)
See also the PDF file inside the 'Ojyaleaderboard folder' for version 6 details.
Game Ojya Leaderboard
version 7 Wrapper Blocks
Ojya Leaderboard Extension 4 now has wrapper blocks
and also an OpenGraph Celebrate block
Ojya Leaderboard 4 extension has a new mechanism for the calls and callbacks.
We have introduced wrappers for making the calls and getting the callbacks.
This should be obvious as first thought ,BUT facebook calls needs sometimes more attention.
Sometime a wrapper block by its self is very limited.
In certain situations facebook calls must be repeated one more time or two if the certain result is not came with the first callback.
And also, if callback doesn’t come, cause of slow internet or other network errors, the wrapper must be unblocked , with an error message result, so the game can be continued. Otherwise will freeze in that point.
So, with the 14 facebook blocks with wrapper in version 7, we now introduced also a common block named ‘OjyaLB Callback Setting’.
This block must be inserted just before the facebook call block. It contains settings for the call , about the attempts to do IF the condition didn’t arrived with the callback.
Fields: ‘Not Exists’ - The string condition we search inside the facebook Json callback
‘Retry Sec’ – Make attempts, retry the same call bellow after specific seconds after the first
callback came.
‘Attempts’ – Number of the attempts to make with the same call.
‘Unblock Wrapper' – Unblock the wrapper if no callbacks comes, after seconds.
Idle callback situation. Seconds calculated like this: (retry sec x Attempts)+1 sec
So , with the above blocks we try to call facebook graph Api /me , and if the first call that comes doesn’t have the string ‘G-OG titleAct’ will make every 2 sec 2 attempts, before we get the final callback result inside the wrapper.
After that, will execute the code inside the wrapper with the ‘callback’ result Json we have.
We can than process it as usual with statements like ‘if’ and
‘else’.
If , no callbacks come at all after 2sec x 2 attempts + 1 sec = 5 sec will unblock the wrapper with a ‘callback’ result of ‘error outoftime’ generated by OjyaLeaderboard extension.
With this way , we have a really easy and powerfull result of controlling our facebook calls and callbacks. Inside our leaderboard game you will see the examples for each call what settings we used.
For example, all facebook calls with an external facebook dialog must have the setting ‘ BlockWrapper’ cause we can unblock the wrapper manually with the dialog, pressing the buttons, ‘OK’ or ‘Cancel’.
You can ofcourse use the settings block with zero attempts and 3-5sec. With this way, with the first callback will give the result without further call attempts. Just put 3-5 seconds just for the ‘UnblockWrapper’ condition, if you don’t want your game to freeze without callbacks from the facebook server.
As you can see, having a wrapper block is really the easiest, cleanest code way to have complete access over your facebook calls.
Section for fast fixes - updates
This section is for fast fixes sometimes after a new update. Visit always this page.
Next update will have the above fixes.
Current Version for OjyaLeaderboard: V13a.
Download last Update of Stencyl OjyaLeaderboard PDF.zip , 3 MAR 2021.
Password of the zip file: the name of the bool in line 94 in OjyaLeaderboard.hx file.
This is a quick guide for using some of the blocks of the extension
Refer to the PDF with the instuctions for more detailed info and examples
Ojya Leaderboard Extension is used only providing the necessary fields inside the block.
The user just need to create only a facebook app and provide those 3 attributes:
Facebook APP_ID , name display, and a facebook page ID.
After that provide only the neccesary information inside the blocks as decribed in the PDF.
There is no need to create ANY opengraph object or action in the facebook site.
Facebook setup: MUST be used in the first scene before using other blocks. Put your facebook AppID and your code from email sent to you.
This Initialize the facebook SDK and extension.
This is only for Android. Use it the first time you test the game and only with the OjyaLB FB AppID-CODE block. Put OjyaLB KeyHashe after the OjyaLB FBAppID.
Open Android Activity appliaction from the stencyl menu Debug/Android.
Then check a trace with the word PXR : Hgjsj53688477839kkdQa
This is your Key Hash you have to put in in you Facebook Developer App Page where the Android section is.
Check if there is a facebook connection just. A user logged in. True or false
LOGIN WITH READ PERMISSIONS
Login to Facebook with public_profile and friends_list permissions as default , if you leave it blank.
In the text field write other read permissions you need your game to ask the first time the user installs the application in his facebook profile. (write the permissions with comma separated)
Get the callback and analyze it if result has 'success' or 'error' string inside.
See our game Ojya Leaderb Game , the behavior 'FbLoginStart' , custom block 'LogintoFacebook' to undestand how to build the login and with what order.
GET PUBLISH PERMISSIONS
After used the OjyaLB Login Permissions, you can use this block to get the publish permissions.
Analyze the callback if has the 'publish_success' or 'error' string inside.
Blocks Additional Permissions (not used often - use only the above login blocks):
OjyaLB RequestReadPerm: This block requests additional permissions. To be used after the 'OjyaLB Login block' or when there is just an active session. (write the permissions with comma separated)
OjyaLB connectForPublish: This block is like the OjyaLB Login but asks only for "publish_actions" permissions. Can be used without the OjyaLB Login block.
BLOCK USED TO POST TO TIMELINE IMAGE AND TEXT
Facebook 'me/feed' call
This post to a friends Timeline. In our game is a challenge image with text.
4 options to choose the image: 1.CUSTOM from image attribute , 2. Screenshot, 3 fromfile ,4 URL
a. Custom Image: uses a Stencyl image attribute in the field 'picture'.
b. Screenshot : Just select screenshot, no need to provide the 'picture' field
c. External Image: Use the 'picture' field for writing the name of the file like 'imageback.png' (this image must be inside your extras folder, in your game directory).
d. URL: if you select 'url' you must provide the url inside the field 'link'. No 'picture' field required.
It is a Graph API 'user'/feed. See Facebook developer site of how this works.
The only trick is that for the field "place". You have to put there a Facebook Page ID.
Just create a facebook page for your game and than visit your facebook page and click on the INFORMATION section.
At the bottom of your page you will see the ID Page Facebook. Copy that on place field.
The callback is the ID of the specific post.
API 2.9 - fields name, caption and description are depreciated
Inside our PDF there examples of to use this blocks and where it is used inside our game.
BLOCK GAMES.CELEBRATE : USED TO POST TO TIMELINE IMAGE AND TEXT
Facebook 'games.celebrate' opengraph action call
With this block you post to timeline a 'games.celebrate' opengraph story with image and links.
Provide the fields, also as described in facebook site for 'games.celebrate' and select if the image has to be attached in the object or the action.
We prefer object as one can view more details and also link clickable.
Insert a Stencyl image attribute in the field 'picture'.
BLOCKS USED TO SHARE BONUS (see the PDF for more details if how to use them)
This is a facebook 'Gamerequest ActionType' , used in OjyaLeaderboard for send and ask for bonus.
UserID is the friend or group of friends IDs( with comma separated) you wish to ask or send request for this Object ID.
ActionType: Select send ask or turn. See how we use it in our game inside the PDF instructions.
ObjectID: This is the ID of the object. Obsolete in our game although. See PDF instructions.
Title: is the title on the top of the dialog window.
Message: The message you want to send to him.
Data: This is IMPORTANT. Is a field for internal use , you can use as a key, to filter the requests list you will get back by using
the block OjyaLB Get Request List. So can be something like /askbonus/1 and /getbonus/1.
See our PDF and how we use it in our game.
The callback is a json with all the IDs requests
This is the List of the requests you have from friends. They will be all the sends and ask for , for you.it is a 'me/apprequests' call. This callback is a Json containing all the data so you can filter using the Data field from the above module.So you can filter the requests that ask you for a bonus or give you a bonus.The json has all the requests IDs getting from friends.
This is for deleting a request by it's ID number.
This is IMPORTANT !! because as soon as you accept a bonus or give a bonus with a certain ID you need to delete that request with this ID from the server, so it will not appear again when you request once again the Requests List.
With the 3 blocks above praticaly you can share objects in your game with your friends.
Blocks for saving in local device the data for offline gaming.
With these blocks the user have the possibility to save the most neccesary data from the game for offline gaming.
Please, always use the FbuserID of the user logged in , cause with that way you can have data saved also from different users logged in the past.
There are 8 save slots, options for saving the data:
1. FbUserScores: Use the slot for saving Internet Fb user scores.
2. FriendsScore: Use this slot to save Ineternet facebook Friends Score attribute.
3. FbUserId: This slot for fb user logged in.
4. Fbusername: for the user name
5. FbUserImg: for user's image
6. Cache-Ids-Images: This for saving only for example id, and images as cache memory.
For faster loading of the leaderboard.
7. actionType: Use this slot to save the actionType that holds the opengraph Scores
8. Localscores: Use this for saving the localscores.
9. PostScores (version 5): This is a boolean. If saved TRUE than the game will try POST offline scores made before by
using leaderboard action "LEVEL" or "LEADERB"
Ofcourse you can use those slots for different attributes. We just wanted to make it easier for you with those predefined
slots, so you can load after the attributes only by selecting them from the drop menu.
Small example of saving and loading data for your leaderboard game:
With this block you save in Localscores slot only for the facebook user logged in that time the attribute ofthe local scores in your device.
And with the load object block you get the Localscores of that user.Simple like that.
OjyaLeaderboard Score mechanism: block 'OjyaLB openGraphScores'
See section on the left 'USE OPEN GRAPHSCORES'
OjyaLeaderboard Show Debug Logs: block 'OjyaLB ShowLogs'
This block is to permit to show the Debug Logs of the extension only. If you don't use it , the extension has the logs OFF by default now. Use it , and set it to TRUE to show the logs.
This is global for the .hx files and also java files of the extension.
Use it always BEFORE initialize the extension and facebook sdk, as below.
This is usefull before distribution to AppStore or Playstore. Check always the logs, before submitting your app for publish.
IMPORTANT TIP TO KNOW.
Try to make Facebook requests one after the other giving some seconds after , like 1 or 2sec.
Let the Response come first and after 2 sec execute the other request.
Instead, if you make 2 calls together you will have two responses, but than you have to filter which one JSON goes to what attribute in stencyl.
So make a call , get the Json-response, after that make the other call and take the other Json-response.
Game Ojya Leaderboard v8
double extension v8
OjyaLeaderboard4 and OjyaLeaderboard5 Stencyl Extension
SDK4.x and facebook Analytics
We introduce OjyaLeaderboard v8 with full support of the Android and iOS Facebook SDK 4.x
OjyaLeaderboard v8 now uses the new OjyaLeaderboard5 stencyl extension that has both iOS and Android facebook SDKs version 4.x
We also supply the old OjyaLeaderboard4 with the game V8 which has facebook iOS SDK4.x and facebook Android SDK 3.x. As we mentioned in our forum Android SDK3 is better for gaming and game engines with no code writing as integrates better with the android activities.
But with the new OjyaLeaderboard5 and with facebook Android sdk4 we introduced a unique feature that exists maybe only in Stencyl.
Seamless integration of facebook android sdk4 activities with the activities of the game Stencyl.
This means that when a facebook dialog opens in your game will not stop the main activity of your game, so animation will go on and sounds.
This is a unique feature that does not exists in other game platforms that uses facebook android sdk4.x
This does not occur in facebook iOS SDK or android SDK3.x.
So with this feature we update with the latest facebook SDKs Stencyl facebook integration.
And now OjyaLeaderboard has facebook Analytics supported for your game.
Learn how your game is going as new installs, launches per day etc in real time.
There is also no need to execute a login , just use the 'OjyaLB FB' block once.
( We will support the OjyaLeaderboard4 just for the android sdk3.x )
Just select the extension OjyaLeaderboard 4 or 5. The blocks inside the game are identical.
INTRODUCTION
1. INSTALLATION
3. TESTING THE GAME
PHOTOS
2. FACEBOOK PART
VIDEOS
Leaderboard Game v4,v5
Use OpenGraph Scores
SET-IMPORT GAME
Game Version 5
Game Version 7
Fixes - Updates
USE OF THE EXTENSION
version 7
Game Version 8
I am happy to announce the Ojya Leaderboard for Unity 3D.
for iOS, Android and Facebook GameRoom.
Facebook API 10.0
SQL score mechanism
Ojya Leaderboard is maybe the most complete-powerful leaderboard solution for Unity.
Brings for the first time facebook leaderboard functions to a higher level in gaming.
It offers the most advanced levels-score-bonus mechanism and sharing features for gaming and for the first time the core of the score management is inside the game.
Using the latest facebook API and SDKs you are in compliant with the facebook policies for the appevents, facebook analytics.
OjyaLeaderboard V4-V5 uses the exclusive SQL-Score mechanism.
Setup in only 3 min.
Ojyaleaderboard has the most rich and detailed posts to timeline, than any other facebook asset.
Ojya Leaderboard introduces a unique method of creating Facebook leaderboards.
It goes far beyond compared to other leaderboards, like google-leaderboards , as it has more features and is more customizable by the user , about the algorithms of the scores. You are not constrain of a certain score mechanism 3rd party leaderboards offer you.
With all these features and easy to configure, you can start right away using your Facebook leaderboard in your game.
We provided a slim designed UI , but still powerful and finished, so you can start using the leaderboard right away.
Using the Unity's advanced and simple Canvas UI system , it is really quick and simple to change the graphics of the Ojya leaderboard for your needs.
features:
* Login to facebook
* Facebook host-only server for the score mechanism 1 (depreciated)
* SQL host server for the score mechanism
* Level-score-bonus error-free score engine
* Share score information with Facebook friends and now also with
all game users installed the game (selectable).
* User configurable of keeping highest score or not of each level
* Advanced off-line score mechanism
* Sharing bonus-game items- with other players
* Challenge -post to facebook friends wall
* Celebrate victory and post to facebook wall
* Cache mechanism for faster and updated design
* Dialog windows popup for every status of the leaderboard
* Multiple Facebook users accounts support on playing.
* Multiple leaderboards now is possible, each with
levels-score-bonus information.
* Ojya custom JsonParse c# methods
* Advanced mechanism that understands every possible playing
situation: no internet connection, automatic attempts retrieving data,
data - score server situation etc
* Unicode support, for displaying foreign languages Facebook user
names.
* Uses only standard Opengraph actions and objects. Very simple for
review with API 2.8 and above (depreciated) .
* Advanced mechanism managing facebook api call limits, preventing
to remain without facebook api calls. (v5.2)
* Ojya Editor panels for quick setup and saving presets of the
leaderboard.
* Plug and play
* Facebook API 10
NOTE: OjyaLeaderboard V3 and above needs the standard facebook permissions for gaming:
public_profile , friends_list, email.
(publish_actions only for API 2.x and until 1 August 2018)
Ojyaleaderboard version 4 and 5 and Facebook API 4.0 and above, needs to have a web hosting service , for using the leaderboard at 100%.
The score mechanism is now based only on SQL-database. You can setup the database just with one click.
All other features remain the same. Sharing game objects, post to facebook timeline.
Version 5.2 , using facebook unity sdk 7.18.1, is also compliant with the facebook policy about using the appevents, facebook analytics and also facebook api call limits.
Current version 6.0
Developed and tested with Unity 5.6 f3, tested also with Unity 2018.3, 2019.2, 2019.4.13 TLS.
Tested with Facebook API 10 and Facebook SDK 7.18.1
Facebook SDK iOS 8, Android 8
Facebook Gameroom is depreciated by facebook and using Unity 2019.3 and above.
Requires at least Unity 5.6 and above till Unity 2019.2.
You can download always the most recent PDF, as we make changes also after an update package:
Zip password : the name of the boolean in line 32 of OGScores.cs script.
Updated on 15-03-2021
Ojya Leaderboard for Unity PDF.zip
Thank you and good developing with Unity.
A.Venetis - Ojya Games
For the installation of the Ojya Leaderboard please follow the main procedure as for every Unity asset in the store.
Download the 'Pass to Pass Setup' file using this link.
Zip password : the name of the boolean in line 32 of OGScores.cs script.
The Ojya Leaderboard needs inside the TagManager.asset those 5 tags:
1. fbuserpanel
2. fbcheckpanel
3. scorespanel
4. buttonmenu
5. scorespanelbutt
Download the script 'TagInsertOjya', or create those tags with the exact name, case-sensitive, before importing the Ojya Leaderboard to your project.
Ojya Leaderboard Score mechanism
No need to pay for third party server leaderboard !
Features the leaderboard has:
1. Levels , Scores and 1 bonus
2. Timestamp scores info
3. Option to keep only the Highest score made per level.
4. public Lists (<List>) with ordered information per level and score from highest to lower.
5. Advanced error-free mechanism comparing scores on-line and off-line before posting to server.
6. Ojya Leaderboard class for Json parse and <List>s management.
1. It is a really powerfull , error free mechanism to post to facebook information of the game,
like Level, score and 1 bonus played hosted on facebook server.
With this feature you can see all your friends info and design your leaderboard.
2. PLUS - it offers , when the user is not online- an advanved OFF LINE gaming score management.
This means that you can continue to change score information offline and when the user is online post
automatic the score back to the server.
The Ojya Leaderboard saves certain <List>s in the local devices for the off line gaming.
3. TIMESTAMP SCORES: Can recognize which score on a specific level was made as last,
so will keep only the last post score. This is great if user plays the game with different devices also.
4. After retrieving the score information from facebook the Ojya script 'class-OG Score', creates at the
end an ordered <List> 'listOrderLevel' that holds all the information ordered per level ,from low to high,
and each level ordered from highest score to lower.
Ordered like that it is easy to retrieve information faster.
Another important <List> is the 'localScoresList' that holds the User's local-off line scores.
The other <List> is the 'listfriendsSc' that holds the friend's scores.
At the 'class-OG Score' you will find all the information of how the lists are used and it is simple.
5. The mechanism before posting compares those lists above and understands if there are offline scores
to post or not. Retrieves always the LATEST information from facebook so it is always updated, and
uses the timestamp to see what is the latest score done by the user.
Then it posts and takes back also the information again.
On each final step the Ojya leaderboard save the information , <Lists> to local device always.
That is why the mechanism is error-free also if you use different devices to play the game.
6. We created our own JsonParse which has more capabilities on the facebook callback info.
And also to manage the <LIST>s our own methods that uses the idea of having an excel table.
All this in the Gameobject AndyFuncs , script public class-andyfunc.
Information of how to use it is inside the class.
Posting Scores to Facebook host server
To post scores to the server the ojya leaderboard uses the class-script 'LocalScores' component in the gameobject 'FacebookScripts' of the scene.
You have to set as first thing those 2 variables:
'timestamp' and 'keephighest' .
And then you post using this public method:
public void localScPost(string locallevel, int localscore, int localbonus )
Note: the string locallevel should be "level20" without space and not just "20"
Use of the 4 important lists in the class 'OGScores'
localScoresList and OGlistMeScores are compared together to post the new scores to server.
After that, the updated scores from the facebook are saved back in the localScoresList.
The listfriendsSc (friends) and the localScoresList (user) are combined together to create the
ordered all scores list listOrderLevel ,usefull for the designing of the leaderboard.
The listOrderLevel is ordered like this: from lower level to the highest. Each level has the users
ordered from highest score to lower score.
{ level1/user1/user2/user3, level2/user1/user2/user3, etc.. }
After Installation of the asset and the Facebook part you can start setting the Unity facebook SDK.
Please, follow the facebook instructions on the Unity SDK section for installing the Facebook plugin.
1. Now go in Unity and fill all the information needed in the fields, like AppID, App Name, and App Link Settings-Schemes.
Visit the facebook developer site for the App Link Schemes.
Do the same also for Android and remember to copy the Key Hash and paste it in your facebook developer
site. Also press generate Android manifest button.
2. Change the Bundle Identifires ' com.yourgame.game' in the 'File Menu-Buid settings-PlayerSettings'.
This should be the same in your Facebook developer page section under iOS or Android.
3. After that Insert the Facebook App information of your game inside our Ojya Scripts.
a. Go to 'FacebookSettingsEditor' gameObject and insert all the facebook values. This is the class-script 'FacebookSettingsEditor'.
With this information you now have access to all the Ojya Leaderboard features like Levels-Scores-Bonus , sharing helps with friends , posting - challenging your friends in the game by posting to their timeline.
And last note, the OjyaLeaderboard needs the standard facebook permissions for gaming:
public_profile , friends_list, email and of course publish_actions
So, it is really simple and immediate for review.
For more info please read the instructions in the pdf.
(We recommend this site forVector ClipArt - our background - http://shmector.com)
For the Ojyaleaderboard to test you need to create a Facebook App and do the following things:
1. the AppID of your Facebook Testing App.
2. ID Page Facebook, needed to post challenges in friend's timeline.
First you need to create a Facebook application, as the facebook developer site will guide you, and also a test application, TestApp, of your application. Facebook site will guide you and it is very simple.
1. Create the iOS and Android sections by pressing "+add platform " and maybe you need to create also a Facebook Canvas. (There is no need to create a Facebook Canvas).
Important: set the facebook app as a 'game' in the section category.
Follow the screen bellow as settings.
On the "Advanced" tab activate on top Native or Desktop App - YES
For more detailed information see inside the PDF which comes with your package.
2. Now you need to have the Facebook Page ID.
For the Facebook Page ID , create a Facebook Page of your game.
You can find this ID in your Facebook Page, section INFORMATIOM and in the bottom you can see the ID Page Facebook number. (The ID Facebook Page works like a TAG-Place)
Last, create role Facebook Test users and also make them friends together so you can test your game as in real life. Just Select ROLES in the left menu in your FacebookDev application site and select TEST-USERS on the top menu
Ojya Leaderboard design levels-scores and challenge.
Ojya Leaderboard - Sharing bonus
Ojya Leaderboard - off line score mechanism
Ojya Leaderboard Version 1.6.2m
Designing and using the leaderboard
Defining the variables
There are only 6 global variables to set for designing the leaderboard.
Are inside the gameobject 'FacebookScripts' , script-class 'LocalScores'
1. timestamp - boolean, to consider only the most recent score for each level. Preferred is TRUE
2. keephighest - boolean to keep only the highest score done by the user for each level.
3. fbset.totalNoLevels - Total no of levels in your game , this is used for retrieving the levels from facebook
4. fbset.designNoLevels - No of levels for designing purpose.
5. fbset.designFromLevel - level to start from for designing purpose.
6. fbset.lbRowfbusers - number of fbusers to display in a row for designing.
Diagram of the classes getting the scores and designing the Leaderboard:
Read Only and design: 'LocalScores' ---> 'OGScores' ---> 'DesignScores'
'OGScores' get also the images from facebook or from the cache.
Post or Read with automatic Post(off-line scores made before) , and design:
'LocalScores' ---> 'OGScores' ---> 'OGScoresPost' --->'OGScores' --->'DesignScores'
All levels leaderboard design - Vertical scrolling
Single level leaderboard design - Horizontal scrolling
Posting scores to facebook server - for demo purpose
Share Bonus - facebook apprequests
Defining the variables and using the share bonus
You can share helps or bonus with your friends playing the game.
You can make 3 actions: 1. 'ASK' for help
2. 'GIVE' help to friends they made request
3. 'GET' help from friends uppon request you made using the 'ASK'
Variables to define: for this function the variables are defined in the section 'LEADERBOARD'
Keep in mind that to use this feature the user must be on-line.
Each apprequest has an id and after every action of the user the specific id is deleted from the server.
So the share bonus situation is always update.
Now in Version 2 the player can share multi game items like energy, life, magic portion, keys, weapons etc.
This is a great feature increasing the game experience.
See inside the PDF for full details.
Post to friends facebook wall - Challenge them
Defining the variables and using the challenge feature
The challenge feature is inside the leaderboard panel design of the levels.
Just press on the icon of a fbuser and will post a challenge text and image with the necessary info.
The variables to define by the user are in the gameobject 'FacebookScripts' class-script 'PostChallenge':
1. message
2. place -- this is the Facebook Page ID , fbset.fbPageID global var
3. link
4. linkcaption
5. linkdescription
6. linkname
Celebrate a victory - Post to facebook wall
Defining the variables and using the celebrate feature
The celebrate feature is inside the leaderboard panel design of the levels.
Just press on the icon of the facebook current player.
The variables to define by the user are in the gameobject 'FacebookScripts' class-script 'PostChallenge', under the line comment : 'OPENGRAPH POST GAMES.CELEBRATE'
Section for fast fixes - updates
This section is for fast fixes sometimes after a new update. Visit always this page.
current version 6.0
You can download always the most recent PDF, as we make changes also after an update package:
Zip password : the name of the boolean in line 32 of OGScores.cs script.
Updated on 15-03-2021
Ojya Leaderboard for Unity PDF.zip - Versions 3,4,5,6
OjyaAllScores Dll file mono solution - All Versions
TagsInsertOjya script file - Version 3,4,5,6
Older downloads
Ojya Leaderboard for Unity V3-focused.zip - Focused mainly in version 3
Ojya Editor Scripts for Version 2.1 only - Read before the PDF included.
Zip password : the name of the boolean in line 33 of OGScores.cs script.
INTRODUCTION
INSTALLATION
OJYA SCORE MANAGER
FACEBOOK UNITY
PHOTOS
FACEBOOK PART
VIDEOS
LEADERBOARD
SHARE BONUS
POST TO TIMELINE
FIXES - UPDATES
Ojya Replace is an Applescript-ObjC Utility that helps user search and replace part of string portions inside the files of a certain folder.
Before replacing you can use the function of 'Inspect" to see what files and were the strings will be replaced.
The 'Inspect' function can also change the type of file if desired: Macos, Unix, Windows line ending.
1. ‘Inspect Search’
This function searches all the files in the directory and sub-directories, before replacing the strings.
Will display the name of the files that would be modified using the search strings.
This action will NOT change the strings inside the files.
“Detailed Search”
This will show the name of the files and also the exact lines inside the file, of the strings search .
“Quick Search”
This will show only the name of the files that would be modified.
“Change Line ending”
This function will leave the type of the files as the original or will change the type.
4 options:
- Original
- MacOS
- Unix
- Windows
———————————————————————————————————
2. Replace
This action will replace the strings inside all files of the selected directory and sub-directories.
The file will preserve the same type of line ending.
———————————————————————————————————
3. Insert the search strings and the replace strings.
There are 8 tabs.
In each tab you can insert multiple strings.
This example has 2 strings to search and replace.
Devided by the symbol ‘-->’.
The end of all strings must have the symbol '-->'
—————————
Example:
—————————
‘string1’
-->
‘Replace String1’
-->
‘String2’
-->
‘Replace String2’
-->
—————————
Real Example:
—————————
import android.view.View;
-->
import android.view.View2;
-->
for (int i = 0; i < count; i++) {
buffer.append(chars[random.nextInt(chars.
length{"2","4"})]);
}
-->
for (int i = 0; i < count; i++) {
buffer.append(chars2[random.nextInt(chars.
length{"2","5"})]);
}
-->
Job Opportunity
Now you can become the 'father' of Ojya Leaderboard for Stencyl and Unity if you like.
After more than 5 years serving those platforms with success i decided to pass the code to a person who will to continue developing those 2 leaderboards.
Please, contact me for details.
In the mean time Ojya games will continue develope those leaderboards as before, introducing new features and frequent updates to satisfy customers and facebook sdk updates.
andy.venetis@me.com