|January 18, 2012 at 7:57 pm #238512|
I am working on getting a Bullet engine integrated with the Player class code, so the Player class can call BulletCache methods.
My integration so far consists of creating a BulletCache object in the Player class’ interface e.g.:
And I also added in the Player init method:
However, the bulletCache = [BulletCache node]; call produces an infinite loop when I start a new game from the main menu layer.
I enabled breakpoints, and checking the console yielded this message:
I get a non-NSAssert message: non-NSAssert msg:
Question: Is this infinite loop caused by the game’s failure to locate and load the BulletCache’s images?
|January 18, 2012 at 9:38 pm #362604|
So I did a breakpoint check on the program, and on two separate occasions, I put two break points in two different methods of the Bullet and BulletCache classes.
The Breakpoint was place on the same line as the ‘if ((self’ code
And the message displayed in the console read: GDB:Stopped at breakpoint 1 (hit count: 3) ‘-initWithBulletImage – Line 29′
This method is in the Bullet class.
The second Breakpoint I put (in a different Build & Run of the Program) was in the BulletCache class and it is the BulletCache’s init method:
Placing the breakpoint on the line of the statement:
yielded this message displayed on the bottom of the console:
“GDB: Stopped at breakpoint 1 (hit count: 1) -’-init-Line 84′ “
So it looks like the crux of the issue is that the game can’t seem to find bullet1big e0000.png
Thing is though, the bullet1big.png is a texture made by Zwoptex, and bullet1big e0000.png is a frame within that texture that I called because I haven’t yet written code that assigns each frame (total of 8 bullet frames in that texture) to the direction of the player (i.e. player is facing north and fires, north bullet frame is drawn)
This really is a confusing issue for me folks, I’d appreciate some help!
You must be logged in to reply to this topic.