Two questions

0 favourites
  • 4 posts
From the Asset Store
This is a Dungeon Master tool & the 1st of 12 Combat Engines from the Building Combat Engines for Browser Games workshop
  • 1. Is collision of objects based on brute force or is this a more complicated method(binary or qaud tree)

    2. When creating image objects and based on how graphics memory works. Should my images be based on 0 or 1 starting size count.

    Should I be using 7,15,31,63... or should I use 8,16,32,64.... for my steps of 2.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 1.

    Collision of objects is when an object is inside another object

    (hitbox within hitbox)

    2.

    I don't think that you will need to do this unless you know you need to remove a small amount of data or need to reduce lag

    (Steps of 2 is binary which is 1,2,4,8,16 and so on..)

  • 1. Objects are ignored if their bounding boxes are not overlapping which is an almost instant test, so collisions do not generally cause any framerate impact.

    2. You don't need to worry about this for Sprites. For Tiled Backgrounds it helps them tile seamlessly, and they need to be exact powers of two (e.g. 16, 32, 64...)

  • 1. Objects are ignored if their bounding boxes are not overlapping which is an almost instant test, so collisions do not generally cause any framerate impact.

    2. You don't need to worry about this for Sprites. For Tiled Backgrounds it helps them tile seamlessly, and they need to be exact powers of two (e.g. 16, 32, 64...)

    ok, so if I have 500 sprites and I'm colliding them on other 2 objects. There is no slowdown for collision checking. The reason I'm asking is because my game is about creating 1 more object on every touch. So the objective is just lots'f of objects. I've put a cap on it to not crash the system, but I'm wondering once it starts hitting 200+ it will slow down even if they aren't activly colliding, but just need to constantly check for collision.

    I'm refering to this article and the section

    "Technical limitations

    Due to the way graphics processors work, images are usually actually held in memory in a power-of-two size (e.g. 128x128, 256x256, 512x512, etc). For example a 150x150 image will have to be placed on a 256x256 surface, with the rest of the pixels transparent. Notice that means it uses a lot more memory: out of the whole 256x256 area, only about a third of the pixels are actually used for the image. The other two-thirds is simply wasted, but still sit there taking up memory! If you have a long animation with 150x150 frames, it can end up wasting several megabytes of memory - and just for one animation."

    but if there are no concerns about it. then i'm fine with it :) as at this time i've been setting all my sprite sizes to the power of 2, just not sure if I needed to set for a 0/1 as the base count size.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)