Image Manipulation

This forum is currently in read-only mode.
  • The idea I want to play with right now is allowing the player to grab pieces of the scenery and move them around.

    I know I could make the levels out of tiles and allow the player to grab those tiles, but I'm really going for a feeling of pulling a piece out of the screen. These pieces could include multiple objects, blank space, and even the background which scrolls at a different rate.

    I'm thinking the game takes a small screenshot of a square in front of the player, and if at all possible, makes a kind of transparent hole in that spot.

    Can it be done? At least the small image capture part?

    And this might be way out there, but if there's any possible way to rearrange parts of the screen while keeping them animated, that would be amazing. Like if an enemy walked through the hole in the screen that was cut out, it would briefly show up in the block taken out of the scenery. Like looking through a window on one side of the screen that corresponds to another part of the screen.

  • You could do a few things with canvas, and the image manipulator object... the image grabbing part, yeah thats doable, as to those parts being animated, I think that would be a bit much.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh wow, I hadn't experimented at all with the canvas object, I really didn't give it much thought. This seems to do exactly what I want as far as image grabbing goes. And it seems like it could do the animated thing too, if I just keep pasting something from a specific spot onto the canvas.

    So I guess the only question I have left is about any way I could make holes in objects. It would have to be a method that lets the player move through the spots that were taken away. All my experiments with changing the solidity of objects while the game is running have run into brick walls so far.

  • So I guess the only question I have left is about any way I could make holes in objects. It would have to be a method that lets the player move through the spots that were taken away. All my experiments with changing the solidity of objects while the game is running have run into brick walls so far.

    -> Canvas: Update collision mask

  • This is kinda hurting my head.

    I've been playing around with these canvases and the updating of the collision masks, but I can only get it to add solid parts to a canvas. Like if you copy a wall object into the canvas, it takes all of the wall in the area no matter what's in front. So I thought I could add a non-solid object to what the canvas copies from, but as long as there's some picture there, it makes it all solid. And if you copy transparency, you're copying nothing. So how do you add negative space to a canvas? Or to a sprite for that matter.

    The other problem I'm having is copying the image all at once. For instance I'll have it set so that when the mouse is clicked, copy from object to canvas, copy from canvas to image manipulator, and then copy from image manipulator to sprite. The first click will copy the image to the canvas, and then the second click will update the canvas to the current image, and the previous image will go to the sprite. How do I go about updating it instantly?

  • for punching holes in canvas, paste an object with the erase effect on it.

    and, of course, then update the collision mask of canvas

  • Perfect. The only problem I'm still having is copying the canvas to a sprite, but I'm sure I can figure that out. Edit: Yep, got it.

    Wow, you guys knocked out my questions so quickly and effectively, thanks so much.

    This program and this community make it so easy to do such complex things.

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