tulamide's Recent Forum Activity

  • It's a huge mess of nested if statements at the moment. It works... but I wonder if there is some sort of easier way to accomplish the same thing? It basically opens doors when switches are thrown in the correct order, or when clues are activated in the right order.

    Any ideas? Advice? or just click all the - signs again and hope for the best?

    That's what loops are for

    In order to use loops effectively you need to redesign your work. Naming conventions and assigning of values should be used in a way that makes it easier to loop them. For example the first switch:

    Rearrange the assigning of the values so that you constantly substract/add in a row if switchnum is 1-4 and constantly add/substract from 5-6. Name your animations in a "loopable" way (like AnimA, AnimB, ... to name a very easy and not very informative one). When the preparing is done you could do something like this:

    Reducing 16 events down to 5.

  • what events/actions would i have to do for a still layout with nothing moving to go to the next after 5 seconds? i tried

    at start of layout, subtract from private variable of titled background "countdown" 100 * TimeDelta, but that didnt seem to work. i didnt expect it to, as i dont even know really how to use timedelta.

    If you just want to go to another layout after a fixed time elapsed there are easier ways. One is the System expression Compare time. Set it to compare "equal to" and 5000 milliseconds (=5 sec) and all is fine

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • EDIT: Mediafire seems to be down. I can't reach the server. Please be patient I hope the server will be up soon...

    Edit 2: Maybe it's just my provider or a router on the way, I can sometimes reach it sometimes not. If you see the thumbnails, you can also download the effect...

    "Hey, there already exists Greyscale/GreyscalePlus, why do we need another grey shader?"

    It depends. Maybe you will never need GreyShade, but its advantage is its flexibility. Converting colors to shades of grey is a process based on luminance weights and the assumption that a certain weight is the right one. I know of at least three different luminance weight models.

    First, let's have a look at the original colors in this example. (All images are thumbnails, click to see a larger version)

    One is simply called 1/3 weight and is used by Greyscale/Greyscale Plus. It evenly weights the luminance of all three color channels (Red, Green, Blue).

    The formula is Y' = 0.333R' + 0.333G' + 0.333B'

    This is what it looks like.

    Another one is used by NTSC & PAL/SECAM & JPEG, and it weights the green channel almost double as high as the red channel and more than five times higher than the blue channel.

    The formula is Y' = 0.299R' + 0.587G' + 0.114B'

    This is what it looks like.

    The third one I know of is used by Photoshop and I can't reproduce it with an effect because it is a three-pass-model and effects in Construct need to be one-pass. The model takes into account the monitors gamma working space and weights green almost ten times higher than blue and more than three times higher than red. After a transformation into linear Gamma = 1, the formula is

    Y = 0.2126R'^2.2 + 0.7152G'^2.2 + 0.0724B'^2.2

    R' = G' = B' = Y^(1/2.2)

    With GreyShade you can even do more. You can weight one channel dominant setting the others to zero. You may overload every value getting over-saturated colors, hard falloffs etc. Look at these two examples.

    How to use it

    There are four values you can alter at any time.

    Red Luminance Weight (Weight the luminance of the red channel as float)

    Green Luminance Weight (Weight the luminance of the green channel as float)

    Blue Luminance Weight (Weight the luminance of the blue channel as float)

    Intensity (The amount that is merged to the original as a percentage)

    If you want to keep the original luminance, just make sure the three weights are positive values and sum up to 1 (one). But remember you may also use extreme values outside of this range, like -2.5 or 17. Also the intensity may be set to values like 178% or -342%

    Installation

    Download GreyShade.fx and put it in the effects folder of Construct. You may also want to download the demo cap, that allows you to play around with different values.

    GreyShade.fx

    greyshade.cap

  • No change, but as far as I can tell it seems to work. I mean the frames change as long as I don't go over 08/08. Also I don't know that would have changed anything anyways. It was set to call the function after timedelta, and that can be way sooner than 10 ms.

    Sorry tulamide, but it looks to me that function is working correctly, and the only conclusion I have is that something is messed up in the conversion.

    I think you don't see the real problem here. See my previous posts.

    1) Of course it was set to call after timedelta, because that made the function (better said: updating the sprites) work again. Directly calling it didn't work (and does still not on my computer). So you proofed that it sometimes works (on your computer for example) and sometimes not. And there is no feedback if the sprites are not updated. That leads to

    2) It's not the function itself that isn't working. It's just updating the sprite's frames that does not work. I wrote in a previous post that I can output the values of the function to text boxes. That works absolutely correct (incl. the values)

    3) The 10 ms are not of interest, because the function calls are independent from the music sytem. I can call updating the sprite's frames as often as I like, they should show the current value, whatever it is at that point of time.

    4) The sprite's frames are also updated above 8/8, you just don't see a difference. The reason is the system behind the presentation of the values. The time signature describes how many beats of what note value are in each measure. The first value tells the number of beats, the second the note value. 4/4 means four quarter notes, 6/8 six eighth notes, etc. The length of an eighths note equals the length of 2 sixteenth notes, the length of a quarter note equals the length of 2 eighth notes etc. So a beat with a note value of quarter may contain 4 sixteenth notes, whereas a beat with the note value sixteenth only contains 1 sixteenth. The position display shows (from left to right) Bar (or measure), Beat and Sixteenth. 1.1.1 means first bar, first beat, first sixteenth. 4.2.3 means fourth bar, second beat, third sixteenth. Now, when setting something like 10/16 for the time signature, the position display would go 1.1.1, 1.2.1, 1.3.1 ... 1.10.1, 2.1.1, 2.2.1 etc, because there only is one sixteenth position in the beat. That's why it stays at one. The error on the other hand does not sometimes not update the frame, but never. Never. The display then always shows "00" no matter what.

    We won't solve this I'm afraid, but I appreciate your help. It was very kind and helped me seeing that the error has a kind of random nature, it seems to be associated to the hardware the app is run on or a special subversion of DirectX.

    Thank you very much newt

  • I don't know if this has been posted before.

    A new funding source was founded lately by some independent developers, among them the creators of "World of Goo" and "Braid". It's called Indie Fund.

    No game submissions yet, the webpage informs: "A public process for applying for funding will soon be made available."

    Here is the link

  • Found this on MSDN, had a loughing fit and then started thinking about those who created 2D development kits on top of DirectX and what it means to us...

    Thank you Ashley, David, Rich and whoever I forgot!

    Sad but true: This is the source code for creating a so called "simple" Direct2D application...

  • I'll also try to upload my last version of 's' in plugin form in the near future as well

    I take your word on it

    Since my first

    {"t", "somesupercoolmegacomplicatedstructurewithsubstructuresleadingaroundtheworldandbackandstillbeaccessiblesoeasily"}

    I can't imagine Construct without 's'. Please try to make sure that it at least will run with future changes in Construct (and when you are doing so, why not quickly add inheritance?

  • I'm from the old days where digital audio recording was not possible with computers. I got a few synthezisers along with Atari 1040 ST, Notator and a 4-track-tape-recorder. The real recordings were done in a studio (per recording session we had a budget of 300. The studio took 100 per hour ). Later I heard of Steinberg and that they invented something they called virtual studio technology to enhance their Cubase. I turned to Mac (an insanely expensive 8600/250), Cubase VST 3.5 and the Waves bundle (professional audio processing effects like limiter, compressor, maximizer, reverb etc. No open source/freeware effects those days). Nowadays I use Reaper the most, which is an extremely flexible DAW.

  • Could you give some more directions on how to get the error? The only time it does not update the tens position is when I go over 08/08 in the time signature. That would be almost on track, if there is only one note per measure.

    You should have had the error already. To clear it: The position display is 1 based, as long as you never see "00" or "000" it means there is no problem. The error is not updating the frames at all, they stay at their default frames (which is frame 1, "0"). And that wouldn't surprise me, it proofs once more the randomness I'm talking about. Would you do me a favor and switch every delayed function call of the tempo display to normal calls and see if it works correctly?

  • Construct should prevent you giving objects names which are numbers, or starting with numbers, because it means you can't tell object names apart from numbers in expressions.

    oes this refer to objects only or function names, too?

  • I have made a simple example that should cover all your questions. Look closely at the cap (done with .84), it is important to see that the player sprite is marked as global, where the player movement control sheet is included (it may not be important in this very simple example, but in general you have to remember that the order of events are of prime importance) and how one global variable is used to distinguish from which direction the sprite came from.

    SPOL.cap

  • Perhaps its something to do with frames?

    Frames are 1 based so if you use 0 it wont work, now you have +1 on the end of your action, and int()to ensure a whole number, but I haven't found where your assigning the return value for the function yet, and I have no idea what mid()means.

    + Font: Value 'Digit' Equal to 1
    -> Font: Set animation frame to int(mid(Function.CurrentUITick, 2, 1)) + 1
    [/code:dbxoganm]
    

    Yes they are 1 based and I make sure not to call zero

    The trick is easy but effective. The musical tick is a value in different ranges, depending on the time signature the user selects. With 4/4 it's a value from 0 to 3, with 16/16 it's from 0 to 15.

    To represent this value I use two sprite instances, one for the ten's place and one for the unit place. To get these the number is converted to a zero-padded string, thus getting "01" instead of 1 or "16" instead of 16.

    CurrentUITick returns this string. the mid function looks at a string and creates a substring beginning at position with length number of letters. So mid(string, 2, 1) returns the substring with a length of 1 beginning at position 2. If CurrentUITick returns "08" then mid("08", 2, 1) returns "8".

    This is converted to a number (int) and the frame number representing the number 8 is 9, so +1 is added (if the returned value were "0" the frame number would be set to 1 etc.)

    EDIT: You don't need to create a variable to hold the return value of the function. You are allowed to call the function directly within an expression. Have a look at the wiki:

    http://sourceforge.net/apps/mediawiki/construct/index.php?title=Function_Object

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