Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 18    Views: 141

chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
03/30/14 10:54 PM (10 years ago)

New Plugin: Match 3

Match 3 Game This plugin adds a fully-functional "Match 3" game to your app. You can customize quite a few options on this, including: -Number of elements -Images of elements -Header image -Max turns -Points per Match (different points for matching 3, 4 or 5 at a time) -Points per Combo -Time limit per turn -and more! This plugin is based on the HTML5 open-source project by Henry Liou. Modifications were made, including but not limited to: --Integrating certain CSS and JS values with objective-c code to match up with Control Panel properties --Adding points tracker and points per X # of matches --Adding max number of turns --Creating plugin wrapper around project
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/30/14 10:54 PM (10 years ago)
Android coming soon...
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
03/31/14 12:10 AM (10 years ago)
Nice! Do you have a video demo of the game?
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/31/14 05:41 AM (10 years ago)
Not currently - I'll make one later today though
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
03/31/14 05:49 AM (10 years ago)
Nice one!
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
03/31/14 07:30 AM (10 years ago)
Neat. So this is a HTML/JQuery version of Candy Crush? Is this a demo site of the game? http://liouh.com/puzzle/ If so - does it play similar to that or are the controls/animation smoother on the device compared to this website? We can reskin this fairly easily with new images and remove/mod the header completely or resize and change the position? That's all in the .html file?
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/31/14 09:18 AM (10 years ago)
Yep - it's all HTML5. Well, mostly. I added some objective-c in there to connect with the control panel and to get results. It's fairly extendable - when the game is finished, the results are returned to the plugin and stored in a dictionary. Stats include total points and count of each element type matched. So, with a little bit of work you could make this into a full-fledged rpg style game. In terms of changing out images and the header, that can all be done via control panel. Plan on adding Game Center support later.
 
KennedyE
Android Fan
Profile
Posts: 373
Reg: Dec 07, 2013
PH, Nigeria
3,730
like
03/31/14 03:13 PM (10 years ago)
Waiting for the Android version...
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
03/31/14 06:14 PM (10 years ago)
Chris- Are there any Control Panel hooks for sound effects, or is there an example in the HTML code for how to add audio associated with one animation that could be copied and modified for others?
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/31/14 06:19 PM (10 years ago)
No sound effects right now - but that would make a good addition for the next version.
 
othmane
Apple Fan
Profile
Posts: 105
Reg: Feb 08, 2012
Casablanca
1,050
like
04/01/14 02:41 PM (10 years ago)
Hi Chris, Is there a tutorial when we can have a recommended sizes and format (png, jpg..) of element images and header image?
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
04/01/14 02:48 PM (10 years ago)
element images are recommended to be 90x90, png format. Header image is recommended to be 320x207 (or 640x414 if targeting iPad too). Images should scale to fit though.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
04/01/14 02:48 PM (10 years ago)
element images are recommended to be 90x90, png format. Header image is recommended to be 320x207 (or 640x414 if targeting iPad too). Images should scale to fit though.
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
04/01/14 02:55 PM (10 years ago)
Yeah a short demo I'm not a gamer at all lol. In the case of the matching the states how would that work? Just curious because I'm unclear of how it works
 
othmane
Apple Fan
Profile
Posts: 105
Reg: Feb 08, 2012
Casablanca
1,050
like
04/01/14 03:19 PM (10 years ago)
Thanks chris. Will try to run it
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
04/01/14 03:25 PM (10 years ago)
Here's a demo video. Matching states would work the same way. In the screenshot, I just replaced the images with images of some of the states. http://www.youtube.com/watch?v=cKqkox9KB9o&feature=youtube_gdata_player
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
05/01/14 10:54 AM (10 years ago)
Is there a fix for the html file for the issue reported with the status display area. It appears on every combination I have to test with... https://www.dropbox.com/s/yoajwfawxqzz5b7/screen11.tif (there in v1.1) Thanks
 
MobiGeni
Aspiring developer
Profile
Posts: 65
Reg: Jan 09, 2013
Akersloot
1,350
like
05/22/14 01:51 PM (10 years ago)
Status window same here too, the last match image is overlapping the time-bar (below) https://www.dropbox.com/s/6q2tvodtb8b6ws4/match.png
 
MobiGeni
Aspiring developer
Profile
Posts: 65
Reg: Jan 09, 2013
Akersloot
1,350
like
05/22/14 01:56 PM (10 years ago)
Also I get this alert 7 times BT_Plugins/CR_match3/CR_match3.m:240:27: Unused variable 'matchElement0' I named my images like rossi.png , marquez.png they are all different, is that wrong? NSLog(@"finished!\n%@", jsonData); if ([jsonData isKindOfClass:[NSDictionary class]]) { NSString *points = [BT_strings getJsonPropertyValue:jsonData nameOfProperty:@"points" defaultValue:@"0"]; NSString *matchElement0 = [BT_strings getJsonPropertyValue:jsonData nameOfProperty:@"matchElement0" defaultValue:@"0"]; NSString *matchElement1 = [BT_strings getJsonPropertyValue:jsonData nameOfProperty:@"matchElement1" defaultValue:@"0"]; NSString *matchElement2 = [BT_strings getJsonPropertyValue:jsonData nameOfProperty:@"matchElement2" defaultValue:@"0"]; NSString *matchElement3 = [BT_strings getJsonPropertyValue:jsonData nameOfProperty:@"matchElement3" defaultValue:@"0"]; NSString *matchElement4 = [BT_strings getJsonPropertyValue:jsonData nameOfProperty:@"matchElement4" defaultValue:@"0"]; NSString *matchElement5 = [BT_strings getJsonPropertyValue:jsonData nameOfProperty:@"matchElement5" defaultValue:@"0"]; NSString *matchElement6 = [BT_strings getJsonPropertyValue:jsonData nameOfProperty:@"matchElement6" defaultValue:@"0"];
 

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.