Von Perkele's Recent Forum Activity

  • You can do it like this...

    dropbox.com/s/hf6h3492w9vuwb8/CooldownTimer.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This sounds really basic. What part exactly are you finding hard to do.

  • It is definitely possible and shouldn't be hard to make either.

    The easiest way to do this that I can think of is using the advanced random plugin and have all the possible list items either in an array or dictionary.

    This tutorial should show you what you need:

    construct.net/en/tutorials/getting-grips-advanced-2323

  • Ah ok I see. Thanks.

  • Do you mean the edges of the viewport itself?

  • I can probably currently answer you best here :)

    Actually you would have to do it round(random(-0.49, 3.49)), but I think my way is more intuitive. Check out the example I uploaded.

  • Or maybe it would look better to spawn them around the object in a circle?

    Here's an improved example:

    dropbox.com/s/no7thxdeha71bys/RandomSpawnAtEdges2.c3p

  • I think int(random(0,3.99) is just fine. Or if you want to be really OCD about it change it to int(random(0,3.99999...) :) The "distribution" doesn't really become any more accurate if you use a bigger spread like 0 - 100.

    Anyhow, here is an example file how to do it.

    dropbox.com/s/7xn4k2w2ljk51me/RandomSpawnAtEdge.c3p

  • One problem here is that that function doesn't actually equally distribute numbers between 0 and 3. 0 and 3 are actually half as likely to be chosen as 1 and 2 (for example 0 gets chose if random gives numbers between 0 - 0.499.., 1 gets chosen between 0.5 - 1.499.. (twice the probability). If you want equal distribution you could change it to for example int(random(0,3.99).

    It would be easier to get a closer look if you upload the project thou.

  • Could you upload the file.

  • Regarding a giant stretched out sprite vs a tiled background, I don't know which is better. I suppose the best way to know would be to test it yourself

    You can accomplish a changing bg color with only one TiledBackground

    1. Import an image file to use for your Tiled Background (Files > Import files)

    2. Use Load Image from URL and enter the file name

    This will let you swap out the TiledBackground's image

    Hi,

    I didn't notice much difference between stretched 1x1 pixel sprite and tiled bg.

    Regarding your method of changing background color, how would you automate it to go well with conditions? With animation frames it's very easy to always set the correct frame if you put all the frames in right order, like if each biome has 4 seasons then biome 0 has frames 0-3 and if you want to set the color to biome 0 season 3 then you set the animation frame = biome_number*4 + season_number, so you need to only use one condition that always sets the correct image color.

  • Hi,

    Assuming there is a lot going on in the viewport (a lot of objects with a lot of animations, quite a bit of particles etc.), are there recommended resolutions to use? If I used lower resolutions I could move a lot of the stuff going on at one time off screen and save resources (since it doesn't need to be drawn all at once). Or should the primary resolution mostly be considered on visual basis (to make pixel art look good etc.).

    Another question. If you want to make a monochrome background, is there much difference making a sprite that is size 1x1 and expanding it in the editor to fit you background vs using a tiled background? Since with sprites you can use animation frames it is very easy to make events that make the color change automatic. By for example using a condition like: change animation frame to biome_number*season_number, and then just having different one pixel sized images with the desired bg color as animation frames (and create a nice transition effect as well by creating a new color image of same size behind the old one and then fading away the top image). It makes it more complicated if you create a different tiled bg for each color. I guess that with tilemaps the same thing could maybe be done easily as well? But what is the best and simplest method?

Von Perkele's avatar

Von Perkele

Member since 26 Mar, 2020

None one is following Von Perkele yet!

Trophy Case

  • 4-Year Club
  • Email Verified

Progress

5/44
How to earn trophies