Thread: Handling Stuff on the Screen

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    73

    Question Handling Stuff on the Screen

    How does one keep track of many tasks on the screen, such as the enemies, the players, the background, ect. ? Is it proper to use threads, or is there some other way of keeping track of all of this? Thanks! ^_^

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    There are many ways of doing this. My preference is Enemy, Item, Effect, Player, (etc...) classes for your game objects. Most likely these have common aspects, like positions and stuff so you may want to inherit from some general Object class. Then store the objects in lists which you traverse and update in every game loop. I wouldn't recommend the use of threads unless you really need it.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How does this user get screen to run under root?
    By Overworked_PhD in forum Tech Board
    Replies: 2
    Last Post: 06-28-2009, 09:31 AM
  2. Linux Problem Screen Resoultion
    By Matus in forum Tech Board
    Replies: 1
    Last Post: 01-29-2009, 04:39 PM
  3. Largest screen buffer size?
    By Ash1981 in forum C Programming
    Replies: 2
    Last Post: 01-30-2006, 04:31 AM
  4. Feedback: Functional Specification Wording
    By Ragsdale85 in forum C++ Programming
    Replies: 0
    Last Post: 01-18-2006, 04:56 PM
  5. Console Screen Buffer
    By GaPe in forum Windows Programming
    Replies: 0
    Last Post: 02-06-2003, 05:15 AM