Tag Info

New answers tagged

0

To know if its worth it profile the collision loop and see if its faster after your changes. For sorting, a bubble or insertion sort will be faster than a quick sort if you reuse the same mostly-sorted array every frames. Quick sort is only faster if the list is completely random, for mostly-sorted lists you're better off with an improved bubble ...


2

You've inadvertently come across a form of broad-phase collision culling. Specifically, sort and sweep! Why not go all the way and use a QuadTree instead? Quadtrees recursively subdivide the space into quadrants, and only check collisions between entities which occupy the same quadrant. You can speed up your collision detections exponentially this way, with ...


1

Your canCollideWith method should be so that s1.canCollideWith(s2) == s2.canCollideWith(s1)I think. If not it means that collision will differ according to your array order. And if both return the same results you can test that only once. Then in your code, you give two differents definitions of your canCollideWith method canCollideWith(Sprite) and ...


2

The most effective way to improve collision check speed is to decrease the number of entities that needs to be checked against. Spatial partitioning such as octree helps but you can make further improvements. Suppose if currently you have one big list of collidables contains objects and bullets and in each collision check step you are looping through all ...


0

Seems like this is a issue with most game developers. Similar issue "I'be often heard that phonegap wasn't the best choice when wanting to make canvas game. It's more adapted to web app to native." It seems to be rendering issue capabilities for android phones. There are some engines that can not handle more sprites rendering. I know 10 objects are easy to ...


11

They're called profilers. Visual Studio has both CPU and GPU profilers built in to recent versions. A profiler will give you an idea of how much time your app is taking and where that time is being spent. This won't entirely avert the problems of over-specced hardware, though; the app might peg a lesser CPU but only use 60% of your developer machine. They ...



Top 50 recent answers are included