R0J0hound's Recent Forum Activity

  • The issue of the wall being a grid is purely a cosmetic one. In the attached capx cells are even positions in the array and walls are odd. After the maze is generated I loop over the cells and choose an animation frame for the sprite based on what walls are around the cell using this equation:

    right + 2*down + 4*left + 8*up

    You could also just as easily create thin walls around the cell depending on what walls are there.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Instead of setting the animation frame, you can set an instance variable of each card. Then you can make a boolean variable for each card and call it "face up". If the boolean is true you set the animation frame, and if it's false change the animation to a face down animation frame.

  • Well, 1/8th is 12.5% which is 13% when rounded. So one core is being maxed out. Pat finding uses web-workers so do a lot of pathfinding to Engadge the other cores.

  • Here's an example of a way to display the position of cars in a racing game:

  • wouldn't using "pick by evaluate" followed by a "for each" work? Or do you mean the issue of comparing two instances of the same type?

    For the latter, yes you could use an array. One idea would be to pick by evaluate, loop over the picked sprites and store any values you need. Then you loop over them again, checking with the values saved in the array.

    For instance you could do the following to do something for any sprite that has another 32 pixels to it's left.

    pick by evaluate

    --> set array size to (pickedCount, 3, 1)

    -- for each sprite

    ----> set array(loopindex, 0) to sprite.uid

    ----> set array(loopindex, 1) to sprite.x

    ----> set array(loopindex, 2) to sprite.y

    -- for each sprite

    ---- array: for each x

    ---- array at (array.curX, 1) = sprite.x-32

    ---- array at (array.curX, 2) = sprite.y

    ------> do something

    If instead all objects are positioned in a grid you can make it much simpler and faster.

    Start of layout

    --> array: set size to (20,15,1)

    -- for each sprite

    ----> set array(int(sprite.x/32), int(sprite.y/32)) to 1

    pick by evaluate

    for each sprite

    array at (int(sprite.x/32)-1, int(sprite.y/32) = 1

    --> do something

    You'd just need to update the array if an object is moved.

  • Leaufai

    One way to do the front shock is with a groove joint and a spring.

  • With the physics behavior the only way is to use a family. So if your objects are "sprite" you need to add that to a family then in events pick one object with "sprite" and the other with "family".

  • One idea is to use a canvas. 1st paste the character and then paste with "destination-out" anything in front of the player. Then loop over all the pixels of the canvas and see if any pixels aren't transparent. The main issue with that is it's very slow.

    If you can treat the player as a square it can be done much quicker.

    For instance to check if a player's bounding box is inside another box you can do this:

    box.bbleft<=sprite.bbleft

    box.bbright>=sprite.bbright

    box.bbtop<=sprite.bbtop

    box.bbbottom>=sprite.bbbottom

    It would become much more complicated if you wanted to know if multiple boxes covered the sprite completely. It would probably require splitting the bboxes up.

    Another idea would be to loop over the positions of the sprite and 1st check if the point overlaps the sprite then see of it's overlapping the object's above the sprite. It could be slow too but you also could do a more coarse check by not checking every point.

  • You do not have permission to view this post

  • I think you just need the common and sdk folders and everything in them. Visual studio is then needed to compile the templates in the sdk folder. Open the *.sln files with visual studio. I've used visual studio 2008 successfully, but I don't know if newer ones will work.

    Once the project is open there is a dropdown to select between:

    Release, runtime, debug release, and debug runtime.

    Release is the edittime portion of the plugin and runtime is the one added to cc games.

    I don't recall off hand where the built ctx files are put but you can find out where by poking around the settings. You can also set it to build directly in the plugins folder of construct. Just be sure to change the filename used.

    You probably will want to download the other folders as well to get the source for other plugins since most of the info you'll need about the sdk will be learned by example.

    Also in order to build any plugin that uses graphics or sound such as caudio2 you'll also need the directx sdk.

    In short it can be done, but if you've never used visual studio or c++ before it will be a rough start.

    What do you plan on doing? Python is probably much easier to work with.

  • Anything that can be done in js, can be done with the Sdk. It may be tricky to get it to hook in to the audio plugin if you want a seperate plugin. Another option is just to modify the audio plugin, but any bugs introduced won't be supported officially.

  • It would be the same as for instance a "start of layout" condition. Any way you set it up is fine. no extra calculations are done and c2 just triggers them top down.