tulamide's Recent Forum Activity

  • Thank you, that's really encouraging! If someone has a special wish for a font, tell me and I'll try. Thanks again <img src="smileys/smiley1.gif" border="0" align="middle" />

  • No comments, but over 2200 views, so I guess you want more. <img src="smileys/smiley2.gif" border="0" align="middle" /> I take newt's suggestion, so here's

    Tips'n'Tricks #3: Conditionals

    Construct Classic offers a shortcut for simple 2-state conditions. Let's say we have a game with a mean boss that talks to us. Whenever the player is near the left border, the boss should say: "I can see you!" but else the boss will say: "Where are you?"

    With normal events, it would look like so:

    + Sprite: X Less than 200

    -> Text: Set text to "I can see you!"

    + System: Else

    -> Text: Set text to "Where are you?"

    Already only two events. But you can express it in just one event, using conditionals. The way to use them is easy. Wherever you can enter an expression, you can use the syntax "condition ? a : b"

    The condition will be either true or false. If true, a will be executed, if false, b will be executed. Easy. And this is how it looks like in an event:

    + System: Always (every tick)

    -> Text: Set text to (Sprite.X < 200) ? "I can see you!" : "Where are you?"

    Now you might think it is too restrictive, because it only knows two states? For example, you might want the boss to say "I can see you!" whenever the player is near the left or the right border. You shouldn't use "or" to evaluate events, but you can do it this way:

    + Sprite: X Less than 200

    -> Text: Set text to "I can see you!"

    + System: Else

    + Sprite: X Greater than 440

    -> Text: Set text to "I can see you!"

    + System: Else

    -> Text: Set text to "Where are you?"

    You can't use conditionals for something like that, can you? You can! The best about conditionals is that you can call a function.

    We set up this function:

    + Function: On function "nearBorder"

    -> Function: Set return value to 0

    ++ Sprite: X Less than 200

    --> Function: Set return value to 1

    ++ Sprite: X Greater than 440

    --> Function: Set return value to 1

    Then we call:

    + System: Always (every tick)

    -> Text: Set text to (Function.nearBorder = 1) ? "I can see you!" : "Where are you?"

    Of course, you can create much more detailed functions. As long as they return one of two values, you can realize pretty much anything. And using conditionals can simplify your event sheets and make them more clear and well arranged.

  • Noone? <img src="smileys/smiley19.gif" border="0" align="middle" />

  • But I don't know if CC developpers already know the problem and intend to correct it.It is unlikely that it will be solved any time soon, if ever.

    However, you can avoid the hairlines using one of two workarounds:

    1) Make sure there's a 1 pixel transparent border on all 4 sides of the images. (This is an option for TiledBackground4 only in your example)

    2) Change sampling in the runtime properties from "linear" to "point". (This is an option for all the TBs, but will have influence on the visual presentation of stretched graphics)

    EDIT: Technically, what you see by those hairlines are fragments of the other side of the images, and you see them because of the linear sampling (which works sub-pixel) and because the images wrap around (that's the purpose of a TB)

  • I'm not sure, if there's need for bitmap fonts (aka pixelfonts) anymore. But here are three totally different fonts I created with Bitfontmaker2:

    1. Fewture (a thin, wide, clear font)
    2. Nerhoe (a small, condensed, vertical font)
    3. O'skool (a sligthly slanted, round font, reminding on the 80's)
    4. <font color="blue">Update (21 Oct 2012):</font>
    5. Halftone (a simple workhorse, made with a typical halftone pattern. For those 50% transparencies without alpha channel)
    6. Tiny Tim (probably the smallest aliased pixelfont available, that supports lower case letters while still being easily readable)
    7. Toose Ornament (a romantic, half-serif font, with ornamented upper case letters)

    Use them however you see fit. <img src="smileys/smiley1.gif" border="0" align="middle">

    \\Comments welcome<img src="smileys/smiley2.gif" border="0" align="middle">//

  • The video on this page shows the browser and its possibilities in detail. Nothing about gaming. I doubt that they wouldn't show browser gaming if it were a part of the browser...

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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" />

tulamide's avatar

tulamide

Member since 11 Sep, 2009

Twitter
tulamide has 3 followers

Trophy Case

  • 15-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

17/44
How to earn trophies