New answers tagged

3

If I am not mistaken these types of problems are usually solved by backtracking family of algorithms. I would use an algorithm similar to DFS: recursively search the solutions tree and whenever leaf node is reached, save the path if it was the longest discovered. After reaching leaf node, backtrack to last "crossroads" and take the other turn(s). In order to ...


0

For anyone looking at this by googling "cocos2d isometric transformation rotate skew" or something like that like I was: I figured out the right skews and rotations. A two-layer approach was needed due to the lack of a diagonal scale or Z rotation. For javascript devs: this makes an isometrically transformed DrawNode. I'm not sure what performance impact ...


2

I won't be able to make an image for you, but one trick you could do to figure out if a piece of wall should light up is to take advantage of the 'alpha' channel for determining the direction the pixel is facing, as opposed to the opacity of the pixel. You could then determine whether the pixel should be lit between the light source and the facing of the ...


12

Going to try and doodle up what I mean here as soon as I finish typing this, but: What about merging the two? Use the second (occlude by base) for everything that isn't a wall and the first (occlude by tops) for lighting the walls? You actually did this by accident in your second example, with the wall that goes off the bottom of the image. Extending ...


1

Yes, it does. But in case you want to be sure, you can check it yourself using Frustrum to compare performances. (If using Frustrum increases performance, then it Scene2D does not check if an actor is on screen or not, renders everything, but this won´t happen). Frustum



Top 50 recent answers are included