How to Develop an iPad Board Game App: Part 2/2

Discussion of the official tutorials published on raywenderlich.com. Please only discuss the official tutorials here - for general questions, use the General Discussion forum instead.

How to Develop an iPad Board Game App: Part 2/2

Postby rwenderlich » Thu Feb 21, 2013 11:00 am

This is the official thread to discuss the following blog post: How to Develop an iPad Board Game App: Part 2/2
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ray Wenderlich
Blog: http://www.raywenderlich.com
Twitter: http://twitter.com/rwenderlich
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
User avatar
rwenderlich
Team Member
Site Admin
 
Posts: 2144
Joined: Thu Dec 23, 2010 4:14 pm
Has thanked: 28 times
Been thanked: 332 times

Re: How to Develop an iPad Board Game App: Part 2/2

Postby avi8tor » Fri Feb 22, 2013 6:29 am

Great tutorial and I may have an idea for an app based on this with some variations. My question is one of patents and copyrights. If I make a game with the Reversi logic am I not setting myself up for a lawsuit for patent violation?
avi8tor
Hacker
 
Posts: 18
Joined: Wed Oct 26, 2011 6:18 pm
Has thanked: 2 times
Been thanked: 0 time

Re: How to Develop an iPad Board Game App: Part 2/2

Postby zeiteisen » Fri Feb 22, 2013 11:02 am

Thats a nice tutorial. I like that you encourage unit testing.
The AI part is nice too. To copy the board is much better than my past approach to write a undo function.
zeiteisen
Uber Haxx0r
 
Posts: 75
Joined: Mon May 02, 2011 8:41 pm
Has thanked: 5 times
Been thanked: 4 times

Re: How to Develop an iPad Board Game App: Part 2/2

Postby ColinEberhardt » Fri Feb 22, 2013 8:15 pm

avi8tor wrote:Great tutorial and I may have an idea for an app based on this with some variations. My question is one of patents and copyrights. If I make a game with the Reversi logic am I not setting myself up for a lawsuit for patent violation?


Well, I'm not going to come after you with my lawyers ;-)

Although, I am guessing that you are referring to Pressman Toy Crop who market the game under the name Othello.

As long as you steer clear of registered trademarks, I very much doubt you would ever have any legal issues with publishing a Reversi game. From searching the internet, it would appear that it was patented in 1888 - this patent would have lapsed long ago.

Colin E.
User avatar
ColinEberhardt
Team Member
iOS Tutorial Team Member
 
Posts: 117
Joined: Sat Nov 03, 2012 2:17 pm
Has thanked: 7 times
Been thanked: 10 times

Re: How to Develop an iPad Board Game App: Part 2/2

Postby zeiteisen » Sat Feb 23, 2013 9:16 am

We made Reverse It and had never legel issues.
zeiteisen
Uber Haxx0r
 
Posts: 75
Joined: Mon May 02, 2011 8:41 pm
Has thanked: 5 times
Been thanked: 4 times

Re: How to Develop an iPad Board Game App: Part 2/2

Postby kurpaige » Sun Feb 24, 2013 2:25 am

Thank you for this tutorial. I actually understand most of it, I would never have been able to code it from scratch. any hint on how to set a difficulty?
kurpaige
Baby Hacker
 
Posts: 9
Joined: Tue Mar 01, 2011 1:35 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to Develop an iPad Board Game App: Part 2/2

Postby tflawlis » Sun Feb 24, 2013 7:18 pm

Most ALL the tutorials on this site are great. This one, though, illustrates strategic coding techniques that I would have expected not to be publicly shared due to the value. For example, your use of blocks implementing the "navigation" function is a great application for this tool.

Your encouragement for the use of unit testing is, embarrassingly, a topic I've never even taken an interest... but no more.

Much appreciation for the sharing of some great application development strategies.
tflawlis
Baby Hacker
 
Posts: 6
Joined: Fri Oct 26, 2012 9:32 pm
Has thanked: 6 times
Been thanked: 2 times

Re: How to Develop an iPad Board Game App: Part 2/2

Postby ColinEberhardt » Mon Feb 25, 2013 6:23 am

kurpaige wrote:Thank you for this tutorial. I actually understand most of it, I would never have been able to code it from scratch. any hint on how to set a difficulty?


Glad you liked it! Computer players often have their difficulty set by one of two methods, either:

1) The depth to which they can search the game tree is limited. i.e. an 'easy' player would perform a tree search to a depth of 2, 'medium' to 4 and 'hard' to '6'

or

2) The amount of time the computer player has to analyse moves is limited, i.e. an 'easy' player might be allowed to analyse moves for 0.5 seconds, 'medium' for 2 seconds and 'hard' for 10 seconds.

The timed version, while a little harder to write, is probably the best. If you just limit by depth, moves at the start and end of the game, where the game tree is small, will be made quite rapidly. However, in the middle of the game the computer player will be quite slow because there are a great many moves to analyse.

Hope that helps, Colin E.
User avatar
ColinEberhardt
Team Member
iOS Tutorial Team Member
 
Posts: 117
Joined: Sat Nov 03, 2012 2:17 pm
Has thanked: 7 times
Been thanked: 10 times

Re: How to Develop an iPad Board Game App: Part 2/2

Postby ColinEberhardt » Mon Feb 25, 2013 6:24 am

tflawlis wrote:Most ALL the tutorials on this site are great. This one, though, illustrates strategic coding techniques that I would have expected not to be publicly shared due to the value. For example, your use of blocks implementing the "navigation" function is a great application for this tool


Wow - great praise! glad you liked it, and thanks for your comments.

Colin E.
User avatar
ColinEberhardt
Team Member
iOS Tutorial Team Member
 
Posts: 117
Joined: Sat Nov 03, 2012 2:17 pm
Has thanked: 7 times
Been thanked: 10 times

Re: How to Develop an iPad Board Game App: Part 2/2

Postby rcritz » Wed Mar 20, 2013 12:18 pm

In the copy of the tutorial posted on the site (I haven't looked at your completed code or repo), it seems to me there is an extraneous _ in scoreForBoard:depth: in SHCComputerOpponent.m. At the point where you clone a board to create testBoard, you are cloning the current live board each time. Unless I haven't yet had enough coffee this morning to parse this out, that would fix it so that the search doesn't actually play out several moves forward the way it should. I think the line should read:

Code: Select all
SHCReversiBoard *testBoard = [board copyWithZone:nil]; // no underscore here!


Thanks for a great look at a cool game design with some interesting techniques thrown in for good measure!
rcritz
Baby Hacker
 
Posts: 5
Joined: Mon Feb 25, 2013 9:44 pm
Has thanked: 0 time
Been thanked: 0 time

Next

Return to Official Tutorials

Who is online

Users browsing this forum: No registered users and 18 guests