   Programming logic question
  I am a newbie at programming, well kinda. I have dabbed in freebasic and c++, and java at school. I even started making some simple 2d games, but never finished them. So here is my question.In a game like for example space invaders, there are multiple bad guys on screen at same time. I'm not quite sure how you go about making a bunch of different AI npcs move around to different places all at same time. I mean making one move around is one thing, but like 30? Is it done using multithreading? or what I dont know.   
  it is done really fast in between each frame render. sort of like this:mainLoop:  while user has not quit:    handle user input    update enemy positions    draw world (including enemies) to screenwhere your update enemy positions would be you iterating over a collection of enemies and updating their position one at a time.   ;Quote:Original post by neal8929I'm not quite sure how you go about making a bunch of different AI npcs move around to different places all at same time.One at a time, but you create the impression of moving at the same time by doing all the moves in between drawing operations.   