![]() To do this, we developed a chunking system that allows for us to load in only a section of the world. As our game world is so big (and getting bigger!), we have to do some funky stuff behind the scenes, not having everything loaded at once. If the world were to stay loaded in forever, this wouldn't be such a big deal, as after a period of lag at first, the game would run much better afterwards. Once they all settled down and were marked as asleep, the cost of physics dropped over 90%.įor the sake of a viable GIF, I actually cut down the number of Spriggull Legs here, believe it or not! To do a quick test, I spawned in a pile of Spriggull Legs. Until it is moved or given velocity in code, or hit by another object, it will stay sleeping. Now that it's asleep, PhysX can skip over it completely when doing all it's calculations. If an awake object comes to a stop, PhysX will quite quickly realize it no longer is moving, and mark it as asleep. To PhysX, every object is either awake, or asleep. The big one that I'll bring up today is 'sleeping'. PhysX can handle thousands of objects incredibly well, and they have lots of tricks up their sleeve to help with that. We could create a model, put it in the game, and give it some velocity, and watch it move around. These involve insanely complex calculations that, using PhysX, we can for the most part, take completely for granted. The physics engine, PHYSX, handles objects moving, falling, colliding, bouncing, rolling, etc. Physics in a game is quite an intuitive term. One of the big issues we've been dealing with in A Township Tale, is having such a large world, full of physical objects. I will do more of these posts in the future if many of you enjoy it. ![]() This week we'll be releasing an update (0.0.5.0) where we've really started to address some issues around low FPS and lag problems, so I thought I might write a bit more of a technical blog post than usual to talk about one of the problems that we face.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |