tulamide's Forum Posts

  • If you mean just certain layers, then you can flip horizontal by using what Joannesalfa proposed, with 180? as the angle. A vertical flip would be difficult (I can't think of any C2 option right now that would allow that, besides "set flipped"/"set mirrored" specifically for sprites)

    If you are looking for a vertical flip, or if you meant a portion of the output (like just the left half of the screen) by "part of the screen", it would have to be done with an effect as of now. HLSL (used in my effect for CC) is pretty close to GLSL, so it shouldn't be a problem to use the "flip layout"-effect as a base for a C2 effect, for someone who already programmed a pixel shader in GLSL.

    I'm afraid I won't have the time to do it, as I am concentrating on other things in my life.

    EDIT: rotating the layer by 180? equals to both, vertical flip/horizontal mirroring at the same time.

  • Maybe the browser plugin helps? Since node-webkit is more or less a Chrome browser, the browser plugin's action "Close" might work? Wild guessing...

  • That's not easy to answer, because of the scale mode. I don't know the exact values, nor the exact algorithm. It would be best to ask Ashley for the exact way of calculation. But I would guess, that "inner scale" always makes sure that the scale chosen results in a size equal to or greater than the new window size.

    Example:

    The starting window size of the project is 640x360.

    We know the original aspect ratio from that size, which is (y to x)1.77~ or (x to y)0.5625

    The new window size is 1024x720.

    Calculating y from 1024 results in (1024 * 0.5625) 576

    Obviously 576 is a lot smaller than 720, which would show more of the scene. Inner scale prevents that, so let's try the other way round.

    Calculating x from 720 results in (720 * 1.77~) 1280

    Since 1280 is greater than 1024, it won't reveal more of the scene, but instead hide a good portion of it. This is what inner scale is for, so the resulting size will be

    1280x720, cropped to 1024x720

    Now to the scale. We have the original size of 640x360 and the new calculation of 1280x720. So the scene is scaled by the factor 2. (You can calculate that from either width or height, since the aspect ratio doesn't change)

    But again, this is to be taken with caution. It's just how I would do it. Ashley may have used another algorithm, since he is a professional programmer, which I am not.

  • I am very sorry that I contributed to your confusion. On default, every array added to a project is set to global. So just ignore that sentence and instead add the arrays to your project on the first layout, and they will be available throughout the whole game.

    Unless you want to load them per layout. Then you'd adding them on their respective layouts and set the global property to "no".

  • It doesn't lock in a frame, it does what you told it to do. As long as the value is between 1 and 119, the animation is set to startWalk with the order to play from the beginning. And this condition is true for many ticks. So on every of those ticks, the animation is set to frame 0. Also, can you assure, that the speed will be exactly 120 (and not 119.99999 or 120.0000001, etc.)? It might be better to use "else" instead. For the first issue, just add a "trigger once" condition to both parts.

    +p.direction = left
    ++Left arrow is down
    +++ direction speed > 0 and direction speed <120
        trigger once ->Set animation startWalk
    +++ else
        trigger once ->Set animation walkcycle
    
    etc.
    
  • There is no real disadvantage in using one array per biome. They use the same amount of RAM as one multi-dimensional array (apart from a little negligible overhead), they are accessed at the same speed, they are loaded when needed (when changing layout) so the loading process is a few ms faster and you might feel more comfortable with seperate arrays.

    Copying an array to a dictionary and clearing it for a new biome (and copying it back to the array when needed) will be the slowest and most expensive solution. I wouldn't recommend it.

  • Or, if you want to save on events, use min() in your calculation.

    player picked up health -> set health to min(health + whatevervalue, 100)

  • Does anyone know how to calculate the aspect ratio (formula) ?um...width / height

    16 pixel width, 9 pixel height -> aspect ratio = 16 / 9 = 1.77~ (or 1.77~:1)

    32 pixel width, 24 pixel height -> aspect ratio = 32 / 24 = 1.33~ (or 1.33~:1)

    Real life example:

    You want 5x5 blocks. Display size is 640x480.

    -> Aspect ratio 640 / 480 = 1.33~

    -> 480 / 5 = 96

    -> 96 * 1.33~ = 128

    -> block size = 128x96

    The shorter way is of course to just divide width and height by the number of blocks per row and column. EDIT: Ups, that's just what you do!

    EDIT2: Or do you mean, you want the integer aspect ratio, as are seen on descriptions for monitor resolutions etc. (e.g. 4:3, 16:9, ...)? In case you do, this is done by calculating the greatest common divisor of both, width and height. Try the demo capx, it uses a recursive function to calculate the gcd: integer aspect ratio

  • <img src="http://media.marine-geo.org/files/images/1999-Shank_Timothy-511.preview.jpg" border="0" />@sqiddster I should have guessed <img src="smileys/smiley36.gif" border="0" align="middle" />

    Here's an eighth of me. Or is it a tenth? I guess, the graphic artists among us could tell me from their intense guidelines drawing for characters <img src="smileys/smiley4.gif" border="0" align="middle" />

    <img src="https://dl.dropboxusercontent.com/u/11182740/pictures/privates/avatar.png" border="0" />

  • Blacksmith

    Thank you! Yes, I will focus on recovery (but can't totally ignore the beautiful black and white keys <img src="smileys/smiley36.gif" border="0" align="middle" /> )

    ryackov

    Did I frighten you? <img src="smileys/smiley4.gif" border="0" align="middle" /> That quote was especially and only meant for the three songs I left here for DatapawWolf 's listening pleasure (so that there's no suffering during the pause <img src="smileys/smiley2.gif" border="0" align="middle" /> )

    Those three songs already have special uses (I use them^^) so I can't make them cc 3.0 attribution. Sorry <img src="smileys/smiley9.gif" border="0" align="middle" />

    jomo

    Thank you! That comment means a lot to me. Also, I'm working on being healthy soon again. But I'm afraid I can't promise an all time happiness <img src="smileys/smiley2.gif" border="0" align="middle" />

  • also thank you for filling me in on the prtsc button.If you additionally press the alt-key, you can take a shot from the currently active window only, which further reduces the post-editing in a graphics application <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Try Construct 3

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

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

    It doesn't make a big difference. Method number one would most probably be, what a trigger would also do behind the scenes. So it's as reactive as it can be <img src="smileys/smiley1.gif" border="0" align="middle" />

  • In general:

    A loop is executed within one tick. Trying to use the wait action would force C2 to spread the loop over several ticks, which not only is difficult, but also error-prone and would break the intention of a loop. That's why the wait action doesn't work inside loops.

    You should always use a method suitable for the behavior you intended. If you want to create an object every 0.3 seconds, well, use "every x seconds"

    I can't tell anything to the other problem as I avoid installing the newest versions. They often introduce new issues or break older behavior, which isn't helpful for projects that last longer to develop. But from your question I'd guess it is a mathematical problem? Maybe the positions are calculated in a wrong way.

  • Hey all,

    I am shamelessly using this forum to make all german scirrans (or those who can read german) aware of my new blog. It does not contain anything else than my poetry in german language, but I think it's time to dare sharing it with the public.

    Wortheim

    Feel free to comment there.

    Thanks for reading!

  • Just a short notice that I'm back from hospital. It's still painful and will take some weeks to recover, a lot more than was promised to me. So the work on this series will be delayed for a while. But as soon as all those painkillers and tranquilizers are out of my body and I'm healthy again, the creativity will flow again. Promised!