I was reading some articles about Game Center, also looked at some articles about comparisons between Game Center and OpenFeint. It's definitely a tough war for the OpenFeint guys even though they entered the markets earlier.
I was also thinking, technically it shouldn't be too difficult for Apple to include features similar to what Nextpeer is currently offering. If Apple did do that in the future, will Nextpeer still be able to compete with Game Center?
Interested to read this news about Microsoft bringing XBox Live Games to iOS and other mobile platforms - instead of exclusively for Windows Phone only.
Nice move Microsoft!
This should attract more users to the mobile platforms and surely means more opportunities for everyone!
As I mentioned in my last post, I am going to talk about my experience with integrating Nextpeer v0.0.10c to my test Cocos2D game. Also added a short video at the end to show what it looks like after the integration.
Don't forget that you should always refer to their web site, the SDK and the sample project for the most accurate information. Any way, hope you find the following information helpful.
Please note that: a) You should have a working game project before you start. ==> If you don't, you may use the Puff Puff 1.1 following this post, make sure you got it running ok in simulator first. And you can also refer to the tutorial video on Nextpeer site as it's also using Puff Puff, but with an older version of SDK.
b) Your game must have separated "Menu" and "Game" sections. ==> If your game doesn't have a "Menu" section (similar to my Dice in Cup test game), you have to manually add one first. ==> In the "Menu" section you should have at least one normal "single player" menu option for your users to play the game normally without Nextpeer ==> Later we will add a new "multi players" menu option. When the "multi players" option been selected, it will call/load your "Game" section
2. Download the latest SDK (mine is v0.0.10c) and sample project
3. Follow the "Tutorial -> Prepare" section to setup "build flag", add the "NPResources_iPhone_Landscape.bundle resource configuration" and import all required frameworks
4. Create an entry for your game in "Games -> Game Details" ==> for "Bundle Identifier", enter the settings of "Identifier" under "iOS Application Target" in your Xcode Project Summary ==> you will need the auto-generated "Game Key" later
5. Create one tournaments in "Games -> Manage Tournaments"
6. In your AppDelegate.h (Header file) add the import and "NextpeerDelegate" as shown below
7. In your AppDelegate.m add the followings line to the end of "applicationDidFinishLaunching" to initialise Nextpeer (will add that method in next step)
8. This is the longest step. Also in AppDelegate.m, copy and past the following methods, and then change those areas I marked as "TODO" including Game Key info, methods to load your "Game" section, ...etc accordingly to match your game project. You may also remove those "CCLOG" lines, I added them just to help me understand which one get calls at different situations.
9. Next, update your "Menu" section with extra "Multi Player" menu option. In my project it's in the "init" method of a separate class called "MainMenu". Only part of the code shown below.
10. At the place where your game score get updated, add the following line with "score" as an integer (should be able to accept other value?) Oh, don't forget to add the Nextpeer import (similar to #7 above) too. Mine is shown below.
That's it! There are still a few other functions which I haven't tried yet. The above mentioned should be sufficient to at least get you started and have a play with it.
A few screen dumps shown below:
(1) a pop-up shows some info about other players at the top of the screen during the game
(2) Another pop-up example
(3) This is the result screen after the tournament ended
(4) I also tested the scenario where there's no network connection. This is the screen you get.
Short video as below, first I play it with "multi players", also browsed through a few options in Nextpeer dashboard, then in the end tried "single players" from the menu.
Please let me know if you have any problem or anything still unclear. If you have any other better ideas/tips, most welcomed to share your experience.
Further Questions: After all above, are you still interested in integrating Nextpeer to your game? I still have a few questions waiting to be answered: 1) Need further information about how to setup multiple tournaments 2) Like to see example of setting up Netxpeer with non-Cocos2D projects 3) How is the gold coins been handled? What if I run out of coins, how do I get more? Is that through in-app purchase or some other methods? How is the profit distributed between Nextpeer and the developer?
[Update 03/02/2012] Please see this post which Shai/Nextpeer kindly answered some of the questions I mentioned.
I had another play with Nextpeer today, mostly based on the sample game. After a few failed attempts - mostly due to the sample game using "NSNotification" but mine doesn't - finally got it working after a few rounds of tweaking.
Also found that even if I added 2nd tournament, it still picks up the previous one for some reason. From the comments can see something as below about more than one tournament.
// Nextpeer: This delegate method will be called once the user is about to start a
// tournament with the given id.
// @note: If your game supports more than one type of tournament, you should use tournamentUuid to start the right one.
But I can't find any info about how to use the "tounamentUuid"?? That's the biggest issue I have - lack of information.
It's indeed quite interesting watching your own game changed into multiple player by adding a few lines here and there. Would be interested to see how can we tell whether the other players are real or simulated ones? Or is it just the user experience that matters, who cares whether it's real or simulated?
It's a bit late now and got a few things to sort out first, will definitely post some info in the next post! Ciao!
As today is public holiday down under (26/1 Australian day, yeah!), after kids off to bed, I finally squeezed in some time to have a play with Netxpeer.
I logon to developer site.
I downloaded SDK ver 0.0.10c (What? Not even 0.1 yet?!) and the demo game.
Have a quick read and followed the steps of the "Requirements", "Prepare" section and all ok so far.
I then got stuck in the "Using the SDK" part. I think for 1st time user like me, I need some "simple" English explanation and step-by-step tutorial/example about how to setup the Delegates and other stuffs.
May be the Puff Puff video would help. I followed that, it goes quite well in the beginning. But later I got stuck about 7 min 25 sec down the track. The video says create method "nextpeerDidTournamentStartWithId" but it doesn't exist in the SDK. Checked the Sample project, it uses "nextpeerDidTournamentStartWithDetails" (as shown below).
I think this is this similar to Cocos2D when it gets updated, lots of older methods and other stuffs get renamed and shuffled around. No, I don't have problem with that, but it would be helpful if another video can be setup for the new version/structure or some further information provided.
I tried to google but couldn't find anything for both the old and new methods...
Your search - "nextpeerDidTournamentStartWithDetails" - did not match any documents.
Suggestions:
Make sure all words are spelled correctly.
Try different keywords.
Try more general keywords.
Search Results
I also tried to search other blogs/sites about Nextpeer but can't find anything about real world experience using the SDK. If any one got anything helpful, please let me know!
So looks like I have to stop here, as the video is out of date, and I can't continue my experiment without further information.
[Update 27/01/2012] Got it working on 2nd test, although didn't have time to post further details yet. But yes, it works and it's indeed quite interesting. See this post for some high level info.
There's this post from ios-blog.co.uk which talks about how to handle bugs that are specific to iOS 5 which you might find handy.
We had a similar issue the other day at work for a web based application which if the field type is set to "text", for customers using mobile safari browsers with iOS 5, strangely all leading zeros will be automatically truncated. Have to put in special code to detect browser version and then change the field type accordingly.
Joined Nextpeer recently, as I quite like the idea and design. Imagine just by adding a few lines your single player game will be transformed into a multi-players game, how cool is that!
Even the tutorial on the site (after signed up and logged in to developer site) uses the Puff Puff as example. So make sure you read my previous post about how to run Puff Puff in your iOS5 simulator.
I guess the only drama at the moment is, there wasn't much technical info available yet. There's only a video tutorial about how to do it if you use Cocos2D. If your game is not using Cocos2D, might have to wait a bit longer until more details become available.
[UPDATE 20/01/2012] Thanks to Daniel Shir and Shai Magzimof from Nextpeer who pointed out to me that Nextpeer does support other games not using Cocos2D. I checked their developer site again this morning and confirmed that it's my mistake - sorry for that.
What I should say is, there's only a video about how to use Nextpeer using Puff Puff as example (which uses Cocos2D) - would be more handy if they can also provide a few more videos about other games, start up a forum, add more examples, FAQ, more technical info targeting developers of different skill levels,....etc.
But certainly worth a look! Definitely worth a look!
Thanks to 6thMega (Note: site still down when checked 25/11/2012) who generously published source code of their game "Puff Puff" Version 1.1. I have downloaded the source code for a while but wasn't able to let it compile at all.
It was quite challenging and a bit frustrating at the beginning. I was also stuck with "OpenFeint" problem for a long time - until I later decided to completely remove/disable it and that makes everything a lot easier!
So the notes below is only about how to modify the downloaded "Puff Puff 1.1" code so that it can compile and run in iOS5 simulator (with sound!!) under Xcode 4.2. Sorry I can't answer any question about the code, a more suitable place to discuss that would be at this post on cocos2d forum.
Please let me know if you found any problem or got any other information to share!
Step 2. Unzip it (as shown below) and double click on the "PuffPuffV.xcodeproj" file to open the project in Xcode.
Step 3. Let's fix all the frameworks and libraries first. With "Puff Puff" selected as "Targets" (middle of screen), select "Summary" tag (right hand side) and then scroll down to the bottom of the right hand side panel. You should see as below, a few missing frameworks/libraries shown in red colour under "Linked Frameworks and Libraries"
Using the "+" and "-" button we are going to fix them one by one. Starting with the "CFNetwork.framework", click "+", locate it from the list and then click "Add".
After it's added, you can now highlight the old, not working one (in red colour) and click "-" to remove it.
Repeat this until all of the red ones are gone. However, one of them called "libz.1.2.3.dylib" no longer existed and I can only find this "libz.1.2.5.dylib". As the name is quite similar with only minor difference in the version number, this should be the best choice. Note: please ignore the hint box as it's showing details of a different file while my mouse was over it
Step 4. Scroll back to the top, select "Build Settings" tab, and change all the "Base SDK" to "Latest iOS(iOS 5.0)"
Step 5. We can now start changing the files. Find "PuffPuffAppDelegate.mm" and look for this line as shown below. Either remove it or disable it by adding "//" at the front.
Step 6. If you try to "Build" now you will get quite a lot of errors. Let's start by fixing the easiest one - the "ccColor4B" problem I mentioned in this old post.
Step 7. Next we want to remove/disable "OpenFeint" - mainly because I can't get it to work. If anyone has better idea or know how to fix it, please let me know and we can then probably skip this whole step :-) ...
There are quite a few things to remove, so I am using "Step 7-x" as below to make it easier to follow.
Step 7-1. Highlight the 2 OpenFeint folder/file as shown below and select "Delete" to remove it.
At the next screen as shown below, click on "Delete" to remove all files.
Step 7-2. Remove all the imports for OpenFeint related header files. As shown below the line has to be removed or add "//" at the front to disable it. There's a few of them as listed below:
Step 7-3. Since last step ends with the file PuffPuffAppDelegate.h, might as well remove the "OFCallbackable" at the end. Don't forget you also have to remove the "," too and DON'T remove the closing bracket ">" after that. Be careful!
Step 7-4. Disable "InitializeOpenfeint()". As below, in Classes -> Scenes -> MenuScene.mm, disable the whole block inside the method "InitializeOpenfeint()".
Also, inside Classes -> Scenes -> SplashScene.mm, remove or disable the following line by adding "//" at the front in "aaa" method.
[selfinitializeOpenfeint];
Step 7-5. As shown below in Classes -> Scenes -> MenuScene.mm, remove the highlighted line about OpenFeint launchDashboardWithHighscorePage.
Step 7-6. Almost there. Next in Classed -> PuffPuffAppDelegate.mm, as shown below, remove or disable the 2 highlighted lines starting with "[OpenFeint userDidApproveFeint:"
Also in same file, completely remove or disable the 2 methods causing compilation error as shown below.
Step 7-7. As shown below, in Classes -> GameScene.mm remove or disable the line "[OFHighScoreService ...."
That's it! As below, you should be able to compile and play the game in iOS5 simulator, and the music is really cool too! Enjoy!
[Updated 5/4/2012] As the 6thMega web site is currently down (see this post), I have uploaded the copy of PuffPuff V1.1 I downloaded last November to this link. Please note that the copyright still belongs to 6thMega, and this is just a temporarily work around while the 6thMega site is unavailable. Please let me know if you have problem with the link or any other issue with this sharing. Thanks.
[Update 25/11/2012] Tested in XCode 4.5 with iOS 6 simulator running in 4 inch Retina display (iPhone 5), other than the 2 black stripes on both side as shown below, the game still works! Unfortunately looks like the 6thMega site no longer exist....
I believe quite a few readers might have similar question like me - how to upgrade an old application with outdated Cocos2d to the latest version?
I was reading chapter 7 (scrolling with joy) of Cocos2d book. And the author uses "SneakyInput" as example to port it to a new Cocos2d project. All he did is create a new Cocos2d project, then copied a few classes over from the old one, and that's it? Since every project is different, it could be a lot more complicate for other projects... Will give that a try later...
The interesting part here is that the CCArray* enemies itself contains more CCArray* objects, one per enemy type. It’s what’s called a two-dimensional array. The member variable enemies requires the use of alloc, because otherwise its memory would be freed after leaving the initEnemies method. In contrast, the CCArray* objects added to the enemies CCArray do not need to be created using alloc, because the enemies CCArray retains the objects added to it.
To make the whole thing clearer, the declaration of "enemies" is in the header file (Listing 8-6) as below:
But I thought if "initEnemies" was called, then as long as the EnemyCache class doesn't get released, the member variable enemies should always exist isn't it? Confused... Might try to post it in Steffen's forum...
I like this part: "People will spend hours researching a $2 purchase, browsing reviews, emailing the developer, checking online forums. Then they will go to a coffee shop they've never been before and buy a $4 coffee."
Developing mobile application is definitely not an easy task, specially doing it full time. Everyone's different and for me, this is more like a hobby. Unless I can build up certain level of stable income from this, with so many bills to pay plus family to take care of, I certainly can't afford to work on it full time.
I mentioned in this post about using 'ima4' compression to reduce CAF file size. But to be honest, I am still not very clear about how all these audio stuffs work.
This might be an old one - I found this "Audio 101 for iPhone Developers: File and Data Formats" articles (3 parts) by Ray Wenderlich really helpful and clearly explained lots of stuff. Well, still don't 100% understand everything Ray said yet, but would definitely save this page for future reference.