Von Perkele's Recent Forum Activity

  • Hi,

    Yeah always have the loop conditions very last in the condition.

    Anyhow, it's good to know that functions that run every tick shouldn't cause slowdown any more than normal conditions that run every tick.

  • Hi,

    Yeah I have an UID parameter in all functions that identify which instance is picked. The function is run for each instance that meets the original conditions to trigger the function.

  • Should Functions then be always used to complete actions that take one tick to finish?

  • Hi,

    Is there any difference between having a subconditon action being run every tick and every tick calling a function that runs the same action?

    I'm asking because for some reason the FPS seemed to drop after I changed almost all of my actions to run as functions.

  • Hi,

    I think it could make sense storing the object related info in object variable if there is ever only one instance of that object, like a player character for example.

    But if you have a project that could potentially have 100 different "unit" objects and each unit has 30 "stats" (like max hp, max mp, attack, defense etc.), and there can be several instances of one unit simultaneously on the playfield, I don't think it makes sense to use object variables for that data if the stats are universal for all object instances. It doesn't make sense that each instance would have the same data cloned to its variables multiple times instead of using a single database.

  • Hi,

    So if you want to store lots of information it is better to use an array instead of creating a hundred local or global variables to store the information. Is it purely for practical reasons, because it's easier to handle the information in arrays? Is there a difference in performance between the methods?

    I'm planning to create rpg style stat system for around 100 units. Each unit has probably 20 - 30 different stats and they can all be upgraded and manipulated by different effects. In this case it seems obvious that either each unit should have it's own array for stats or all that information should be stores in a single array. Is there a benefit in choosing one big array or many smaller ones, or is it irrelevant performance wise and you should just choose to do whatever makes most practical sense?

    Then I have a biome system with 6 different biomes, a weather system with 3 weather states (clear, raining/snowing, foggy), and a season system with 1 - 4 seasons depending on the biome the player has chosen. I can set up all of these with relatively few LOCAL variables. The only global variables related to these systems are counters that count down when the player last played in each biome type, so let's say 6 global variables are needed to set up that. Is there a benefit to use an array to control that type of information as well?

  • Hi,

    Yes, doing a quick test with 1000 instances that have brightness and grayscale effects on vs their layer having the effects and changing the effect parameter value randomly every tick shows that using effects on layers is significantly faster.

    Thanks.

  • Hello,

    I have a cloud object that has the brightness, grayscale and luminosity effects. All the object instances are in the same layer. I have a day/night cycle and weather states that affect the effects same way equally to all instances (meaning that I could potentially use the effect in the layer instead of the object) but I also have set up conditions that affect some instance effect levels individually (clouds get individually more grayscaly as they move in distance and get a brightness flash with lightning etc.).

    So I could apply many of the effects' intensity levels to the objects' layer, but I couldn't replace the object's effects completely this way. would it still likely improve performance? I read in performance tips that you should render same effects in the same layer, I'm not sure how that applies in this case.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This was perfect, thank you so much.

    Finding it hard to learn these extra bits like "loopindex"

    Loopindex is simply the number of times the loop has repeated. It's very useful.

  • Yes, that's pretty much it. Thanks.

  • Ah ok, you mean the download size, not RAM usage.

    Purely text based game should definitely not use that that much space. Do you use many different sprite fonts?

  • Hi,

    My problem is the "flickering line" artifact around sprites.

    I know that you should leave one pixel of empty space around your sprites. Sometimes that alone does not always work when you resize your objects a lot. Leaving a lot more empty space around the sprite seems to works somewhat.

    However, if I want the two objects to look like they connect to each other seeminglessly, leaving that empty space around the sprite doesn't seem to be an option. It always looks like there is a small gap between the objects, even though if you observe the size and position of the pixels of the objects, there should be no empty space between the pixels that are drawn. It seems like letting the sprites overlap one another a bit helps with this issue.

    My problem is that when I use normalmap extended 2 plugin you can't really let the normalmaps overlap because that will create double lighting effect and looks bad.

    Can you give any advice on how to avoid or fix these issues?

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