Faster way to do this?

This forum is currently in read-only mode.
  • Hello again! I am trying to make a mechanic where people would be able to phase into walls and have to platform inside them to move around, and deactivate to go back into the normal map. I got this to work, but the CPU spikes when toggled. I have it set up like this:

    You press CTRL, a canvas covering the map if filled with white, the block objects spawn eraser objects onto a canvas and are pasted into said canvas. The canvas then updates a mask and all blocks are made nonsolid. When going out the canvas clears to transparent and blocks are set to bounding box collision, pushing the player out.

    I can see where this would cause problems, but how else could I go about doing this, in a more efficient manner?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yo, it would be ALOT clearer what you were doing and trying to accomplish with a .Cap sounds really interesting, but I can't wrap my noggin' around it.

  • I wouldn't use the default platform push out, it uses the closest angle, and shoots you out instantly.

    Instead I would suggest keeping the platform behavior disabled, and have a an overlapping condition, like: if player overlaps wall player set y to .y-1.

    Course the trigger for after that can be a pain.


    There is what I have ATM. it has a few test levels and whatnot that can be played. There is also an editor you can mess around with! (Unfinished)

    This should explain what I mean.

  • If you put the whole level grid into an array you can set it up to just create invisible collision tiles around the player, and when you switch the collision tiles can be created in the empty space.

  • That's brilliant! Thank you so much! :D

    Now to finish the editor and main menu and I am ready to release a concept demo :)

    EDIT: Yep! Got it to work! I got it to work with the arrays I were using, where 0 is space and 1 is a block. I had to add +32 to the end of the placement for creating because of some weird error.

    Thanks again!! <img src="smileys/smiley32.gif" border="0" align="middle" />

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