tulamide's Forum Posts

  • Is there a way to make the text object's "write text" action over-ride the game's timeScale?No, there isn't. Everything related to time is paused, when timescale is zero. Timer, Every x milliseconds, behaviors, etc. But the tick counter still works, of course. You can just do your own little "write text" routine, that is tick based. And it isn't very difficult. Here is an example (using globals, but you can do it with private variables just the same):

    write_text_tick_based.cap

  • From time to time I'm just blown away by all the efforts out there creating such detailed simulations not for some scientific application, but for games!

    CryEngine will use Beam's soft body physics, and although I doubt the claimed 100 fps in a finished game, it will add so much to realism even if a game with that would only run at 30 fps. The degree of detail simply is amazing for a realtime environment.

    http://beamng.com/

  • Maybe I misunderstand it, but let me say two things about it:

    1) This is a pixel shader. All a pixel shader does is altering pixels when the graphic card is rendering. It does not change behaviors, coordinates and the like.

    2) flip horizontal and flip vertical do exactly what the functions in the picture editor do. When you imagine pixels as numbers then the effect (and the picture editor) do the following to the pixels:

    <font face="Courier New, Courier, mono">before: 01 02 03 04 05 06 07 08 09

    after:   09 08 07 06 05 04 03 02 01</font>

    If you intended to rather flip all sprite in its local coordinates while keeping the global coordinates on the layout, then you're lost, I'm afraid. This can't be done with only one shader. You'd need to use the "flip horizontal" and "flip vertical" effects (that come with CC) on every object instead. (EDIT: Or flip in code with families, as Jayjay described)

    But if I'm wrong, and your intention was something else that this effect does not achieve, could you do a drawing of what you have in mind?

  • After reading this, I created an effect that could help, if there is headroom on the GPU side:

    http://www.scirra.com/forum/effect-flip-layout_topic52811.html

  • This effect flips a bunch of layers up to the entire layout.

    You need to use this effect as a layer effect and on a layer on its own!

    Without effect:

    <img src="http://dl.dropbox.com/u/11182740/construct/fliplayout1.png" border="0">

    With effect:

    <img src="http://dl.dropbox.com/u/11182740/construct/fliplayout2.png" border="0">

    Usage:

    1) Create a new layer (named "flipped" in this example)

    2) Apply the "Flip Layout"-effect to "flipped"

    Everything underneath that layer will then be drawn flipped on the "flipped"-layer (replacing everything that currently is on that layer, so always use a dedicated layer).

    The effect has 3 parameters:

    flip vertical

    flip horizontal

    activation

    Set any of those to 1.0 to switch them on. Any other value will switch them off.

    Note: Activation is there to make it more comfortable to edit your game. The effect will still add to GPU load, it just doesn't show the result. To save GPU load, deactivate the effect using the system actions.

    In edit time the effect will look offset, this is not an error. In runtime it will all be ok. Furthermore, the effect only works using a little trick: the colors have to be merged with a very small amount of the layer's color. It's only 0.001% though, so no human being will notice it. And last but not least the usual limitation for pixel shader effects: Windows elements like editboxes or buttons can't be altered, they'll stay at their positions (have a look at the pictures above)

    Download: Flip Layout.fx

  • Just the basics:

    Set your layout to "Unbounded scrolling" in layout properties. Then use something like

    + System: Always (every tick)

    -> System: Scroll to object Sprite

    -> System: Set display angle to Sprite.Angle

    Move and rotate the sprite (assumed it is the player sprite) according to the landscape.

  • Something like this:

    + If (Family) "Letters" Clicked:

    > RecordLetterVar.Add: Letters.ObjectName

    Imagine Letters contains objects like A, B, C etc. .

    It would be tedious to manually write an 'On Click' Event for every letter object separately.Yes, it would be tedious. Why not having a family pv and adding that to RecordLetterVar ?

    + MouseKeyboard: On Left Clicked on Blue

    -> System: Add Blue('name') to global variable 'letters'

    + System: Always (every tick)

    -> output: Set text to global('letters')

    'letters' here being a global text var and 'name' a family text var

  • ?? why you type so long ?

    ?? why you raise the dead ? 3 years old thread...

    Trying to collect some reputation points?

  • Change

    + System: For "" from -7 to 7

    -> Array: Set index (LoopIndex+(SplashCollision.X-Box.X)/4, 1) to 30

    to

    + System: Every 1000 milliseconds

    + System: For "" from -7 to 7

    -> Array: Set index (LoopIndex+(SplashCollision.X-Box.X)/4, 1) to 30

    Instead of 1000 use whatever period you prefer.

    ...And another tip: Instead of applying a seperate effect to every instance of the water sprite, try placing them on a seperate layer and apply the effects to that layer instead. You will have at least a 5 to 6 times higher framerate xD

  • An object is already accessed by its name. A Sprite named "bubble" will be accessed in expressions as bubble.someparameter

    What's the purpose? It could help making better proposals :)

  • You're calculating the position relative to the box's x. But the box's hotspot is centered. Just change the hotspot to topleft, left or bottomleft to let it work with your calculation, or substract box.Width/2 from the centered x, or use Box.Left

  • Thank you Davioware !

    I told you so - a fallacy. <img src="smileys/smiley29.gif" border="0" align="middle" />

    Of course, I was missing the timedelta'd positioning. Funniest thing about it: I explicitly pointed this out in my Verve!-example-project. <img src="smileys/smiley9.gif" border="0" align="middle" />

    But it is also an interesting point about error accumulation on higher frame rates. It makes sense. A music sampled at 4 kHz still is the same music but sounds more different from the original than sampled at 44 kHz. Smaller gaps == more accuracy.

  • Ok, I know there is a fallacy - but where?

    If I do something like

    + Always

    -> Add 2 * TimeDelta to 'velocity'

    I expect the value to grow by 2 every second (2 after one second, 4 after 2 seconds, etc.)

    If I add that on every tick to .X of a sprite it works, when running v-synced. But in unlimited mode, the object moves far more quicker. But TimeDelta takes into account the higher framerate. What do I miss here?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is there anyway to have this work with Construct 2?No, it is a DirectX based pixel shader.

  • 1. Is there a way to make an installer for your games in Construct Classic? When I check the installer box, the installer never creates and the .exe doesn't create when I check the installer box either.You can use any external package to create an installer, there are quite a few free versions out there. http://en.wikipedia.org/wiki/List_of_installation_software

    2. Is there a way to change the desktop icon of your .exe?Navigate to the Project Bar/Application/Icons/Default A double click on 'default' opens the picture editor.