tulamide's Forum Posts

  • I made a shader to simulate metaballs using an alpha threshold. I still need to polish some things then I'll release it to the community.

    Here's an example of what can be done with it:

    Metaballs Shader Example

    This looks very familiar to me, especially the second example <img src="smileys/smiley2.gif" border="0" align="middle"> Now add outlining and you're done <img src="smileys/smiley17.gif" border="0" align="middle">

  • If it'S just about pasting some pixels I would do what newt said.

    However, the effect code you posted, can't work.

    1) due to some issue (but I never found out what's causing it), you can't return the background without involving the foreground in any way. It's almost as if the returned value is only considered valid if the foreground texture was altered.

    2) Colors have premultiplied alpha. That is, the value of the alpha channel is present in each color channel additionally. If you change an alpha value, you need to first calculate the old one out of the rgb channels.

    Example:

    bg.rgb /= bg.a;

    bg.a = fg.a;

    bg.rgb *= bg.a;

    3) Remember that you are always altering the foreground texture, no matter what value you return. It might be what you intended, but I just wanted to make it clear.

    I didn't test it, but maybe the following works? (Assuming it is applied to a 1-pixel-sprite)

    float4 EffectProcess( float2 Tex : TEXCOORD0 ) : COLOR0

    {

         float4 bg = tex2D(background, Tex);

         float4 fg = tex2D(foreground, Tex);

         float4 color;

         bg.rgb /= bg.a;

         color = float4(bg.r, bg.g, bg.b, fg.a);

         color.rgb *= color.a;

         

         return color;

    }

    EDIT: While I was thinking about it...You will never see if it works. You're pasting the background color to the foreground. So no matter what alpha value, it will always look like the background <img src="smileys/smiley2.gif" border="0" align="middle" />

  • This was already reported and it is considered fixed in the next build. Have a look at the closed bugs: http://www.scirra.com/forum/r102-cant-export-to-awesomium_topic56510.html

  • Wow! Just wow!

    I mean, I can't afford an artist, and so my post here is needless for you, but...

    Wow!

  • I used such a technique for an object to always face towards a correct angle for slopes and such. If you optimize it depending on the size of the platform objects (wider stepping etc.), it doesn't affect the cpu very much.

    Another way could be to always detect the platform object at player.x and set shadow.y to platform.top (very rudimentary, just to tell the basic approach)

  • I played around with as much plugins as possible, and most of them have issues - some severe and some just annoying. With the layout object I encountered severe ones. I wouldn't recommend using it. But that's just one opinion from just one of the many users around here.

    I never needed the layout object for my projects. Pause menus, as an example are just an additional layer, sometimes using the "inheritance layer" option (which has issues too, but just annoying ones)

    The problem with time... I used a simple but effective solution in a classic vertical shooter. The shooter is totally time-based, but doesn't use any behaviors. Moving something is just a matter of setting or adding the equivalent of "n * TimeDelta". With this it moves n times per second, if timescale = 1.0

    For a bullet-time-like effect to slow down the whole game except for the player's ship strafing and the cannon shooting, I just added a timescale division for those both.

    "(n / timescale) * TimeDelta" This will let something move (or rotate, or animate, or whatever) at the same amount for the real time.

    Let's say, something moves at 20 pixel per second, when timescale is 1.0. Now timescale is set to 0.1, and what you see is an object moving with 2 pixel per second. But you want to see it still moving 20 px/s. To do that you must move it at 200 px/s, because the time is only progressing at a tenth of the original time. Easy, just increase the amount relative to the loss of time.

    20 / timescale = 20 / 0.1 = 200

    Of course, with such a calculation timescale may never be set to zero, division by 0 will not work out^^ For my pause menu I just did set timescale to a very small value instead of 0, e.g. 0.00001, which appears as pausing, unless the player keeps the pause menu open for a few hours.

    I don't know if it helps you, but I thought I'd share it nevertheless <img src="smileys/smiley4.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
  • Thank you very much <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Whoa, it managed to crash my Firefox 16 when I ran the preview for the first time! The second time it didn't crash, though.Exactly the same happened to me, but with v15.0. Hopefully it is an issue on Mozilla's side.

  • It seems you are not aware of Yann's Bitwise Operations plugin?

    It covers binary numbers and bitwise operations.

    There's no hex plugin as far as I know, but you can create your own hex strings. Create an array with strings "0", "1", "2", ... "9", "A", "B", ..., "F"

    For the conversion, use division, modulo, etc. For example, the number 31 would be "1F" as hex string. You'd get that result by int-dividing and subtracting:

    firstdigit = int(number / 16) = 1

    seconddigit = number - firstdigit * 16 = 15

    Now just look at array(digits + 1) to compose your hex string:

    myHex = array(firstdigit + 1) & array(seconddigit + 1) = "1F"

    It's a very simple example, for 4-byte values it is a lot more dividing, subtracting, modulo, etc. And I'm not sure if it makes sense to convert them, but at least that's the principle.

  • Just use the system object's condition "Angle is clockwise/anticlockwise of" ConstructWIKI (scroll down)

    That's what it's for <img src="smileys/smiley2.gif" border="0" align="middle">

  • Hi scirrans,

    here is a set of two chiptunes. They were made with explicit restrictions:

    • only basic waveforms (sine, saw, square) and noise
    • no filters (that was a tough one^^)
    • only 4 note tracks
    • monophonic per track
    • loopable

    Both are available as clean and produced (effects, mastering) versions, 320kbit mp3. Transcoding on soundcloud produced horrible artefacts, that aren't present in the mp3s.

    If you want to use them, just give credit to me together with a link to soundcloud.com/tulamide

    Here is the link to the set: Chiptunes

  • Let me start by saying that I don't see a problem with the licence at all. It's a fraction of the income and it is a tool you used to get the success. It's only fair to pay for the work people put into those tools.

    But, this:

    First people cried because there was no .exe exporter.

    Now that one is provided, it's not good enough yet.

    Simple solution guys, don't use the exe exprorter, you won't have to pay the price asked for it.

    And indeed, the pro license is per application. It's awesomium's policy.

    As far as questions about awesomium licensing they should be asked on awesomium's website to prevent misinformation.

    As well as cries and "oh they should rather make it..." type of comments.@Kyatric, this is one of the most arrogant and pointless reactions. People are concerned about a licence for a technology, that Scirra integrated into C2. They don't have a choice. So it's more than correct to bring these thoughts here on the forums and not on Awesomium's.

    If Ashley would have the same thinking as expressed in your first two sentences, Construct would never develop to the best. If noone may say anything about the negative points of a functionality included in Construct, how can it ever be improved?

    I'm glad that you are not an employee of Scirra, because if you were, answers like this one would alienate customers.

    <img src="smileys/smiley7.gif" border="0" align="middle" />

  • Always take care of the order. In your example, no EnemyBox was picked when trying to pick an enemy. So CC looks at the value of the first instance of EnemyBox. Only after that the correct EnemyBox is picked.

    Instead of the "pick by" condition, you can use the "compare private variable" condition. It was designed for such a task.

    + EnemyBox: overlaps player

    + Enemy: Value '#' equal to EnemyBox('#')

    -> Enemy: Set 'target' to 1

    In most cases this should work.

  • The parser has problems sometimes interpreting the correct order. Try setting the equations in brackets:

    (global('osversion') = 6.0) or (global('osversion') = 6.1)

  • I'd prefer to not use the 'or' condition. It may not behave as you'd expect. Better use the system's evaluation condition:

    + System: global('osversion') = 6.0 or global('osversion') = 6.1