Coin-coin le Canapin's Forum Posts

  • A shame that a modern GPU won't be able to brighten 100 two dimensional sprites while it runs smoothly games with 3D graphics.

  • Hi.

    I have about 100 moving sprites on my project. I had some performance problems that bothered me and I figured out it was the brightess effect I added on them that was slowing down my game.

    While trying to fix that I learned that a brightness effect with the default value of 100, which make no visual change, uses a lot of CPU too, which is kind of surprising but whatever.

    So I was wondering how I can know how much CPU intensive are the different effects ? And is it possible to achieve an effect similar to brightness, but with better performances ?

  • It works perfectly, thank you !

  • Hi !

    One of my current projects. I'm trying to do some stuff.

    http://canapin.com/construct/tolilo/04/

    update : http://canapin.com/construct/tolilo/07/

    arrow keys, click to shoot

    The map in the editor is only made with squares. I made an event to automatically replace the edge squares by slopes when the map is loaded (I mention it, maybe it could interest someone).

    Without / with slopes (click the picture to view both) :

    [attachment=0:vfo9ji59]smoothedges.png[/attachment:vfo9ji59]

    I also tried to make a somewhat neat regenerating effect. Looks like an inverted particle effect but that's made with bullets and fade.

  • Hi !

    Simple question : I have two points : A and B.

    My bullet has a speed of 0 at start and an acceleration of let say, 300.

    It starts at A and I want to know when it will reach B.

    Any idea how to calculate this ?

  • Thank you for your reply

    Actually my character will be overlapped by some little squares and it takes about 10 squares to cover it entirely.

    I like your canvas suggestion. My character (and its squares) won't be that big so it could fit. I could also iterate every 10 pixels, I think it would work too because of the square shapes.

  • Hi !

    There is one thing that bothers me in Construct 2 since a looong time.

    When you click on export to -> [anything] -> Export files to :

    [attachment=0:2pdzewq2][/attachment:2pdzewq2]

    First of all, the output directory is always reset to a default one one a new Construct 2 start like Users/Canapin/Desktop/New Project. I always save my exports in another custom directory and it would be very, very great if Construct 2 remembered the export directory for a given project.

    It is especially annoying as the used file browser is that [insert a rude term] windows browser which doesn't have an address bar, which makes it terrible to go to our regular output directory.

    Wouldn't be possible to replace it with this better and more suitable file browsing windows ?

    [attachment=1:2pdzewq2][/attachment:2pdzewq2]

  • Hi.

    I would like to know when my character isn't visible anymore when it is hidden behind a tree or a wall (sometimes more than one if the player is bigger than a single wall). When we actually can't see any pixel of it.

    Any idea how to do that ?

  • I'm encountering the same issue.

    On a horizontal sprite which has a 45° angle (purple), the player can walk up.

    On a slope which was drawn that way (blue), the player can't.

    What is the best way to make the player properly walk up on the blue ones ?

    edit : okay my bad, the collision box were messed up on the blue ones. I had to remove some points and now it works perfectly. Also, it was not the same issue as roracle.

  • Well it is done and it was incredibly easy. Why do I focus on complicated things… :l

    The events I used in my loop :

    [attachment=1:3cgw10rt][/attachment:3cgw10rt]

    And the before/after (click on the picture) :

    [attachment=0:3cgw10rt][/attachment:3cgw10rt]

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    Let me explain what I exactly want to achieve

    I have a map :

    [attachment=0:moiwyv22][/attachment:moiwyv22]

    Each square is a sprite. Well in the editor it's from a tilemap object because it's easier to draw large area with this.

    When the layout is created, all the tiles are replaced by a block sprite. But that doesn't matter for my issue I guess.

    So i have a level with a lot of squares and I would like to automatically have slopes on edges, like this :

    [attachment=1:moiwyv22][/attachment:moiwyv22]

    And the blocks need to be sprites because I need to do some actions on them (change opacity and stuff) for other events.

    I don't really care if it takes a few seconds to iterate over all my blocks to set up the slopes on edges because it will be done only once when the layout is created.

    However, it will be done in smaller areas some time when a game occurs, because the blocks are destructibles. New edges will be created by the players so I'll need to change some blocks to slopes, but this is another issue at this time.

    I'm currently trying using an array to do the work but I'm not done finishing yet so I don't know if it will be faster than the previous method.

    I don't know if I explain well my issue

    Edit : How dumb I am. I just have to do this while I'm on my big loop at the start of layout, I can check the tiles positions for each loop index.

  • I'm note 100% to understand all your explanations as I'm not fluent in english.

    I did this following your suggestion :

    [attachment=0:2mkhqyie][/attachment:2mkhqyie]

    It tests only if there are other squares on the left, top left and top position.

    And it takes way too much time : a few seconds for only 100 squares, and I have about 2000 squares in my layout.

    How to improve it ?

    Maybe could I put all my blocks in an array before instead of testing the actual squares ?

  • Hi.

    I have a lot of blocks and their position follow a 32*32 grid.

    For each block I would like to know if there are other blocks around it : top, top right, right, bottom right, bottom, bottom left and so on.

    So I can modify the current block and set the right graphic on it.

    For example, if a block has no other block to its top, top right and right, it has a slope (it will be a sprite special frame, nothing more) from top left to bottom right.

    The same way, if it doesn't have any blocks to its right, bottom right and under it, it will has a slope frop top right to bottom left :

    [attachment=0:1t1wnbjq][/attachment:1t1wnbjq]

    I don't know how to test each block position regarding other ones. Any (efficient) idea ?

  • That's what I did. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    http://canapin.com/construct/scarletland/08/

  • If you have to use a wait action to make it work, then your events are not set the way they should.

    Construct read events once/tick and from top to bottom.

    Basically, it executes your two conditions "on space released" at the same tick and this is why it doesn't work. Your two "on space released" conditions are both verified and executed.

    So I suggest you to consider making something like this :

    [attachment=0:2f3fe7ub][/attachment:2f3fe7ub]