tulamide's Forum Posts

  • Hurray :D

    If only it would be that simple all the time :)

  • With that reset I lost about 400 reputation points - and I was NOT awarded the pirate princess badge.

  • If the layout isn't restarting, the music should just keep on playing. If it is restarted it should start playing from the beginning.

    "on load" will only be triggered if the game state is loaded with the system action "save/load to disk" (which may of course be the case here)

    I would assume some events interrupting the music playing, but it is hard to tell without looking at the events.

  • Of course, you can.

    There are the conditions "On selection changed" and "On double clicked". I provide an example that also uses .SelectedLine, .LineText and .LineData

    listbox.cap

  • Omg. I should start to math all over again.

    "RGB(clamp(lerp(GetRed(particle('fadetoColor')), GetRed(particle('fadefromColor')), particle('currentcolortime') / particle('colorfadetime')), 0, 255), clamp(lerp(GetGreen(particle('fadetoColor')), GetGreen(particle('fadefromColor')), particle('currentcolortime') / particle('colorfadetime')), 0, 255), clamp(lerp(GetBlue(particle('fadetoColor')), GetBlue(particle('fadefromColor')), particle('currentcolortime') / particle('colorfadetime')), 0, 255))"

    What are you talking about. How did you calculate it :). lerp inside of clamp. Sin, cos, tan. I wish I had listened my math teacher on my collage years.

    Thank you for sharing.

    You're welcome :)

    But don't get too afraid just of long phrases. It really is simple, as soon as you follow the logic behind it.

    The values of the three color channels are linearily interpolated, so that all three change in the same amount of time. This is what lerp is for. The t-value of lerp ist calculated as a ratio of the total time given to interpolate and the actual time.

    Clamp just serves one purpose: timedelta is constantly substracted from currentcolortime, and so can get negative, which would make the t-value negative also, and the color would continue to change (but in an unwanted way). Something was needed to prevent that the color value will get negative and clamp is one way of doing so. You could also just use max(formula, 0).

    The fun of sin and cos is that they are so easy to use. Just give it an angle and it tells you a position, I love it ;)

    And when used to animate something it also has some kind of built-in deceleration/acceleration. I did go into detail somewhere else, so I won't repeat it, but if you could only learn and use two functions, I'd say go with sin and cos. What you can realize with only those is so versatile.

  • It is possible not only to move the particles slightly, but to do anything you want with them. You have full control over every single particle at every tick.

    The particles don't "slide" because their positions are recalculated on every tick. If you just stop that, they will "slide".

    Here is an example of a fire-like ring:

    customparticles2.cap

    EDIT

    Tip: Hold 'space' and slightly move the mouse to get a burn-in effect.

  • Ahhh! It's the clamp thing ><.

    I spawn the particles with "random" + sin/cos.

    Is there any other way to spawn the particles in a circle?

    Because..

    Without clamp, I don't know, how to tell the Sprites to keep away from the center^^

    And random picks numbers that are(sometimes) below the number "clamp" allows. That's why they get stuck at the same place and it doesn't look good. I find out what's wrong, but still wondering how to fix this.

    edit: Got an idea, I'm sure Tulamide knows how to make a selfmade "random"-function. I need one where I can make random(60,120) so I get only numbers from x to y. Can I do that with expressions and events?

    First of all: It was a little late last night. The method I provided for spawning at a rate does only work, if the spawn rate is at least 50% higher than the framerate. For v-synced 60 fps the spawn rate needs to be at least 90, etc. I'm sorry about that, but if you will never spawn below that threshold you can safely use such a method.

    Yesterday I also started working on sprite particles to help you on this. It is not finished, but all the basics work:

    customparticles.cap

    It shows in particular how to work with two radii to spawn the particles on a circular band.

    To get a ranged random, just add the offset and randomize the distance between the first and second value. To get a random number between and including 60 and 120: 60 + random(61)

    I will now dl your cap and have a look at it. But it may take a day.

    EDIT: I don't know why, but I get a 404 on your link. This happens quite often with dropbox, but only to me as it seems. :(

  • I nearly finished my "circle" <img src="smileys/smiley4.gif" border="0" align="middle" />

    Just one question now: How to change the "rate"

    I managed the circle by spawning a sprite(allways) with sin/cos and stuff.

    But there are too few particles on the screen.

    I tried: allways condition, on every milli second(even tried on 0.01 ms, but didn't worked ><) Also tried to duplicate just the "allways" event with all expressions in it.

    But then, he draws the sprites almost at the same place, looks weird :S.

    How can I tell him to spawn more sprites ad once?

    Timescale just make things faster, raise the "fade out time" isn't really nice to make "more" particles.

    That's good news!

    Make sure, you work with timedelta to have the "circle" behave the same no matter the framerate.

    Now to the question:

    You will never be able to spawn anything faster than at the duration of one tick. So something like "every 1 millisecond" doesn't make sense (e.g. running at 60fps the fastest timeslice is 16.67 ms).

    Set a rate as a variable, e.g. myrate = 300

    It means you want to spawn 300 sprites per second, so you need to know what fraction of a second a tick is.

    1/TimeDelta tells you the fps at that moment of time, e.g. myfps = 1/TimeDelta

    You now know that you need to spawn myrate/myfps times on every tick

    + for "" from 1 to round(myrate/myfps)

    -> Spawn your particle

  • Why not simply using sprites as particles for such shapes? You wouldn't need to develop your own particle object and still get the same results.

  • Just for the record: I remember Ashley explaining somewhere on the forums that this

    GPU Accelerated Windows

    has nothing to do with hardware accelerated canvas. It just says, that the window will make use (or not make use) of Direct3D functions when displaying the webpages. You can only learn about hardware acceleration if you are not using XP and are looking for direct2D in about:config

  • Well, the shape is realized by moving the particle object over time. When using the mouse coordinates, you are displaying parts of the shape at locations where they weren't meant to be. You would need to catch this, and only move to the mouse coordinates when the shape is completely drawn (which would be about half a second or so in this example). However, I don't think it will be implemented to the object itself, although it seems to be possible.

  • I guess I will have to give Chrome a chance then.

    Thank you all very much for the informations, I wasn't aware of the direct2D implementation.

    Reading the forum link that ROJOhound provided it seems that there is still hope. Azure will make use of Skia as a replacement of Cairo for all software rendering and OpenGL. Skia is already activated for the Mac versions, and a bug comment from today looks promising. They tested a build for Windows successfully and it seems it will be implemented as another option in the preferences to manually enable Skia, so that people having Direct2D will also be able to alternatively use Skia.

    Thanks once again, I wouldn't have learned about it without your answers <img src="smileys/smiley1.gif" border="0" align="middle" />

  • It's been a few weeks. Today I got a new graphics card, a MSI N460GTX Hawk. It's a up-to-date, powerful and supported card. And of course I installed the newest driver (285.58)

    To my astonishment Firefox still doesn't care! Under the same testing conditions I still get the same framerates as with the older 9400GS (yes, 8 fps with ghost shooter, 25-32 fps with fishieTank, etc.)

    Does anyone also use that model (MSI N460GTX Hawk, 1GB, Talon Version) and Firefox 7.0.1? If so, I'd like to know if you also have that disappointing performance?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • An index is a number used to enumerate things. By nature this has to be a progressive integer.

    An array also uses integers.

    Something like '3,1' is not a number to Construct, so it interprets it as a string.

    For you to not lose overview, use the array 'database' as a simple 1-dimensional array to store the names of the objects:

    stick stone apple colorblock1 colorblock2 stoneblock

    Now you may reference the object by its index (stick = 1, stone =2, ..., stoneblock = 6)

    When filling the inventory, put in this index, e.g. if the second slot of the inventory should contain an apple, then inventory(2) = 3

    To look up the name, you use database(inventory(2)), which resolves into database(3), which is "apple", because the third item of database is "apple"