Aphrodite's Forum Posts

  • Every tick set position to

    X : clamp( sprite.X, sprite.width / 2 , ViewportRight(0) - sprite.width/2)

    Y : clamp( sprite.y, sprite.height / 2 , ViewportBottom(0) - sprite.height/2)

    To be more accurate:

    If the sprite has his origin at the center:

    set position to

    X : clamp( Self.X, ViewportLeft(Self.LayerName)+Self.Width/2 , ViewportRight(Self.LayerName) - Self.Width/2)

    Y : clamp( Self.Y, ViewportTop(Self.LayerName)+Self.Height/2 , ViewportBottom(Self.LayerName) - Self.Height/2)

  • CocoonJS is simply incompatible with the multiplayer object (no WebRTC support I think), but does a project with an unused multiplayer object also crashes? or only when you are using it?

  • I was wondering what is the ideal number of collisions per tick?

    When i say ideal i mean the ideal check collisions per tick to run a game smooth.

    300 check collisions per tick, should i worry or not?

    So yeah, that is my question.

    It depends on different factors, In the debbuger you can see both type of collisions checks:

    -Collision checks: It is a quick bounding box collision test, if this test is true, then it does the polygons check to see if the collision is truly happening.

    -Poly checks: a costly collision check, based on the collision polygon, this one should be as low as possible IMO.

    I think that the best is to not have useless collision checks, for exemple, is it useful to check every tick the collision between a giant slow canon bullet and a slow moving target (I mean in a case that they'll overlap during 10 tick in any case)? I think in some cases, you could try to filter those cases where the collision doesn't have to happen each tick (maybe by disabling collisions), but only if needed, also the collision cells can really help so filtering instances isn't always the best.

    As for the quantities of collision checks, I guess it depends of the targeted platform, just try to not check useless things if that helps

  • Up

    I can think of two potential solutions:

    -Do not use anchor, but instead place the sprite using the ViewportTop; ViewportBottom; ViewportLeft; ViewportRight expressions or

    -Replace the sprite accordingly, for exemple if you grow it of 10px width, move it 5px to the left, and same goes for height and going up.

  • Hola guys,

    when you want to adjust your sprite with the Collision Polygon, construct gives it automatically a few points where you can manipulate the line. Is there a way to add more points to this line?

    you can either :

    -Double click one of the points

    -Right click one of the point and add one

    I think it adds it clock-wise, but not sure (Also keep in mind that the platform behaviour works best with a rectangle hitbox, so you might want to think about having a separate object having the platform behaviour if needed)

  • Hi guys,

    I need your help to create a "mirror effect".

    I would like to do a platformer with the screen cut in 2 parts. The top part with the player and the bottom part with its twin that do exactly the same things but in reverse.

    Any clues or solutions would be appreciated.

    Thanks a lot!

    Cheers

    Just a though, I cannot test it now:

    One solution would be to have the gravity reversed on the bottom sprite (I think that could work), so both of them move the same way, but in reversed.

    If it is only graphical (aka: the bottom part isn't use differently compared to the upper one), you could just set the red sprite position accordingly.

  • It should work (but will consistantly work like this)

    Do your function is included inside the event sheet?

  • I also recommand that first you learn to use the engine, since mobile is still tricky to get working while learning how to use C2 at the same time

  • "Compatibility

    The following features are not supported in CocoonJS. If any of them are used, Construct 2 will print a message to the debug log saying that they are not supported.

    • The form control plugins Textbox and Button are not supported.
    • The XML object is not supported.
    • The Facebook object is not supported.

    - The letterbox fullscreen modes are not supported. If they are selected, it will fall back to 'Scale outer' mode instead.

    - The Text plugin's 'Set web font' action is not supported.

    • The WebStorage plugin's session storage is not available. Use local storage or global variables instead."

    Either use crosswalks or design you game to adapt itself to multiple aspect ratios

  • I might add to this that yes, C2 has some problems on mobile (it is more mobile that have problems with HTML5 but whatever):

    (Before everything, I do HTML5, I bought C2 for that and not for pseudo-native applications or something else..)

    -the fact is that if you plain on doing Web HTML5 you'll still struggle with that anyway, and would have to do even more work, but yes, it can improve, I agree on that point (even though it shouldn't have to improve on old devices that haven't what it takes to even read HTML5 I think, but just my opinion).

    On the other hand, you have mobile via wrapper, yes:

    -CocoonJS is something I never liked, I just ignore it, not a thing I'll ever use in my life, I'd rather not making .apk nor iOS apps than using it.

    -Crosswalks is chrome for android, and since I am doing HTML5, it is perfect for my needs, my tests (without audio I must say) were great, maybe it is because I always program in a safe way, so i can optimise easily, I bet that crosswalks is already better than CocoonJS for some games, and it'l improve even more, not worried.

    As for the marketing of C2, I agree that it could be clearer, but if you plain on buying it, the free edition is already a good bet to learn to use it, you can export to HTML5 that you can test on a mobile browser so you have a first look, and for cocoonJS, I'm not sure if you can package C2 HTML5 exports with it to test (I mean license wise, pretty sure you can upload HTML5 files to cocoonJS for testing in theory), I think we need an awnser to that question, so peope can test it first.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • "These other frameworks are flexible enough to allow you to use your own formats, and allow you to build your own tools - what is called a "pipeline". Do you think WOW programmers did everything in code? No! They obviously built their own map editors, dialogue editors, and everything else they needed to make a game.

    My point is that C2 is very impenetrable if you want to build your own tools to help you make your game - right now the only option is to crack open the XML files it generates and hope you didn't have a syntax error somewhere. I want ashley to make an IDE SDK so that I can make my own integrated editors to use inside C2."

    When I do a "big" thing in C2, I create my own formats and tools inside C2 (HTML5 based tools), based on string elements, and I use a decoder Event sheet that take the file, interpret it so the game can use it, maybe I am missing the point here..

    "The problem with C2 is that, often, when you run into a problem, you have to wait for Ashley to fix it. There are no official ways to fix things yourself. It's too focused on beginners, and advanced users (those who know javascript, even if just a little) are left wanting."

    The problem with letting the user correct themselves is that at the end, I'm pretty sure the bugs wouldn't be reported (I know people that won't report a bug even when they know it perfectly, they prefer to wait, imagine if you give them ways to workaround.....)

    Fimbul

  • I am not in front of C2, but maybe the expressions:

    Self.x +(100-LayerParallaxX(Self.LayerName))*WindowWidth/100

    Self.y +(100-LayerParallaxY(Self.LayerName))*WindiwHeight/100

    Would return the actual x and y position relative to the layout

    Edit:replace self by your object name

  • But again, how is that possible without making the game suffer? It's like playing a first-person shooter with just a keyboard. It's technically doable, but not exactly recommended. So why should we require all C2-games to be playable with just a keyboard? And for that matter, what if we don't target PCs at all? Android is supported, and it's easy (and cheap) to get a working gamepad for an Android-tablet. I have one for my iPad, and it (should) work on Android, too. And lat I checked, tablets don't have keyboards at all.

    We were implying that you were more into supporting multiplatform I think, with the most possible things (since this is something that most devellopers try to think about), if you really want to support only gamepad, you could, just make sure that there isn't problems (I don't think every gamepad is reacting the same way), and that the player knows it.

    At the end, try ans test, so you know what to expect.

    Also for your FPS comparison, I know people that will enjoy FPs with a Keyboard+mouse, but will don't even bother try with controllers (and I know that they think like that too for other genres), it is also possible to have a keyboard on an android device too, so at the end, the question is more on "do you have time to implement it well?" more than "is it better for the game?"

  • bremen : What is exactly hapenning, and which wrapper are you using? (CocoonJs I don't really know a lot so if it is it, maybe other people could help more than myself)

  • JJList

    This reply is a bit late but as for the original clearing I couldn't get it any faster by not using sqrt.

    As for using the pixels from the canvas object here's an example:

    https://dl.dropboxusercontent.com/u/542 ... leMap.capx

    It is very slow, for me the whole bit takes about 5 seconds to transfer the canvas to the tilemap.

    So on a whim I also did a test with a snapshot and straight javascript using the browser object since I didn't want to make a plugin.

    https://dl.dropboxusercontent.com/u/542 ... lemap.capx

    For me it takes about 3 seconds. After looking at the times I think it can be made faster by bypassing the array and just converting the pixels to a format the tilemap can load. But that isn't a simple task as the format is pretty complicated.

    I was wondering, using a 16*16 tilemap (256 colored pixels), could we potentially have a way to load an 256 color image and choose one particular value that would count as transparent if we could read the different color identifiers of the image (like the top left pixel would be the transparent one) without too much trouble performance wise?

    Because I think this is a good concept, but I don't know how much time it would take to perform identification process.