Posted on December 19th, 2010 3 comments
Over the past year, I had just dabbled using the Cocos2D framework but had not used it in any of my projects. What was stopping me was the thought that I would have to learn a whole new way to program and language syntax. I am very proficient with Objective C and have a few apps in the app store, and they are totally written using the standard foundations provided by Apple with the iOS SDK. Over time, I noticed that more and more developers were using Cocos2D for their published games. My wife was also begging me to develop a game for her. A game that is similar to one that she plays all the time at a local arcade/dinner establishment and that she could play on her iPhone. So, I decided to use Cocos2D in earnest for my new client (wife) and started reading up on using it. I browsed the Cocos2D web site and forums as well as the learn-cocos2d site run by Steffen Itterheim. (Is it just me, or does he look like Seth Rogen?) It was there that I saw that he was publishing a book on using Cocos2D call “Learn iPhone and iPad Cocos2D Game Development” I jumped on purchasing the alpha book (pre-release chapters. The book is now published) and then started the journey into really learning the Cocos2D framework and Orbs Away! – the game.
Orbs Away! is your standard match 3+ color game. However, unlike other color matching games, the game board is laid out in a hexagon pattern of columns and rows.
In the image above, you will notice each tile is a hexagon shape and also that each tile can be surrounded by 6 other tiles. In contrast, a typical square grid will have a tile that is surrounded by 4 other tiles. Working with square tiles is pretty straight forward in determining if a tile has the same color as an adjacent tile. Hexagons…not so much. At least for me anyway. As with probably most developers out there, you search the internet to see if anyone else has developed a solution or tutorial that relates to your development challenge. Now, here is where I will give credit where credit is due. While I did not find much related to a hexagon game layout, I did find an excellent reference to hex coordinate systems at http://jemgine.omnisu.com/?page_id=412. The author even had a C# Hex Class written for Windows XNA game development. This class is usually used as a game board tile map to determine which hexagon is selected upon mouse click or direction for movement of a game piece. I rewrote the class in Objective-C with emphasis on placing falling Orbs in the correct hexagon (with box2d collision detection) and to recursively determine if there are any 3 or more adjacent Orbs with the same color.
The screenshot above is from the beta version of the game with the Orbs laid out using the reworked Hex Class. I’ll go over the the high-level basics for the HexGrid Class and how I use it in the game. I’ll put up the source for new HexGrid Class in another post at a later date. Right now, I am hurrying to get the game finished!
High Level Game Play
Firstly we need to initialize the class with the radius of each Orb by calling the HexGrid initWithRadius. All the computations (tile center, tile coordinate, etc) are based upon the radius of an Orb. In the game, I slightly increase the radius to give a little empty space (padding) between other Orbs.
Even though the Orb sprites are round, I set up a box2d body that is hexagon shaped and surrounds the sprite with vertices for each point on the hexagon. I may have been able to just use a circle box2d shape, but I wanted to see exactly how the hexagons laid out using box2d debugDraw. I also do not use physics in the game as I merely want to detect collisions using a contact listener.
When an Orb is released from the “Claw” it will drop towards the floor. Using box2d collision detection, when an Orb either contacts the floor or another Orb, the class method getHexTileAtPoint is called using the center point of the Orb. The method then returns the column and row for the hex tile that center point of the Orb falls in. I should also mention that each Orb is a member of an Orb class that I set up and has an instance variable hexColRow which I then store the returned CGPoint. I then call the getHexTileCenter method and I simply move the Orb to the returned coordinates. Did that make sense?
-(CGPoint) getHexTileAtPoint:(CGPoint) orbCenter
-(CGPoint) getHexTileCenter:(CGPoint) tileCoordinate
Checking for matching colors
Using a Cocos2d scheduler that runs every 1/30 of a second, I check every Orb to see if it has 3 or more matching/adjacent colors. I mentioned that each Orb is a member of an Orb class that I set up and has an instance variable hexColRow. Well, here is where I use that. I set up a recursive method that uses the hexColRow and will populate an array of Orbs and their hexColRow coordinates that have 3 or more matching adjacent colors.
-(void) getHexTileMatchesWithTile:(int)col Row:(int)row Color:(NSString *)color
Now it’s just a simple matter of going through the matching array and destroy the Orb sprites and their box2d bodies.
Lastly, I use some of the same HexGrid methods to determine if any Orbs should begin falling due to their not having any Orbs under them. I then put my simulated physics in effect and set the Orb dropping again. Of course the scheduler will run again and see if these newly dropping Orbs set up another match 3+.
Here is a video of the game play and the Orb placement.
Using a hex grid can be used in many ways to enhance game play and it’s not too difficult to put into your own game play. For further understanding, visit the reference site at http://jemgine.omnisu.com/?page_id=412 I was hoping to have Orbs Away! finished by the time I posted this, but I still have some finishing work to do on the game. I’m really bummed that I didn’t get it done in time to be released for Christmas. I could have had a Christmas version as well! If you would like to be informed of updates related to Orbs Away! or to become a beta tester, you can sign up here.
Posted on November 22nd, 2010 No comments
We are nearing completion of what we think will be the next big hit in iPhone gaming. Orbs Away! is based upon a classic matching arcade game. The game play is addictive and challenging with multiple levels and Game Center scoring. If you are interested in becoming a beta-tester and having the app before anyone else, just visit our announcement page and sign up. If easy, free and we will only contact you to let you know of when it is available on the App Store and to give instructions for becoming a beta-tester.
Posted on May 10th, 2010 No comments
Want some free romance tips? We are giving away 20 promotional codes that can be redeemed within iTunes for a free copy of the popular Slots Of Love iPhone app. Full of romance ideas for both genders, Slots Of Love can lift your romance to new levels. All we ask is that “Like” us on facebook and post a romance idea/tip. 20 romance idea posts will be chosen at random this Friday – May 14th. Tell all your friends!
Posted on May 4th, 2010 No comments
The folks at Frivolous Entertainment teamed up with Gizbitz to produce a spin the bottle game for the iPhone and iPad to help promote their site SexIsFun.Net. While working on the iPhone app, Apple opened up the development gates for the iPad and we switched gears to get the iPad version out first. We did it in time for the iPad app store grand opening and we were very excited to be among the first with an iPad application. Today (actually last night) marks the day that the iPhone version is now available on the app store.
While spin the bottle as a game has been around for a long time…I guess ever since their were bottles, the Sex Is Fun version adds the ability of player avoidance and kissing preferences. Now we all know there are no ugly people in the world, but if you do happen to stumble across one AND happen to be playing this game, you can safely avoid kissing them as a truth or dare question is brought up instead of a “Kiss”. The game play appears random and no one will ever know the difference. Whew!
Working with the folks at SexIsFun was a pleasure and if it wasn’t for the great teamwork, we would not have made the short deadline for the iPad app.
They have other games as well as a popular podcast on rational discussions of human sexuality and education. More information for the iPad version or iPhone version can be found in the iTunes App Store.
Posted on January 30th, 2010 No comments
I have been following the blogs and press related to the Apple announcement of the iPad. A lot of what I have read is on the negative side. However, these writers are focusing on what the iPad can’t do. Yeah, it doesn’t run Flash in the browser, no ability to run multiple applications at the same time (yet?), no camera (yet?)…yadda, yadda. I do believe that despite these issues, the iPad will be a very prominent device used throughout the home of the average consumer. With the entry price point of $499, it will be sitting on the coffee table a lot quicker too. Here is a little scenario of what may very well be the typical day in the life of an iPad.
- While making coffee to start the day, I reach for my iPad to check out the morning news sites in Safari and the various news apps that I have installed.
- As I eat breakfast and sip on some ever so delicious coffee, I bring up the calendar app to get an idea on how my day is going to go.
- I do a quick check of my email and reply to a couple before I go in to work.
- Kids are getting up now and they ask for the iPad (I really must get another one!) so that they can check off their daily chores via the GizBitz chore app (yeah..I know…a plug).
- My beautiful wife (another plug..hehe) is up and repeats the same usage I did on the iPad.
- Even though my wife works during the day, she takes time out to take one of our kids to get his allergy shots. Lucky kid. He gets to use the iPad to watch a TV show and play a game during the drive time and while sitting in the Drs. office.
- Making dinner for us tonight, my wife brings up her recipe app on the iPad. Complete with pictures and a calculator that automatically adjusts the recipe for how many of us are eating at home tonight. Our oldest ones aren’t home as much as they used to be due to work and sports. My wife also complains that the dinners never look like the pictures. I tell her they still taste the same. Oh…and it always tastes good too.
- Still making dinner, she brings up facebook to catch up on whatever the heck her friends are either doing or want to do. There is no Flash so she can’t play farmville and that may be a good thing.
- After dinner, the kids check off their chores again via the iPad. They get $$$ for them so they are really into chores now.
- Most of the time we all have too much going on in the evenings, but tonight is different. We all plop down on the couch to watch some TV. Grabbing the iPad, we use the (insert Satellite or Cable TV vendor here) iPad/iPhone app to view the schedule. Yes, we could use the onscreen guide, but it is slow and the interface just plain sucks. The iPad is fast and has more information on it’s screen.
- After we agree to a TV show to watch (we really need an app for that), I tap on the “View Now” button and viola, the iPad is now a remote and the channel on the TV changes to what we agreed on! Due in part that the tuner is on the same network and the iPad app can communicate with it.
- While watching the TV show, we see a trailer for a movie that is coming out this weekend. Hey! The iPad is right there so we checkout the showtimes for this weekend and compare the times we have available with the calendar app. Holy crap! we have some time that we are all together on Sunday afternoon. So we touch type the event into our family calendar. (we now have a new meaning for touch typing)
- One of the kids just remembered that he has a paper due for school tomorrow. So while partaking in our family TV night. he grabs the iPad and uses one of the iWork apps to get it finished.
- The kids are still up but my wife and I head to bed. I’d love to read my latest iBook purchase, but she has dibs on the iPad tonight. Did I mention that I really, really need to get another iPad?
That is just one scenario of using an iPad throughout the day. Sure, we could just use our iPhones or jump on the laptop/desktop to do most of these things. However, having an iPad around is like reaching for the remote, but better. The remote sometimes gets lost in the cushions.
Posted on March 13th, 2009 1 comment
Recently, I gave a presentation on Search Engine Optimization (SEO) for a local Business Networking International chapter. My time limit was set at 10 minutes to give a presentation on SEO. What! Wait! Ten minutes? I could go on and on about SEO and how to apply various techniques to your current web site and design to improve your visibility on the web. How was I going to cram all of what I know, as well as cover some of the tools available, in such a short amount of time? Well, truthfully, I wasn’t able to. I did design a Keynote presentation to cover most of the basics in 17 slides, but that left me to present a little over 30 seconds per slide. I am very excited about my profession and love talking about it, so I still went for it. What I am giving you here is just an excerpt, but if you want your web site to be found in search engines and increase your user traffic, you should find some of this information beneficial. You can also download my slides on “Search Engine Optimization – What it is and what you can do to help your page rank in search engines such as Google, Yahoo! and MSN Live Search” I will put up a section on the main site related to SEO as well as record my presentation to go along with the slides.
What is SEO? According to Wikipedia – “SEO is the process of improving the volume and quality of traffic to a web site from search engines” Ok, simple enough. But what the heck do they mean by “process”? I could quote another Wikipedia quote on the word process, but in this instance it means time, effort and more than likely, lots of it. I’ll break up this so called process into 6 elements but keep in mind that SEO is not an exact science. If would be if you had the secrets to Googles search engine algorithm, but they are pretty tight lipped about exactly how they rank and rate sites. Besides that, the major search engines are always refining their techniques in order to provide the most valuable search returns possible. SEO is not a sure fire way to get your site at the top of search pages. However, in this and in subsequent posts I’ll briefly layout 5 areas that you should concentrate your efforts on and could very well increase your odds.
Keywords. Keywords are the foundation of your search engine strategy. After all, keywords are what someone places into a search box to get back results related to…you guessed it…their keywords. In essence, if your site has references to their typed in keyword(s), you move into their returned search results. (Provided that your site is in their directory of searches to begin with. I’ll cover this in another post) Picking your web site keywords are very critical. Also, think of keyword phrases. For example, keywords for a web designer might be…uh….web and design. However, to help in search results local to the web designer, the keyword phrase would be something like “Web Design in St. Louis”. Jot down on a sheet of paper (you could use an application such as Excel, Numbers, Word or Pages as well) all the keywords and phrases that you think others would use to find your site. Is it the products that you sell? How about the services that you provide? Then think about variations on those keywords. Next, talk to your friends, co-workers and others to get an idea on what keywords they would use to search for your web site. I might think everyone uses the search phrase “Web Design” but it could be that others use the phrase “Web Site Creation”. In the end, you will choose your keywords carefully. However, if this is your first time going through this exercise, just give some thought to them as the next step may change your keyword thinking.
Ok. You are all finished with your keyword selection. Your next step is to use some online tools to more or less validate your keyword selection and possibly eliminate some of your choices. One such tool is the Google keyword tool. It helps to have a Google Adword account (I’ll post something on that down the road) but you can access it for free at www.google.com/sktool. With this keyword tool, you can type in your keyword or phrase and get a number of the monthly searches for that keyword. You will also see variations or the keyword phrase as well as the search number. As a test, I type in the word jewelry which had 350,000 searches per month. Jewelry Stores has 100,000 per month. Jewelry Television has 18,000 with a mix of others in between. This whole process gives you a good indicator on how well your keyword is used. I’m not saying that you have to use the top searched keyword. In the above example for jewelry, I see that handmade jewelry has about 23,000 searches per month and if I did indeed sell handmade jewelry, I might concentrate on this particular keyword phrase and go after those 23,000 searches. You may even find some other ideas for keywords along with their searches/month. The keyword tool from Goolge is just one of many keyword tools out there. Probably one of the best tools is at www.wordtracker.com. However there is a fee (ie: $$$) to use it. In part 2 of SEO, I will discuss what you should do with these keyword phrases that will help your page rank. I will give you a hint though….Content.
Posted on March 6th, 2009 No comments
Notes, notes, notes. In my real life as a web designer and software developer, I meet with clients routinely. During the course of these meetings, brainstorming sessions take place and I try to write down all the ideas and directions as fast as I can. However more times than not, I have a hard time focusing on my note taking and the discussion at the same time. Over the past month, I have been using a simple device that is proving to be very effective in keeping me involved in the discussion and taking notes at the same time. That device is the LiveScribe 1GB Pulse Smartpen available on Amazon.com or Target stores. The pen writes like an ordinary pen, but the similarities stop there. The pen also records your handwriting using special notebook paper and it records audio at the same time. Ok, I know what your thinking….so what! Well, during the audio playback, use the pen and tap on any word or drawing that you wrote while recording and the audio plays back exactly what was being said at that time. Here’s the awesome part. Now I don’t have to take meticulous notes or jot down verbatim the ideas, slogan or specific wording that comes up. I just write down various keywords or snippets of the conversation. Then, when I am back at my computer or whenever I need to go over what was said at the meeting, I just tap on a word or diagram that I jotted down, listen to the conversation and take any action that need be. Apart from the purchase of the pen, you do need to use special paper to make all this happen. Sure, the pen will write on regular paper, but the beauty and functionality is in the paper as well. Each page of the paper is coded with thousands of little dots that tell the pen (through its infrared sensor) what page in the notebook the writing is taking place and where on the page. If you look very closely at a page (at my age I have to use my glasses) you can see the little dots. However, they are not noticeable otherwise. The special paper is available in college ruled spiral bound notebooks and both lined and unlined journals. They are sold in packs (usually 4 notebooks per pack in notebook form and 2 per pack in journal form) with each notebook or journal numbered. Yes, the pen even knows which notebook or journal was used to take the notes! I’ll show you where this comes into play in a moment. At the bottom of each page, there are various icons that you can tap with the pen to start/stop recording, pause, adjust volume, playback speed, audio bookmarking and a way to jump to various places in your recording.
Even though you can use just the pen and paper for note taking and audio recording, you can add to it’s functionality by downloading the LiveScribe software that is available for both Windows and Mac OS with the Mac version just released out of beta. The pen comes with a nice little USB charger/dock. There is a magnet in the dock and all you do is set the pen flat in the dock and the magnet guides the pen in the proper spot so that the connecting points are lined up. When you launch the LiveScribe software, it senses the pen and begins a transfer of the audio and pen strokes stored on the pen. If it is the first time connecting the pen, you will be prompted to name and register the pen. After the transfer, the LiveScribe application will display each notebook used in the left panel and the pages with notes on the right panel. I have a separate notebook for my web design and custom software meetings, another for personal notes and a journal that I record information for my kids high school hockey and baseball activities (I’m their coach for both of these…whew!)
All my notes are stored on my Mac through the LiveScribe software. You can view the note pages, print them out or even click on an area of the note to hear the recording, just like when using the paper. I can delete the notes on the pen to conserve storage space on the pen and still have all the notes and audio available through the software.
Currently, the SmartPen comes in a 1GB and 2GB version. $149 for the 1GB model and $199 for the 2GB model. According to the LiveScribe website, the 1GB model can store 100 hours of audio recording, however there are various audio recording quality modes that may affect this number. The audio quality is very good and I usually leave it on the default setting. You can change the audio quality to various modes including mono, stereo and with the included headset you can even record in 3D. There is a microphone in each earpiece and the headset has a special jack that fits into the end of the pen that allows this. You cannot use your regular headphones (such as the ones you use on an iPod or iPhone) as the SmartPen has a 2.5mm jack whereas most devices with headphone jacks are the 3.55mm inch kind. I usually listen through the speaker located on the side of the pen itself and have no problems.
You wouldn’t think that a pen could have applications, but the Pulse Pen does. Pre-installed on the pen are various utilities such as time, date, battery life remaining and storage remaining. You can get to these utilities by taping on the menu icon on the paper or just draw your own menu icon. There is even a development kit for the pen that allows developers to write applications specifically for the pen. A few that are included in the pen include Calc, Piano and Translator. With Calc, you can write an equation on paper and the LCD display on the pen will show you the result. Handy if you don’t have a calculator around. My iPhone has a calculator app, so I don’t really use this feature. There is also a Piano application that guides you through drawing a simple piano keyboard on paper. When you are finished drawing the keyboard, you simply tap on the simulated keys to emit a piano like sound from the pen. I sense a good bar bet with this. “Hey, I bet I can draw a piano keyboard and play notes that you can hear” There is a demo translator that will convert English into Spanish, Swedish, Arabic and Mandarin. There are only a handful of words and the numbers zero to nine to work with. I have no idea why those languages, but having the pen say “Beer” in Mandarin is a hoot. Hmmm…something more for that bar bet.
Overall, I give the LiveScribe Pulse Pen 5 Gizzies on a scale of 1 to 5. A Gizzy is a Gizbitz rating that I just made up. I use the pen constantly and it is always in my laptop bag or on my desk. Various accessories such as the Livescribe Single Subject Spiral Notebook, 4-Pack, Nos. 1-4, Premium Leather Case and SmartPen Ink Cartridges should be on your list too, either for yourself or a great gift for that note taker in your life.
Posted on February 13th, 2009 No comments
We just completed a small project for a web site design for Antimite.com. I’ll be the first to admit that I know nothing about bugs or home pests, but after working with Tod at Antimite…he knows bugs. Not once did Tod bug us however. (that was a pun and intended) He wanted a simple web site that he could put information about his services and a service request form. We used standard HTML and CSS stylesheets throughout the site, with PHP for the request form and a smidgen of Flash for the main page banner. Google Analytics was added free of charge, as always. Soon, we will be updating his web site with customer satisfaction comments and happy pest/termite free family pictures. He has me convinced about his guaranteed services, that we will probably be switching to Antimite for our needs too. My wife is really terrified of spiders.
Posted on November 10th, 2008 No comments
Gizbitz is now a member of Business Networking International/Winghaven chapter in O Fallon, Missouri. We have much work, and advertise very little. Most of our business comes from the tried and true “word of mouth” from our clients and friends. BNI is an extension to that and adds the BNI Givers Gain mantra. We are now part of a group of dedicated and professional business people and share prospects and offer referrals. Not to mention a great breakfast at the Blue Sky Cafe where we hold our weekly meetings. We are in need of certain professions in our group to build it stronger. Check out our BNI chapter page to see if your profession is listed. Just drop me an email if you are interested in membership. Visitors are always welcome.
Posted on September 30th, 2008 No comments
We just received and email stating that our LLC filing is complete. The growth of our business demanded that we seek a corporation status. Not to mention that “LLC” looks pretty cool. Even though Gizbitz is now a corporation, our belief, attitude and approach as a business and service provider, will remain the same…Awesome.