Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Mobile Development > BOOK: Beginning iOS Game Development
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning iOS Game Development
This is the forum to discuss the Wrox book Beginning iOS Game Development by Patrick Alessi ; ISBN: 978-1-1181-0732-4
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning iOS Game Development section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 19th, 2012, 10:39 PM
Registered User
Points: 22, Level: 1
Points: 22, Level: 1 Points: 22, Level: 1 Points: 22, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default So, I was attempting the Blocker project and ...

Aloha everyone,

My name is Bud and I'm currently living in Honolulu. I have an iOS development company, but am really new to Objective-C. I've only written four apps, and they're simple database-driven (SQLite) apps. I've always wanted to create a good game, but didn't know where to begin.

To make a long story short, I got Beginning iOS Game Development and have been going through the book. I got stuck in the Blocker project, because when I run the app the first time (pg 195), it compiles and runs, but no blocks are created.

I got confused when the author writes "Users of your class will pass you a frame size and a color to initialize block of a specified color." Where, exactly, does the user pass on this information? What I think is happening is that when the init method of the BlockView.m file is called, it doesn't know the value of inputColor and just executes the rest of the code without creating the blocks. All I get is a grey screen. I've been over and over the code, but can't find the error. Has anyone else experienced this issue?

Last edited by whjones; March 19th, 2012 at 10:56 PM..
Reply With Quote
  #2 (permalink)  
Old March 20th, 2012, 12:35 AM
Authorized User
Points: 70, Level: 1
Points: 70, Level: 1 Points: 70, Level: 1 Points: 70, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2012
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by whjones View Post
Aloha everyone,

My name is Bud and I'm currently living in Honolulu. I have an iOS development company, but am really new to Objective-C. I've only written four apps, and they're simple database-driven (SQLite) apps. I've always wanted to create a good game, but didn't know where to begin.

To make a long story short, I got Beginning iOS Game Development and have been going through the book. I got stuck in the Blocker project, because when I run the app the first time (pg 195), it compiles and runs, but no blocks are created.

I got confused when the author writes "Users of your class will pass you a frame size and a color to initialize block of a specified color." Where, exactly, does the user pass on this information? What I think is happening is that when the init method of the BlockView.m file is called, it doesn't know the value of inputColor and just executes the rest of the code without creating the blocks. All I get is a grey screen. I've been over and over the code, but can't find the error. Has anyone else experienced this issue?
Question: how far in the chapter did you get before you compiled? This part of the chapter you set up the block to allow a size and color parameters. later in the chapter you create a 5x3 array of colored bricks. But if you compiled right here, there should be no zero bricks yet.

(I have the kindle version, so I'm not sure where page 195 is)
Reply With Quote
  #3 (permalink)  
Old March 20th, 2012, 01:52 PM
Registered User
Points: 22, Level: 1
Points: 22, Level: 1 Points: 22, Level: 1 Points: 22, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Aloha Gordio,

Thanks for your response. I was unable to answer your question until now. With respect to the page I mentioned, that was the first time we are directed to build and run the game. The author stated that the game should compile and run, but made no mention as to whether or not the blocks would appear. While giving the code, the author mentions that the switch statement is used to determine the color of the blocks themselves, and the sentence I quoted seemed to give me the impression that the blocks should have appeared, but as I posted, I could see no instance of the user actually sending any color information to the game, at least not at that time.

In other words, when you went through the process of building this game, were you only presented a gray screen at that point? I would just like to verify that I am getting the correct response from the iPhone simulator.

Thanks again for your response.
Reply With Quote
  #4 (permalink)  
Old March 20th, 2012, 02:15 PM
Authorized User
Points: 70, Level: 1
Points: 70, Level: 1 Points: 70, Level: 1 Points: 70, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2012
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by whjones View Post
Aloha Gordio,

Thanks for your response. I was unable to answer your question until now. With respect to the page I mentioned, that was the first time we are directed to build and run the game. The author stated that the game should compile and run, but made no mention as to whether or not the blocks would appear. While giving the code, the author mentions that the switch statement is used to determine the color of the blocks themselves, and the sentence I quoted seemed to give me the impression that the blocks should have appeared, but as I posted, I could see no instance of the user actually sending any color information to the game, at least not at that time.

In other words, when you went through the process of building this game, were you only presented a gray screen at that point? I would just like to verify that I am getting the correct response from the iPhone simulator.

Thanks again for your response.
Yea I see where you are now. He told you to compile to make sure it doesn't crash. At this point, you're expected to see just grey.

The purpose of the section is to set up the brick objects. Later in the chapter, you place the bricks in the level. Then you'll see them. I hope this answers your question.
Reply With Quote
  #5 (permalink)  
Old March 20th, 2012, 07:42 PM
Registered User
Points: 22, Level: 1
Points: 22, Level: 1 Points: 22, Level: 1 Points: 22, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Aloha again Gordio,
Thank you for your response. I'll continue driving on then. That was my assumption, but I just wanted to verify that. Actually, I really, really like this book. He not only give the code necessary to build the app, but also takes the time to explain what is going on. This is one of the best programming books I've read. I can do a lot of things with Objective-C, but I do need the hand-holding when it comes to understanding how to write games - that's something I've not done before.
Reply With Quote
  #6 (permalink)  
Old March 20th, 2012, 07:47 PM
Authorized User
Points: 70, Level: 1
Points: 70, Level: 1 Points: 70, Level: 1 Points: 70, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2012
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by whjones View Post
Aloha again Gordio,
Thank you for your response. I'll continue driving on then. That was my assumption, but I just wanted to verify that. Actually, I really, really like this book. He not only give the code necessary to build the app, but also takes the time to explain what is going on. This is one of the best programming books I've read. I can do a lot of things with Objective-C, but I do need the hand-holding when it comes to understanding how to write games - that's something I've not done before.
I totally agree. My background: I'm not a programmer. I've tried learning C++ or javascript years ago on my own while in college, and even recently. It was frustrating and I gave up. This is the first programming book I actually finished. I used to blame myself for not being able to learn the code, but the fact this book made sense to me proves it hadn't been me who failed. The books I have tried just sucked! This book is responsible for 99% of the code I know. I hope the author writes more programming books (or adds a second edition to this book). This is the least intimidating programming book I've ever read.
Reply With Quote
  #7 (permalink)  
Old March 20th, 2012, 08:17 PM
Registered User
Points: 22, Level: 1
Points: 22, Level: 1 Points: 22, Level: 1 Points: 22, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Aloha Gordio,

Have you read any of the other Wrox books dealing with iOS or Mac OS? I'm just curious if this is the author's style or if that requirement was placed on the author by the publisher. Either way, I can't wait until I get to learn about Bluetooth connectivity, as I have an idea for a neat game, based on a podcast I enjoy, which as they say is a complete ripoff of a BBC show. Assuming I can avoid the lawyers once I have it complete it should be a good game. I just don't know where to get that "compelling content" stuff
Reply With Quote
  #8 (permalink)  
Old March 20th, 2012, 08:33 PM
Authorized User
Points: 70, Level: 1
Points: 70, Level: 1 Points: 70, Level: 1 Points: 70, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2012
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by whjones View Post
Aloha Gordio,

Have you read any of the other Wrox books dealing with iOS or Mac OS? I'm just curious if this is the author's style or if that requirement was placed on the author by the publisher. Either way, I can't wait until I get to learn about Bluetooth connectivity, as I have an idea for a neat game, based on a podcast I enjoy, which as they say is a complete ripoff of a BBC show. Assuming I can avoid the lawyers once I have it complete it should be a good game. I just don't know where to get that "compelling content" stuff
No. this is the only book I've read by him and by the publisher. Reading other books by other publishers and other authors, I think it's usually the author that affects how good a book is. The publisher sometimes has a format, but it's really up to the author to make that format work.

For example, I had gotten one book by Apress that is poised with typos that even as a beginner, just looking at the I knew the code wasn't going to work! but the book I'm reading now on cocos2d, also by Apress but a different author, is good and has a different writing style.
Reply With Quote
  #9 (permalink)  
Old March 20th, 2012, 10:39 PM
Registered User
Points: 22, Level: 1
Points: 22, Level: 1 Points: 22, Level: 1 Points: 22, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Aloha Gordio,

I also was interested in getting that Cocos2D book, but when I tried to load the Cocos2D templates on my MacBookPro, I was unsuccessful. I am running Xcode 4.3.1, and the only people that have it running successfully, from what I can gather, are the ones that had it installed under an earlier version of Xcode. When did you load the Cocos2D templates? Have you heard of anyone successfully loading them under Xcode 4.3x?
Reply With Quote
  #10 (permalink)  
Old March 21st, 2012, 12:16 AM
Authorized User
Points: 70, Level: 1
Points: 70, Level: 1 Points: 70, Level: 1 Points: 70, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2012
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by whjones View Post
Aloha Gordio,

I also was interested in getting that Cocos2D book, but when I tried to load the Cocos2D templates on my MacBookPro, I was unsuccessful. I am running Xcode 4.3.1, and the only people that have it running successfully, from what I can gather, are the ones that had it installed under an earlier version of Xcode. When did you load the Cocos2D templates? Have you heard of anyone successfully loading them under Xcode 4.3x?
I don't know yet…I just read the free sample pages (kindle), and I just bought the full book. The sampler didn't really have me compile anything. I'm hesitantly optimistic, because of some 3 star reviews on amazon. I'll tell u how it is as I read it.

Edit: back to the original topic about the author. This book actually taught me objective C better than any "beginner objective C" book I've read. For example, the standard method syntax "-(void) method:(int)inValue1 parameter2:(int)inValue2" confused me. I didn't know how to interpret it. All books I've read never explained how to read this, and I thought "if I see it more, maybe it'll start to make sense. Nope it never did. Only after this book explained it to me, I understood it. If this guy wrote a cocos2D book, I'd be the first in line. I might come off riding on his ballsack, but I'm grateful the author wrote this book.

Last edited by Gordio; March 21st, 2012 at 03:09 PM..
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Alert for popup blocker in C# abhishekkashyap27 ASP.NET 2.0 Professional 0 April 9th, 2009 09:14 AM
Session tracking with google popup blocker dshamim Classic ASP Professional 0 December 20th, 2006 09:48 AM
ClientScript. : window.open -> Popup Blocker Issue AbrarNazeer ASP.NET 2.0 Professional 3 September 20th, 2006 09:59 AM
JavaScript : window.open -> Popup Blocker Issue AbrarNazeer Pro JSP 0 September 2nd, 2006 05:49 AM
PopUp blocker In C# VB.net nashnash ASP.NET 1.0 and 1.1 Professional 1 September 29th, 2004 03:53 AM



All times are GMT -4. The time now is 08:26 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.