Guizmus's Recent Forum Activity

  • Shadows... dynamic light... well, it's a hard subject.

    Canvas plugin did have a high performance influence last time I used it (for the exact same reason as you did). I don't know of any workaround that could help with this right now. I did some research and tries with the illuminated.js script, but didn't manage to make a plugin out of it.

    But, in your first post, you asked for static lights like a lamp. This particular case is quite simple and doesn't require canvas at all.

    Here is an example on how to do a simple static light.

    Edit : highlight on the method :

    • a layer "lights", black, not transparent, on top of the game.
    • add a multiply effect to this layer
    • add white sprites (or colored ones if you want red, green and other lights) in this layer

    The multiply will make everything black in your game, except what is lighten.

  • If you use peterbot1970 method, do all this in a separate layout where only this sprite is present, and don't include this sprite in the other layouts. Such a sprite would use a lot of VRAM, so it's best to keep it separated.

  • C2/cocoonJS projects are executed in javascript, client-side. SQL is server side. So no, you can't use SQL calls right from C2.

    But you can use the AJAX object to send and pull data from URLs. Doing so, you can send data to your server where, server-side, you will be able to use SQL and then send data back.

  • Nop, you just double click the enemy to access the animation editor. Then, on the left side of the animation, you can see various buttons. One of those let you define the "collision polygon", the box that will tell what is solid and what isn't in your object. This should be set for every frame (different polygon per frame). You can also use the function "guess polygon shape", that will roughly set the collisions on all your frames.

    This won't matter though if you remove the platform behavior.

    Why your enemy isn't spawning where you want him without the platform behavior is a mystery though for me right now. Maybe a look at your capx could help understand it.

    Edit after your edit 2 : nice to see it work ^^ still no idea why :p

  • From the top of my head, a bullet with 850 speed could very well have some problems on a low framerate. Why ? Because 850px/sec is a lot, and if the game just has 1 big tick when the ball is near a wall, it can very well go through, or in your case get stuck in the wall.

    There is no good solution to this problem (to my knowledge) but there are some fix you can add :

    • reduce the speed of the ball, if it's possible in your game
    • add a check every now and then to test if the ball is overlapping with the wall. If so, check what wall, the current exact position (is it bouncing or is it stuck ?) and move it just a little so it isn't in the wall anymore.

    I know this doesn't seem like what you want, and the problem may be different... Hard to tell without a capx

  • No matter where you spawn the enemy, the platform behavior is supposed to make things be on top of solids, not inside. So this will always be the case.

    What you should do :

    • if it's only 1 particular enemy type that is half in the floor : change this enemy collision box so its feet are not "solid".
    • if it's all your enemies, change the floor collision box so that the half top part isn't solid.
  • You have to ask on CocoonJS' website for this, with this form.

  • Like blackhornet said, we need to know how you make spr1 and spr2 move to answer you. If it a bullet behavior ? A platform behavior ?

    Basicaly you would want to set the X and Y vector of the movement depending on the sign of (spr2.X-spr1.X) and (spr2.Y-spr1.Y) but it could also be easier with the angle of motion.... all depends on the tools you are using.

    if you don't know how to explain this, try to share your file so we can take a look.

  • Button objects aren't classic objects as they are native html form elements. Therefore, they are handled by CSS. You can set an ID in the button properties, and then apply a CSS style to it through your website. I don't know other methods for doing this.

    Another solution would be not to use the default button object, but create a sprite and add everything that could make the user believe it is a button (some kind of hoover, a onclick, some visual effects, you could also use the spritefont, ...)

  • spongehammer

    Happy to help ^^ I didn't think I coumld still teach you something though, you seem to know C2 like the back of your hand

    As for patience, when the one needing help does efforts to try and understand what you explain, it's always easier !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Did you drop it from ... the roof ? (dutoit, du toit, from the roof in french...) Ok, I'll show myself out.

  • You can pick an object based on its variable quite simply. Just use conditions "MyObject : compare instance variable", multiple ones in the same event, to "filter" every of the MyObjects to just keep the one that validate every conditions (if none validate everything, the events won't be run).

    Or... If you come from "real coding", go for functions then

    You can do a function "checkCube", waiting for 2 parameters (X and Y).

    Functions in C2 work in different ways :

    • you can have as many parameters as you like
    • a function can use "pause" instruction, but will loose its context (and parameters)
    • a function can act (meaning it can use actions and influence the game like any other events)
    • a function can also be called "inline", in witch case it will be "evaluated" and the return value will be used where you called the function.
    • a function can set a return value.

    Here are some examples I made, and the manual

Guizmus's avatar

Guizmus

Member since 26 Mar, 2013

None one is following Guizmus yet!

Trophy Case

  • 11-Year Club
  • x4
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies