Squish's Recent Forum Activity

  • It will pick all the sprites with x > 0.

    You can add more conditions under the loop for loop specific refinements

    eg.

    For each sprite

    PV "something" = n -> do stuff

    If you put the other condition above the for each, Construct will pick all of those first, and then do the for each. I don't know if it makes much difference, but I find it to be more reliable if the conditions are under the loop.

  • Hmm. I haven't tried this specific scenario, but I did make a kind of physics based explosion by spawning multiple instances of a physics enabled object, and adding force via events to each one.

    Possibly, you could use an explosion sprite that grows outward, and use collision events to add force, although this is just musing and I haven't tried anything remotely like it.

    Another thing with physics objects is that they don't like overlapping at all. They tend to fly out violently when stuck on top of each other.

    Always: physics object overlaps explosion sprite

    Set physics object x to explosion sprite x

    Set physics object y to explosion sprite y

    If more than one overlaps, the physics engine will fling them outwards unpredictably. I don't know if this is any use - but perhaps it will inspire more ideas.

  • Inspired by another post, I am reminded of some difficulties I had with playing Mp3s.

    Specifically - the MP3s would work just fine on my main computer, but when played on another computer most of the time some tracks would play and others wouldn't. I couldn't seem to nail it down to one particular operating system or codec suite either.

    In the end, I eventually (and accidentally, to an extent) noticed that some of the source MP3s were in 48000 khz - which in some respects isn't a standard frequency. I decoded the MP3's to .wav and converted the sample rates from 48,000,16-bit,stereo to 44,100/16/s and the problem vanished. I was able to use either VBR or CBR (variable/constant bitrate) and each would work fine. It was just that the 48,000 bps was causing compatibility issues.

    Traditional standard frequencies

    11025 khz

    22050 khz all either stereo/mono and 16/8 bit

    44100 khz

    CD Audio is 44,100, 16-bit, stereo. DAT tapes pushed this a little at 48,000 khz but didn't really manage to catch on, and the original MP3 specification tends to bug out with anything other than the standard frequencies.

    I don't know what the case is with OGGs for music, but it's a pity because OGG is an excellent format, (I just hate the name).

  • Why would you need to use a .wav for music, by the way? It's pretty simple to convert to MP3 or even OGG (although OGG is having dramas at the moment). If you're concerned about quality, you can use high rate MP3 (320kbps VBR) which seems to work quite well in my testing. During the game, having high-quality music is a bit of a waste anyway with all the sound effects mixed in.

    Just make sure your source wavs use standard frequencies:

    11025, 22050, 44100

    16 bit

    mono/stereo

    I'll put a detailed post in help/tech support in case others are having problems.

  • This probably isn't very helpful, but you can either use the sprite font plugin or pre-render your text as a .png and create a tiled background (instead of a sprite - which if I understand correctly will use more vram).

    It's dirty, but it gets around the font/text issues until the devs have had time to iron out the bugs in Construct.

  • Throughout the course of developing my Construct project I've created a number of handy little bits and pieces that would almost certainly serve some use to others in the future.

    I would like an area on the Construct wiki site where users can submit useful components for others to use.

    For example. I built a high-score table, and it is reasonably solid and adjustable. (Ie. Instead of using hard-coded numbers, it uses loops to count the number of columns/rows in the given array). This could save someone a lot of work and bugtesting for their own projects.

    I also designed a nice little slider that can set an arbitrary number between 1 and whatever you desire. The output is thrown into a visible text box that can be read by other events/actions. I've also created dial style controls that do the same thing (they're used for angles).

    Now I need a place where I (and others) can share these useful components that doesn't require digging through hundreds of posts in the forum. I have indeed seen the "Sorry, you can't search right now - try again in a few minutes" message more than enough times.

  • In a complex layout, I find that sometimes I'll accidentally drag something or I won't know for sure if construct has acted in the way I was expecting

    What would make this easier would be a message log of each action that the user has taken (eg.

    Sample contents:

    (Events) Move Group "Blah Group"

    (Events) Delete line (54) - "When Red is overlapping blue"

    (Layout) Move object <objectname> to (x2,y2) from (x1,y1)

    (Events) [Line 12] Completely screw up action that previously worked

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've been having some difficulties with a plasma object, and instead of trying things one by one and patiently waiting for the preview to load, I created this:

    Use it to fiddle with plasma settings in real time.

    Updated:

    http://www.mediafire.com/file/bkv83tah2 ... menter.zip

    Limitations:

    I wanted to have controls for Filter colours, strengths and cut-offs, but there are no actions that I can use to control those values (yet).

  • Thanks for the speedy reply.

    I've actually been toiling with arrays and through a combination of determination and experimentation have worked them out and created an actual working table.

    I'm sure if I didn't post here it would have never happened.

    Anyway. Even if my approach is probably messy and needlessly complex, it works nicely. I'll post a tutorial in a few days, if I can make it legible (especially to newcomers).

    The next trick is somehow applying some obfuscation to the saved file, such as encryption.

  • Davioware - THAT should be in the FAQ.

    I ended up manually tracking and replacing an entire set of (lots) of globals when I had the number bug. Gagh.

  • This might be useful, despite thread necromancy from 2008.

    Sigma is the Standard Deviation for a Normal curve. For any given normal curve (shown in that linked picture above) there is a standard deviation where ~34% either side of the mean (peak) will fall.

    There's a great picture on the wikipedia page:

    http://en.wikipedia.org/wiki/Normal_distribution#Standardizing_normal_random_variables.

    Normal random vs ... typical random.

    If you drew a normal random from 100, you are equally as likely to get 2 or 98 (each is 1/100 chance) as you are to get 45, 50, 60, 73 etc. With a normal curve, the further you are from the mean (50), the lower the chance of that number appearing. So, 2 or 98 will occur very infrequently (~1%) and most results will land around the 50 mark. If your sigma is larger, then the curve is flatter and in the 1-100 example, there will be a greater chance to get numbers between 30 and 70.

    This is a really cool feature, although I haven't actually found a use for it yet.

  • Keywords: wrong event, event triggers, spawning incorrect

    By somewhat pot luck, I found an odd bug with the for each loop. I don't know if it's a bug with construct or not - and I don't know how I'd go about testing it.

    However.

    If you have a for each object, and no other condition in the even, and a subevent below that (with or without conditions) it seems to cause weirdness. I mean wierdness because everything will seem to be fine. For example, In my stationary gun game, every 5-10 shots an enemy would spawn right as the bullet spawns, often with a strange angle (there are absolutely no events that ever set that object's angle). However, the bullet does have an angle set. By luck, rarely one of the enemies would survive being killed by the bullet - perhaps because the collision event was missed or something.

    Ok so like this:

    On left button

    System - create a bullet at gun's "bullet_point"

    Set bullet.angle to gun.angle

    etc

    Why is it spawning an enemy? Dunno. But it seems that the spawn an enemy event gets crossed up with the bullet spawning process, even though those events are well separated in the event list and share nothing in common other than a collision event.

    After discovering this oddness, I went through backups until I found one where the problem wasn't occurring. I then one by one transferred any new events to the layout (tediously) and debugged each time. That's when I found that the for each was causing the troubles. I replaced that with a more sensible condition and I haven't seen the problem since (Well, actually once but I immediately realised what I'd done).

Squish's avatar

Squish

Member since 2 Aug, 2010

None one is following Squish yet!

Trophy Case

  • 14-Year Club

Progress

14/44
How to earn trophies