Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 34    Views: 167

Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
05/01/14 02:32 AM (10 years ago)

NEW PLUGIN - Shark Attack

I had a little fun creating the graphics for this one. When you lose, there is a little blood splatter, but it can be turned off if you intend on a milder audience. I also forgot to mention in the initial description, I added a really nice soundtrack to the game as well. Be sure to check out the demo video link at the bottom of the page. Here is Shark Attack: https://www.buzztouch.com/plugins/plugin.php?pid=13E45EB1068BA0DFA1DBA20 Shark Attack is a great game to add to your app, with lots of chomping action and amazing graphics. Blood splatter “Game Over” can be turned off for a milder audience if desired. The goal is to keep the shark swimming, while eating the nearby divers. Those pesky sea mines keep popping up from the bottom though, and they mean trouble for our shark. Not only do you have to deal with the mines, but you can also get caught in the seaweed or snagged by the fishing hooks, which will also make you meet your demise. Avoid these items at all costs. Each scuba diver you chow down on is worth 5 points, and you get 1 point for every second that you can keep Jaws swimming. Can you set the high score? ------------------------ Demo Video: ------------------------ https://www.youtube.com/watch?v=L0v6yv9HVLc&feature=youtu.be
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
05/01/14 03:47 AM (10 years ago)
Cool my friend! LA
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
05/01/14 12:03 PM (10 years ago)
Awesome plugin, liking these game plugins.
 
Shorewalk
Lost but trying
Profile
Posts: 54
Reg: Nov 06, 2012
location unknow...
10,040
like
05/01/14 12:05 PM (10 years ago)
You really can create some intresting plugins! Is it possible to customize the plugin to a more personalized app? Replace the images (divers) with your own, change the point that the various characters give, change the text to another language ... and so on? If so then I really think you have a market. Even if not then I maybe load the plugin ... just to impress on my children ...and have som fun
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
05/01/14 12:10 PM (10 years ago)
Yes you can! I create all of my plugins for super easy skinning and customization, especially when it comes to the graphics. Graphics is my area... not coding so much. The divers, mines, shark, seaweed, hooks, and background are all on separate .PNG files. Simply replace them with your own in your xcode project, done and done. The mines actually have 2 different images, so you could have like a mine and an exploding tnt barrel if you wanted to... I just doubled the amount of mines in the sample video. Same thing with the divers... except there a THREE different ones! You could have a diver, a fish, and a submarine if you wanted to... it's already setup for that... just replace the images with whatever png images you like in your project, and they pop right into your app All of the text labels and everything are on an easy to edit XIB file, so just click on it in Xcode, and type whatever you want it to say... you can even change the font, color, size... whatever you like. :) The positions of the characters (and game speed) are also changeable in the code in pretty obvious places. The code is all commented. Many of the positions are randomized though, like the divers, the mines, etc. The background music is also customizable. Just drop in the .mp3 of your choice (using the same filename as the current one). Something that plays well on a loop is best, since we don't know how many minutes the player could be playing for. The code automatically loops the mp3 if it reaches the end. I try to make things as customizable as possible, knowing that 99% of the buzztouch users out there won't be using a "cookie cutter" style plugin... they want to customize it to fit their own apps and styles.
 
Shorewalk
Lost but trying
Profile
Posts: 54
Reg: Nov 06, 2012
location unknow...
10,040
like
05/01/14 12:54 PM (10 years ago)
Sounds great! I'm already getting some interesting ideas that I can use it for... I am also looking at your new plugin Instant Database App, very interesting!
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
05/01/14 01:01 PM (10 years ago)
Cool, I appreciate it :) Both are great, in different ways. The Instant Database App is basically an entire multi-function app in a single plugin, and very powerful to connect to online databases to serve up thousands of records, which would normally have to be hand added screen by screen. search the forum for my experience creating the Universal Studios app... over 6 months of screen data entry, lol. I had over 1,000 screens in my buzztouch control panel for that app, and thats not counting the child items that most of them had for sub menus, images, videos, etc. Never again. Trust me, that plugin was born out of necessity, haha. each location in that app probably took a total of 10 minutes worth of linking it up, not counting the non-buzztouch time in finding the photos, uploading the videos, etc... but if I had the Instant Database App plugin at the time, I could have easily typed out 3 locations a minute into a spreadsheet (aka, CSV file). each "child item" would have simply been a column on the spreadsheet. It will be MUCH easier next time :)
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
05/01/14 03:12 PM (10 years ago)
Cool Im definitely getting this. I was thinking all of us that have game plugins need to add game center to make it more interesting for users,and easier.
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
05/01/14 03:33 PM (10 years ago)
Yep, I've been thinking the same thing. It's something the user could always add to their project once they get our plugins as well. But yeah, I need to look into whats involved. I know you used to have to specify it specifically when creating your app ID, but I believe game center is now checked by default when you create a new one, so I don't think we have to setup our projects any special way in itunesconnect.
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
05/01/14 03:58 PM (10 years ago)
Yup I think its just checking it capabilities section and adding code. I think thats all nadTheVlad had to do on his Advanced Quiz. That was one of the major reasons I bought it besides the great functionality
 
nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
like
05/01/14 05:37 PM (10 years ago)
Nom, nom, nom.... chomp! Leaderboards and acheivements are real easy. The iOS recipes book has some easy cut and paste code in it for implementing these. http://www.amazon.com/iOS-Development-Recipes-Problem-Solution-Approach/dp/1430259590
 
othmane
Apple Fan
Profile
Posts: 105
Reg: Feb 08, 2012
Casablanca
1,050
like
05/01/14 05:43 PM (10 years ago)
Awesome plugin, I like it.
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
05/02/14 08:30 AM (10 years ago)
Great plugin, very well done!! Downloaded it to a test app and it works great :) Thanks @nadthevlad for pointing to the solution for Leaderboards which is a must. Thanks again, that is really good stuff. Farcat
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
05/02/14 09:37 AM (10 years ago)
Thanks guys. I appreciate all of the great feedback. And Farcat... thanks so much for the review! Reviews may seem minimal, but as a plugin developer, nothing keeps us more pumped and excited to make more plugins that seeing awesome reviews on our plugins page. It also lets others know the scoop about it.
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
05/02/14 10:21 AM (10 years ago)
@nadthevlad, that's an awesome book! Going through the gamecenter section right now, chapter 17. It looks like we need to include the gamekit library though, since a standard buzztouch project does not have it included. What is the best way to do this with a plugin? Or do we not include it and just tell the users how to import it into the project themselves?
 
nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
like
05/02/14 10:56 AM (10 years ago)
You just tell the user to install it. Maybe make a youtube video and/or pdf with explicit instructions.
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
05/02/14 11:03 AM (10 years ago)
ok, cool. I was trying to figure out how to make the plugins dummy proof... truly plug and play, with no additional file importing.
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
05/02/14 12:04 PM (10 years ago)
Thanks! You could put downloaded file in project but still drag and drop in xcode.but there will be updates of the sdk too so you'll have to update it with new version too
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
05/02/14 01:09 PM (10 years ago)
No worries @Angry Ninja, reviews help the developers as much as the users :) I am going to get cracking on Gamecenter as well. I came across this old tut, it is for BT1.5 but it may provide some pointers. http://www.buzztouch.com/files/howtos/Game-Center-Tutorial.pdf
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
05/02/14 01:24 PM (10 years ago)
Looks fairly straight forward... except it mentions adding code to the BT_ViewController, which we won't have access to as plugin developers... that would be on the users local project. I'm sure the code can be used in our plugin files instead of the the main BT view controller though.
 
GraciousWolf_PE
Aspiring developer
Profile
Posts: 372
Reg: Feb 15, 2012
Montreal
10,720
like
05/02/14 08:04 PM (10 years ago)
Looks like yet another great game plugin on the BT market! One question - iPad compatible? ;) Nicholas
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
05/02/14 08:05 PM (10 years ago)
Finalizing the iPad XIB's as we speak ;) I'm hoping to release the update tomorrow after a little testing.
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
05/02/14 11:59 PM (10 years ago)
Finished. :). New update for Shark Attack makes it ipad compatible, among a few other improvements
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
05/03/14 12:23 PM (10 years ago)
The iPad update is looking good, thanks for cooking up such a quick new version. Question: I am worried that the constant vibrating might put some users off and drain batteries. How can it be turned off? I guess it's around the code you commented "VIBRATE & SETUP AUDIO" but I can't make it work. Any pointers please? Cheers, Farcat
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
05/03/14 12:25 PM (10 years ago)
Hey Farcat, No problem. Simply comment out line #54, where it says: [self vibrate]; Thats all there is to it ;) Theres a bad joke located somewhere in that line of code, but I'm leaving that one alone, lol.
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
05/03/14 12:36 PM (10 years ago)
Thanks @Angry Ninja, works a treat. Haha, I wouldn't have given that line a second thought if you hadn't pointed it out.
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
05/05/14 02:16 AM (10 years ago)
@Angry Ninja, I am trying to set up extra images for the divers and mines: "The mines actually have 2 different images, so you could have like a mine and an exploding tnt barrel if you wanted to" In the plugin file I can only see one image for each "minifish.png" and "AN_mine.png". Does the code need to be amended to add different graphics like the tnt barrel for example? Cheers, Farcat
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
05/05/14 02:19 AM (10 years ago)
Nope. Take a look at the xib files, you'll see 2 mine images and 3 diver images. Simply add an image to the project, and click on the particular diver or mine that you want to change, and in the attributes panel on the right choose your new image from the dropdown. Let me know if you need a screenshot on where to do that.
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
05/05/14 02:31 AM (10 years ago)
Thanks, on the xib file I only see the launch screen (Touch Anywhere to Begin). Sorry, pretty new to Xib files... a screenshot would be great :)
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
05/05/14 02:40 AM (10 years ago)
Oops, sorry, I meant the storyboard files, not the xib. I'll be back at my computer in a bit and can take a screenshot
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
05/05/14 03:05 AM (10 years ago)
Here's a screenshot. This is on the ipad storyboard file, but same process for the iphone storyboard file. Also, there is a clear "button" that might be in your way when trying to click the divers or mines... simply drag it out of the way, then place it back when you're done. It's the "game over" object that turns visible once the game is over. http://snag.gy/yY49K.jpg Notice I clicked on a diver, and in the panel on the right (5th icon, the attribute inspector), there is a drop down for which image you want it to be. Click that dropdown and you can select any image in your project. if it's a new image, you'll have to add it to your project first. And, after adding the new image to the diver or mine, if xcode goes crazy and enlarges the image, and won't let you drag the size back down... click over on the first tab in the right panel and turn "auto layout" off. Then you can resize and turn it back on. Sometimes it does that when I change an image, and sometimes it doesn't... my Xcode has a mind of it's own, lol.
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
05/05/14 03:17 AM (10 years ago)
That's fantastic, thanks for the walk-through. I am very happy to see that the seaweed have three images too. Time to get creative :)
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
05/05/14 03:20 AM (10 years ago)
Yep, I made it with full creativity and expandability in mind, figuring people would want to change and expand on it. You'll also notice the fishing hooks at the top have 5 different images ;) By the way, I tried adding GameCenter support to this, and just couldn't do it. I tried everything. I tried the book that nadthevlad recommended above, tried the tutorial that you found, tried stack overflow, tried about 10 other various walkthroughs on the web... none of them work 100%. Each method I tried had at least one piece outdated or broken that I couldn't figure out a way around. The book that nadthevlad referenced came the closest, by actually getting gamecenter to load and actually find my game through apples servers... it just wouldn't display the leaderboard for the game, and was giving me a code error no matter what I tried in the section that posts the score to the leaderboard when executing the game. I'd LOVE to see someone do a tutorial thats updated with iOS7 and BT 3.0. Maybe the issue was I was trying to add it to my plugins .m file instead of my projects viewcontroller.m file... but it shouldn't matter, as long as it's a view... and I did get as far as being able to login to gamecenter from shark attack... just not post or see high scores... anyway, after a full day and over 10 tutorials later... I gave up on it.
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
05/15/14 09:19 AM (10 years ago)
@Angry Ninja, I have finished my game now based an your awesome plugin. Starting on GameCenter and already scratching my head.... Have you managed to implement it successfully? As you said, there are a lot of resources but none of them seem to be up to date or complete. Cheers, Farcat
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
05/15/14 09:28 AM (10 years ago)
Hey farcat, Yes, I just updated the shark attack plugin the other day to include game center, but if you rebuild your project now, you'll overwrite all of your customizations. Maybe create a new project with the updated plugin, and copy and paste the differences into your custom project (or vice versa). You can also just download the self hosted version to see the differences in the files. Remember, you'll need to enable Game Center on your project in iTunes connect, setup the leaderboard in iTunes connect, then enable Game Center in your Xcode project under the targets "capabilities" section
 

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.