Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8315063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:02:09+00:00 2026-06-08T21:02:09+00:00

I have a simple game, breakout clone. There is gameplay layer, menu layer. I

  • 0

I have a simple game, breakout clone.
There is gameplay layer, menu layer. I can call menu during play just fine, can use next level button ( it makes new gameplay layer with next level and transitions to its scene). But what i want is at the end of level, when I killed all blocks I want that menu to pop up so player could click next level. But the provlem is that i store blocks number in gameplay layer, so when they reach zero i get certain property turned to true. But when i try to read that property from menu when level ends, i can’t, because my gameplay layer is already deallocated since i transited to menu.

Tldr; how to change level with button?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T21:02:12+00:00Added an answer on June 8, 2026 at 9:02 pm

    I think your question is about Game Architecture. There are lots of trade-offs regarding how you choose to architect your game. This is something that I have thought a lot about as I have created Cocos2d games.

    The comment by Shailesh_ios will work. But if you want to create a more complex game you should consider designing the game in a way that neatly organizes the different modules and components in your game so that they are easy to use and support. As your game gets more complex it can become very messy if you add loads of functionality to the AppDelgate. To stay organized and keep your sanity when updating your code, I suggest creating a centralized game manager service in your game.

    Create a Centralized GameManager Service
    –For all centralized services that your game will need, one thing that has worked good for me is to create a game manager class that is a CCNode or NSObject subclass. This class is made into a singleton. I then create separate classes for things like GameCenter, OpenFeint, In-App Purchase, player preferences, local scores and achievements, physics world manager, game audio, game state, etc.

    Add class instances as modules to the GameManager
    –These classes are all then owned by the GameManager singleton class and can provide services to the game components that need them. Since these classes generally use very little memory there is no need to constantly be creating and destroying them each time a scene changes, which just wastes CPU cycles and battery life.

    A note of caution
    –Be careful though, because it is easy to abuse the global singleton GameManager class by adding things to it that don’t belong in it. Any centralized service that may be requested from various game components could be considered to be added to the GameManager. By adding to the GameManager, I mean coding each module in its own class and then have it be created and owned by the GameManager.

    Examples—
    For example, your custom local scores and achievements class could be setup to store a players scores, persist them to a file or NSUserDefaults, and make that information available to any game component that needs it.

    The custom GameCenter or OpenFeint class would take care of authenticating the player and then as a service provide submitting scores/achievements, downloading scores/achievements, presenting the built in GameCenter/OpenFeint UI for leaderboards and achievements, etc.

    This way you can focus on designing your game and have the basic services a game needs available from anywhere within your game.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple puzzle game. There is an image consisting of 16 tiles
I have just started trying to make a simple game with XNA 3.1 to
I have created a simple flash game similar to shooting balloons. You can find
I have written a simple class to play audio files in a simple game.
I have a simple application with 'game' and 'article' pages that users can share
I just made a simple HTML5 game for mobile webkit. I have made a
I have just began learning Java programming, I have created a simple game using
I have a simple game activity. I start it and than press the back
I have a simple JavaScript game that sends a score to PHP by adding
I have written a simple memory game. You click on one of 16 cards

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.