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 3350784
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:49:44+00:00 2026-05-18T01:49:44+00:00

I’m currently trying to learn game programming, so I’m starting with a simple application

  • 0

I’m currently trying to learn game programming, so I’m starting with a simple application for the iPhone so that I can sort of learn the flow and organization of game programming. Right now, I have a class for the player’s ship called PlayerShip and the PlayerShip can come in different levels (i.e. when the player upgrades their ship). So for each level of ship, the class uses a different image. For each level of ship there are constant values that I have such as the number of turrets on the ship, the location of those turrets, and the number of thrusters and location of those thrusters on the ships (e.g. ship level 1 has two turrets and one thruster). My question is, what would be the best way to store and read in this data for the ships? I don’t want to have to define them each time I initiate a ship because that seems unorganized, and I also would not like to hard code it in case of changes. I was thinking of using a PLIST file to store all of the values, but I also know that when reading a PLIST it’s all or nothing meaning you have to read the entire file into memory and I don’t want that to hit the game’s performance. So what would the best route for storing this static information and having it be retrievable in the code be without having to risk performance?

  • 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-05-18T01:49:45+00:00Added an answer on May 18, 2026 at 1:49 am

    If you don’t hard code you values into the class, then you will have to read them from some external source (which can affect performance – depending on how and when you do it). In your case, it sounds like your best bet is to load the information “upfront” (such as when the app starts up). Then it will remain in memory until the program is terminated.

    As far as how to store the data, you may consider looking into Core Data:

    http://developer.apple.com/library/ios/ipad/#documentation/DataManagement/Conceptual/iPhoneCoreData01/Introduction/Introduction.html

    Of particular interest to you will be how to ship you app with pre loaded data:

    http://www.raywenderlich.com/980/core-data-tutorial-how-to-preloadimport-existing-data

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

Sidebar

Related Questions

I am trying to loop through a bunch of documents I have to put
I'm making a simple page using Google Maps API 3. My first. One marker
I have a bunch of posts stored in text files formatted in yaml/textile (from
I have some data like this: 1 2 3 4 5 9 2 6

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.