Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 22    Views: 120

SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
04/02/14 09:41 PM (10 years ago)

New Plugin - Concentration Game

*** This plugin is now compatible with BTv3 Android AND iOS *** https://www.buzztouch.com/plugins/plugin.php?pid=CA4402FBDA2FCF3E910E622 This was almost an easy 'drop in' to a BT plugin. Hats off to Niraj for pointing it out to me. It's a Concentration game. 20 cards are 'dealt' out at random, and your job is to match them up. If you turn over two matching cards, you get points. If they do not match, they turn over and you take another turn. This could be an easily modified plugin if you wanted to use this plugin in a client app. Logos, Band Members, almost any images can be made into 'cards' for the game to play with. I recently updated the plugin with an HTML5 version converted for Android use. Yep; it's now dual platform! Cheers! -- Smug
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
04/02/14 09:49 PM (10 years ago)
Nice!
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
04/02/14 09:58 PM (10 years ago)
Did Smug just release a iOS only plugin? I must be asleep. Someone pinch me. :-) David Van Beveren https://btmods.com/chat ^ Chat with other BT Members live!
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
04/02/14 10:05 PM (10 years ago)
Very cool! So, I'm assuming that you guys are finding this code on the web somewhere, and modifying it to suite BT needs. Do you have any search tips on finding available code? I looked around GitHub one day, but couldn't really find anything. I'd like to start making a few Android plugins! Mark
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
04/02/14 10:10 PM (10 years ago)
CocoaControls is my main one, maybe they have a Android equivalent? David Van Beveren https://btmods.com/chat ^ Chat with other BT Members live!
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
04/02/14 10:41 PM (10 years ago)
On the other plugins I've done, most of it is scratch code, because it's hard to find something that works with both Android and iOS. otherwise, it's a hunt through github, cocoa controles, code.google.com, and a few others… I do a lot of looking on the web. 'usually' my 'criteria' is to find a similar project in Android as well as iOS, and work on the Android first (because iOS usually isn't as difficult to design). This plugin was a total 'steal', meaning none of the code is really mine; it was something Niraj wanted, and he pointed out the depository. Most of the 'conversion' process (and I may not remember everything but…) 1) Create your blank BT Plugin. Download, install in app, etc… get it 'ready'. 2) convert their xib or storyboard into your class. This typically means cut and paste from their xib/storyboard to your xib. You'll have to reconnect everything again later. 3) import their headers into your headers. 4) import their unique methods into your BT_plugin.m file 5) 'integrate' the similar methods into your BT_plugin.m file 6) reconnect all the items in your xib file to the appropriate object. 7) test. scratch head. fix issue. repeat. If I left anything out, I'm happy to share, I just probably forgot. Cheers! -- Smug
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
04/02/14 11:56 PM (10 years ago)
http://code.cocoachina.com Code4app.com Code4app.net You just have to translate to English.makes finding projects on github easier sometimes.
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
04/03/14 12:19 AM (10 years ago)
Awesome Smug! I'm having trouble connecting my xibs for some reason it is crashing each time. Do you guys initiate it like this: - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; NSLog(@"setting up nib file"); if (self) { // Custom initialization } return self; } and of course the name of the xib have to be identical to the plugin file name correct? Not sure why mine is crashing :(
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
04/03/14 12:37 AM (10 years ago)
the xib does not have to be the same name. It's convenient, but not a deal breaker… you just have to remember to reference the right xib. Now, 'in' the xib, the class name has to be 'exact'. Here is how my concentration game chooses xibs: - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil; { BT_appDelegate *appDelegate = (BT_appDelegate *)[[UIApplication sharedApplication] delegate]; if (appDelegate.rootDevice.isIPad) { self = [super initWithNibName:@"SW_concentration_game~iPad" bundle:nil]; } else { if ([UIScreen mainScreen].bounds.size.height == 568) { self = [super initWithNibName:@"SW_concentration_game~568h" bundle:nil]; } else { self = [super initWithNibName:@"SW_concentration_game" bundle:nil]; } } return self; } and of course, I have 3 different xibs; one for each 'size' device. Cheers! -- Smug
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
04/03/14 02:49 AM (10 years ago)
Thanks Smug! I'll try at it again :)
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
04/03/14 03:13 AM (10 years ago)
Nice update Smug!! Cross plat :)
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
04/03/14 04:11 AM (10 years ago)
Very nice, thanks Smug for going the extra mile and making it cross platform. Cheers, Farcat
 
KennedyE
Android Fan
Profile
Posts: 373
Reg: Dec 07, 2013
PH, Nigeria
3,730
like
04/03/14 04:33 AM (10 years ago)
Sold!!! Thanks Smug and Niraj for the Android Version, Cheers!
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
04/03/14 07:26 AM (10 years ago)
Good stuff everybody....thanks! Mark
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
04/03/14 09:45 AM (10 years ago)
Cheers Smug!
 
Arubaman
Aspiring developer
Profile
Posts: 636
Reg: Oct 20, 2011
Akron
16,910
like
04/03/14 11:21 AM (10 years ago)
Looks good, nice to have plugins that work on both platforms.
 
mobi
Aspiring developer
Profile
Posts: 35
Reg: Mar 23, 2014
NY
4,550
like
04/20/14 10:26 PM (10 years ago)
Im liking this so far. Sure was easy customizing the cards.Going to be using it in a app im trying to do. smug, sent you a message with a few questions about it.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
04/22/14 12:10 AM (10 years ago)
ummm…. "Where" did you send it? Sorry, seen nothing yet. If it was to my email, It might have gotten mixed with the large quantities of spam I get… either resend with a subject line that will 'stand out' (say, "Buzztouch" or something that will pique my interest) or send a PM via Buzztouch. Or… Ask it here :) Cheers! -- Smug
 
mobi
Aspiring developer
Profile
Posts: 35
Reg: Mar 23, 2014
NY
4,550
like
04/22/14 12:16 AM (10 years ago)
humm...maybe my messages arent working? I sent it here in buzztouch. Ill send you another and if you can let me know if you got it. Maybe my messages dont work. Anyways, one question I had was this. How can I go about making a second instance of the game in an app. I know I just add it to the screen, but I want on the second one to use different images versus the first. Hope that makes sense. Is it possible?
 
KennedyE
Android Fan
Profile
Posts: 373
Reg: Dec 07, 2013
PH, Nigeria
3,730
like
04/22/14 01:42 AM (10 years ago)
Hey Smug, playing around with the plugin, but is it possible to make the device sound and vibrate when users turn two cards correctly? Trying to make a game app with this plugin.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
04/23/14 04:32 AM (10 years ago)
Mobi/Kennedy: I like the suggestions, and would like to implement them. But I do ask for your patience on a couple of different levels… When I make changes, those changes 'would be best' if implemented on both iOS and Android at the same time. Therefore any change usually takes me twice as long, because I have both platforms to accomodate… I'm at one of those points where my schedule will be pretty busy again for a month or two… And until the next deadline is finished, I'll be watching the clock, and not necessarily thinking about much else. It's not what I like to say, but it's the way it is… Sorry. I will have a chance eventually, and I appreciate the suggestions; good stuff. But for the moment I won't be able to get to them. When I do; I'll let you be the first to know. Cheers! -- Smug
 
mobi
Aspiring developer
Profile
Posts: 35
Reg: Mar 23, 2014
NY
4,550
like
04/23/14 04:42 AM (10 years ago)
Totally understandable Smug. When your load slows down a bit and the time permits, if you implement that, it would be great. I look forward to it, but of course can wait until the time comes. Thanks again
 
KennedyE
Android Fan
Profile
Posts: 373
Reg: Dec 07, 2013
PH, Nigeria
3,730
like
04/23/14 02:42 PM (10 years ago)
Ok Smug thanks, cheers!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.