R0J0hound's Forum Posts

  • Another interesting idea would be to use

    http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm

    The idea is to use an array to store the direction to move for every spot to get to the target with the shortest distance. It's just as easy to have more than one target so it's good for many objects that need to find a path to the same set of targets.

    So after the array is calculated objects can move to the closest target by just referencing the direction of the square it's currently on.

    https://dl.dropboxusercontent.com/u/542 ... eSpot.capx

    In the example I made the objects accelerate toward the direction instead of just setting the direction. The result was nice rounded turning.

    It caused a stall if I calculated the array all at once, so I adjusted it to only calculate a bit at a time.

  • JavaScript's garbage collection (GC) is one cause of stuttering. It's gotten better over time because web browsers are implementing ways so the GC causes shorter stalls. Some are better at this than others.

    Another reason is stuff running in the background, the underlining os can be as much of a culprit as other programs. The nes had a lot less variance since only the current game was running.

  • How is 0-100 limiting? Just convert a 0-255 value to 0-100 with value/255*100.

  • There's an example here:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here are some topics with examples:

  • If you have a center location and a radius you can do this:

    Sprite set X to centerX + radius*cos(angle(centerX,centerY,mouse.x,mouse.y))

    Sprite set Y to centerY + radius*sin(angle(centerX,centerY,mouse.x,mouse.y))

  • If you have a center (centerX, centerY) and scale factor you could do it like this:

    x = (object.x - centerX)*scale + centerX

    y = (object.y - centery)*scale + centerY

    width = self.width*scale

    height= self.height*scale

  • Sure,

    It appears to swing because the sprite's origin point may not be in the exact center of the cog. You can adjust it in the image editor. Or it also may look like it's swinging because of the cog's shading.

  • Swinging?... Oh I see it. The sprite's hotspot may need a little adjusting.

  • For 1 you can zoom in to help or move objects to a locked layer.

    For 2 select all the objects you want, right click and select "Wrap Selection".

  • Here's one way here using detector sprites:

    For just a rectangle you can get away with having only 1 detector, I used 3 to handle crevices.

  • Sounds like this maybe?

  • Game develop actually was made a little after construct classic, before c2. The interface does look similar, but I don't think it's a ripoff. Mainly since it's author said he wasn't aware about construct when he first was making it.

    I've tried it a time or two, but it didn't really capture my interest. I didn't find the interface to be as intuitive as construct's, and it seemed that the event system requires you to be more verbose. It does have some interesting features though.

    You won't really get a lot of people saying they use it asking on this forum. Ask on their forum and you'll get a different response.

  • One more:

  • mercuryus

    Updated it with a small change and now it takes about a second less time. Now instead of loop{save->minimax->restore} it does save->loop{minimax->peek}->discard.

    With algorithmic code like this you can implement it in JavaScript and get a 10x speed increase.