Search the Community
Showing results for tags 'npc'.
-
My understanding of writing a game loop is that you have to loop through all the objects who need to react and update each loop. Looping though a collection of something usually implies an order of execution. When making a sports simulation game where all the players are NPCs, who gets to move first or last can have significant tactical advantages/disadvantages. In real life we move and act independently and in real time, but with a game loop the NPCs are at the mercy of the developer and the order they choose. So my question is, how do you decide which NPC gets to move/react first?
-
I've got npc's that can go offscreen when player moves left/right but as they go out of bounds collision stops working on ground and they end up colliding with the world bounds, what would be the best way to handle them? do i save their positions on outOfBounds? or disable gravity for them or somehow keep ground collisions working out of camera?
- 3 replies
-
- offscreen
- outOfBounds
-
(and 3 more)
Tagged with: