Jump to content

  • Log In with Google      Sign In   
  • Create Account


Counciler

Member Since 19 Apr 2013
Offline Last Active Private

Topics I've Started

Advanced collision detection - lots of objects

20 April 2013 - 09:56 AM

Okay, so right now, I have a character, and he just simply checks against everything that is on the screen. It works fine, but I'm reading a book on collision detection and it talks about a way to handle many more objects on the screen. It suggests creating sectors and only checking against objects that are in the same sectors. The book then proceeds to give a working example of collision detection, but doesn't seem to follow it's own method of creating the sectors. So my problem is with creating these sectors. The book says that doing this method can decrease the checks by half or more, depending on how many objects are being checked against however many objects. It gives numbers as an example of how many checks you can save. But what confuses me is the book counts putting an object into a sector as only one check. The only way I can think of to create these sectors is to create an array of rects to keep track of where each sector is, then checking each index of the array until it finds the appropriate sector that each object is in. But assuming there's 24 sectors, and 12 objects on the screen, that would mean 12 objects will check up to 24 times each, and therefore it would be more efficient to just check against the 12 objects directly. So how does a person put an object into a sector with only one check?

Graphic design for dynamic weapon/armor on sprite

19 April 2013 - 07:03 AM

So I made a little test game with some pretty simple graphics and animations, it's a 2D platformer. But I wanted to extend it a little further. On my sprite I wanted to display different armors and weapons that are picked up on the character the player is controlling. The problem with this is the attack/jump/etc. animations. The way I understand it is I create a series of frames, then play through those frames, then I get the desired attacking/whatever animation. The problem with this, is that creating different animations for each armor/weapon combination is completely unreasonable. So my question is, is this frame-by-frame animation the way it's normally done? In something like MapleStory, they have a large selection of clothing and weapons to choose from, and the characters are far from stiff. Do they simply have different frames for weapons and animate each clothing line then do some tricky stuff with layers? Or are they doing something more advanced?

PARTNERS