Items On Screen

Discussion in 'iOS Programming' started by, Oct 10, 2011.

  1. macrumors regular

    Jun 26, 2011

    I am working on a project that requires me to have the user set a number of marbles, and they amount of marbles would appear on the screen. Then, every time an action occurs, a marble falls in the jar. Similar to the Starbucks Mobile Card app(Stars Section). I would also like to use a page view controller to switch between users.

    Example User1- 10 marbles
    User2 - 15 Marbles

    Is there any code available?

  2. jiminaus macrumors 65816


    Dec 16, 2010
    If you're being paid to do this (for example, you've taken on a contract), I have two questions for you? Does the person paying you know that you're under-skilled for this job? Are you paying the people whose code your copying and pasting and presenting as your own?
  3., Oct 10, 2011
    Last edited: Oct 10, 2011 thread starter macrumors regular

    Jun 26, 2011
    This is my own project and I have not taken any code from others. When I mean code out there, is there any sample code, or tutorial.
  4. chown33, Oct 10, 2011
    Last edited: Oct 10, 2011

    chown33 macrumors 604

    Aug 9, 2009
    Sailing beyond the sunset
    For which parts? Counting marbles? Drawing marbles? Animating marbles?

    Have you broken the problem down into smaller parts? What are those parts?

    For example, what's on the screen: a jar and marbles in the jar. What are the parts: jar, marble (multiple). How do you draw a jar on screen? How do you draw a marble on screen?

    Exactly what is the name of this marble game? If it's something well known, has it ever been implemented as a computer program before? If it's something you thought up, then why would you expect that someone else might have written code for it? No programmers I know can read minds.

    If you haven't already found the code for a complete marbles-in-a-jar game, then it's not likely you ever will. That means you have to do some breaking down of the game into smaller solvable problems, which you can then search for solutions of. Again, if you find nothing, break the problem down again. Eventually you'll reach some smaller sub-problem such as "draw a circle on screen", where the circle represents a marble. Or perhaps "draw a shape on screen" where shape is a path that defines the outline of the jar. But until you break the problem down, you will never find solutions.

    If this process of breaking the problems down sounds familiar, it should. You will do it over and over again, for every program you write. It's one small part of what programming really is.

    Expecting to always find complete code for a whole game is like going into the woods and expecting sandwiches or tents to grow on trees.

Share This Page