nimos100's Recent Forum Activity

  • I'm in the process of making my audio settings system for the options menu. Standard stuff, volume 0 to 100 %. I've gotten this to work with music just fine, since all music in the game uses the same tag ("Music"). However I want a seperate volume setting for all the sound effects which has the sounds folder as source, which has an uncountable number of different tags, and some have no tag at all. Is there a way to make sure all these sounds get affected by my volume correction without having to manually go in and include the math formula in every single audio command in the entire game?

    I've tried to have an every tick command which applies the variable to an empty "" tag, though the results are unstable.

    Edit: And no I don't want to touch master volume for this. I'm using that for something else.

    Thanks

    A way you could do it I guess. Would be to make a list/array or whatever you prefer, and whenever you create a tag you add it to the list. And then you just make a loop, and in the audio "tag" you use the tags from this list and adjust the volume for each tag. Guess that could work as you don't want to use the master as you said.

  • Hi

    I'm doing a play on the construction of a dwarven fortress and I have a problem.

    My fortress will be created on different levels (level 0 = ground level, level -1 = a level below etc.). My problem is how to create levels; I used a layout for each level, the dwarves ( Behaviors--> Persist ) pass through the stairs from one layout to another without problems. If I have a dwarf-level 0, which is going to the kitchen and I receive the level 1, when I come back after a few seconds at level 0, the dwarf is still in the same point (the dwarf doesen't reach the kitchens), the game is like in pause; actions at 0 don't proceed when I am at level 1 (and vice versa).

    How can I do ?

    Im pretty sure that DF uses some sort of layers, so you could do that as well instead of layouts. And you just hide and show layers depending on what level you are on.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's slower simply because it's more work to iterate two lists than one, and that overhead would apply to every single condition in the project. Currently the engine uses a simple flag to indicate that there are instances on the temporary list that need to be transferred, and checking a flag between every top level event has negligable overhead.

    This is probably a stupid question, anyway . But instead of using a temporary list couldn't the objects in the main list just contain a flag as well marking them as existing or as temporary and based on this they would be handled differently, maybe the flag could keep track of where in the scope they were created, so the problem you mentioned about infinite loops wouldn't happen. Or is that not possible? Because that way you wouldn't have to spend resources transferring, I would guess. You could just change the flag for all existing objects at the end of top level if that makes sense or would that still be worse than it is now, if possible?

  • The "temporary sprite list" is pretty much exactly how it works already, and it moves those instances to the main list at the end of the top-level event. However if every condition also checked the temporary list as well as the existing list, that would add a performance impact to every event again, since now every condition has to check two lists instead of one.

    I see.

    However im a bit confused why it would hurt performance. Because wont it be the same in the end anyway? For example we create 100 objects which are transferred to the main list at the end of the top level, and this is what confuse me. Because during the next tick, all 100 objects will be on the main list so whatever condition that would check these objects would apply to all 100 objects. So the performance impact happens from the period of creation to the end of top level, when working with the temporary list?

    Since im not 100% sure to be honest what these lists are, but assumes you mean they are stored in memory? it might be what confuses me a little. Because if we assume that in our game we have at max 1000 objects at a given time and for the sake of argument the temporary list is checked as well. So we have two scenarios, this is just so I understand what you mean:

    A: There are 800 objects on the main list and 200 on the temporary list

    B: There are 150 objects on the main list and 600 on the temporary list

    So if I understand you correct, the performance impact would be higher in scenario B than A, if the temporary list was checked as well?

    And to further extend this and we remove the check of the temporary list, using the same scenarios.

    Then during the "tick" of creation until the end of top level, you would have better performance in both scenarios due to not checking the temporary list, but the next tick. You have 1000 objects in scenario A and 750 in B. Hope you see what I mean when I ask if its not the same in the end? or did I misunderstand you?

  • Rotate objects

    The general idea is to extend the rotation of objects. As it is now they rotate around there origin. So adding two new options could be very useful, I think.

    Rotate around imagepoint - Instead of rotating around origin, you can choose whatever imagepoint on the object you like and it will rotate around that point. (Could maybe just replace the normal one, as it does exactly the same. And the origin could just be set by default.)

    Rotate around position - Same as above except you can specify a X,Y position and the rotation will happen around this point.

  • Instead of doing it like this, can't you just make a function that you call every time you change it in the code. For instant if you need something to happen depending on its value:

    Set Global_var = 1
    Function.call("Global var changed")
    
    Function "Global Var Changed"
    ---> If Global_var = 1 <Do something>
    ---> If Global_var = 2 <Do something>
    [/code:13lb70fe]
    
    Then you don't have to constantly check it, because you know you only call the function if a change takes place.
  • Hi,

    I want a group at the start of the frame to load a new image into the tilemap objects, but not from a URL, from a file... specifically I intend for the game to be exported via Node Webkit to Windows, Mac and Linux.

    Can someone please set me straight on what I would put in the "load image from URL" action to get it to load an image from the install folder of the game for example?

    Thanks very much.

    -Mike

    You can use the NW.JS to do that. Like so:

    NWjs.AppFolder & "Filename.ext"
    [/code:3rkm6ej3]
    
    However be advise that this wont work during development, so a good idea is to hook up a System -> is in preview so you can test it just using a fixed path.
    
    Since you want to load it during runtime, I guess your intention is to load several different ones? However im pretty sure you will run into problems with this. Due to how graphic is handle in C2, at least images have this problem which requires some workarounds that are not really good. Anyway if that is not your intention you should have no problem doing it that way.
  • + For each Sprite

    -> Create "Sprite"

    "For each Sprite" will iterate every Sprite instance, but the event itself modifies the set of Sprite instances. It's difficult to handle this case correctly without introducing a global performance impact to the event system, because every condition has to constantly check if the set of instances it is iterating has changed. (It's also interesting to think about how this event would turn in to an infinite loop if it also iterated the instances it just created!)

    BTW the stated goal of C3 is to rebuild the editor and keep the same runtime, so this is not really the kind of thing we intend to change anyway in the scope of that project.

    It had of course crossed my mind since you have already stated in the C3 presentation that C2 projects are compatible with C3 that this of course could cause some problems if something like this were redesigned.

    But as I suggested with the temporary objects/data, couldn't that be a viable solution, for in the example that you made with the For each Sprite, Assume you have 5 Sprites (Existing instances), So for each of these, a temporary object is created. So even though there now are 10 objects in total, only 5 of them are on the "Existing instances" list and 5 is on a "temporary instance list". So at the point the for each runs it will only include the 5 "existing instances" as the temporary ones are not currently sharing this scope. So imagine you apply yet another For each Sprite after the last one, it actually knows at this point that 10 exists as it include or checks any former created temporary lists, so it will create a new temporary instance list which will hold the new temporary instances, in this case 10. So to put it visually, it would look something like this:

    5 (Existing sprites list)

    5 (Temporary sprites list 1)

    10 (Temporary sprites list 2)

    So still you could update these objects as if they were all part of the same instance list, but would make some of the changes to the "Existing sprite list, some to temporary list 1 and 2. When the process at some point hit the top level all instances are then moved to the normal "Existing list". But whether that would ruin the C2 projects or even work im not sure of, at least not if some sort of fail save weren't added. Maybe it could know that if its an original C2 project it could simply not make use of temporary lists, or it could ask the user if they wanted to update there project to a C3 one, and what problems might occur. So users are left with both options.

    Would something like that be possible, assuming that this was on the agenda for C3, which you of course have already mentioned that its not?

    Because if you look at the example I made earlier in this thread, and assumes that for some reason this was an important game mechanic. How would you go about solving it, with the way that it currently works, because I don't find it an unrealistic scenario?

    Anyway cheers for sharing your thoughts on this matter.

  • I'm guessing you're referring to when you can pick new objects.

    New object's do exist instantly, but here's info on what's happens with regard to picking new objects:

    It's basically do to how the object filtering works in the event system. The question is how to implement it better.

    Maybe having the ability to make lists of objects. It would be a bit tricky when dealing with destroyed objects though.

    I'd like to think the whole event system could be overhauled to be simpler and more powerful. I've been trying to come up with a design that addresses things like picking two separate instances and this toplevel thing in a simple way. Imo a good design is key before I make argument how I think things could be better. Maybe eventually I'll find that holy grail of perfect simple design.

    Yeah think you make a good point and recall that thread you are linking too as well. How to solve it is of course the whole issue, also why I was curious to whether it was on the table when designing C3.

    One way I thought it might be possible or at least worth a consideration, could be something in the lines of creating "temporary" objects/data. Meaning that when a create takes place, all the information is stored temporary until the actually creation takes place, said in another way. Because you of course is correct that the object is created. But in lack of better terms I just refer to it as "not being created". But what I mean is that during the period until a top level is reached, maybe the information could be stored and all interactions etc. would then be done on this temporary data/object and copied to the actually object when its ready. If that makes sense? But whether something like that is possible, a good solution or even worth it, I don't know.

    But that way you would be able to just destroy the temporary data, instead of the actual object, or said in another way never create it. Anyway just some thoughts about it. Hopefully Ashley have already figured something out, if its of course being considered

  • i was using containers as an explanation for how simultaneous objects should be created in general, not for your example. trust me, containers are GREAT, and they lower the amount of coding. also, when it comes to your example, i don't see the problem. random 1-3, have a var which defines what is 1,2,3, spawn depending on the number. also i was talking about design in general.

    that's not true. during my time of development with c# / c++ i've noticed a lot of things that don't work as expected and need workaround because computers calculate them differently. the same is with this wait thing. you either accept it, or leave it. you will see much more trouble with unity / ue4 / any engine. but it all depends how masochistic you are

    to work your ass off on something. and in the end it all comes down to learning how computers work, how interpreters work, how compilers work, to just fix that ONE bug.

    of course it's not impossible that something relies on something else. but you used "on created" that was connected to another "on created" that was calling a function that does something. you can't do that in 1 tick since you've got a chaining of events. that's why wait (0) stops the chain before calling function for 1 sec so that the objects are completed and then continues from there to get the right values and print them out.

    i'm pretty sure you don't know what happens, and how c2 engine works.

    Sorry Saiyadjin, but you speak to me like you assume that I have no clue how C2 works, which of course is fair enough if that's how you see it. But I did make you aware of this issue in the first place, which is known by Scirra, that it is designed that way. Why I asked about it in the first place. I fully respect if you do not see a problem with this, but that doesn't make it go away. And I made a simple example of how and when it happens, not because I was trying to show good design, but to explain the problem to those people, including yourself that related this issue to being maybe about the UI. If you have never used a wait() in your code to solve varies issues even though you knew it was bad, then I fully understand why you haven't noticed this.

    Besides that im not comparing to other software solutions and whether they have problems or not, because its of no concern to me. But if you have experience with C++/C# you know just as well as me, that you would never solve problems with creating objects by throwing in waits(). So why you would even compare those with C2, im not sure of.

    Besides that you have moved from my initial question, which I have no clue why you would even argue against in the first place, that if objects could be created so they exist instantly, that it wouldn't be better than having to wait? to how I made the example, which shows the problem and then explain to me, what happens in it? Since I made the example, im well aware of what it does, again it weren't made to show good design, but to show where the problem occurs and in what situations. And if you can solve it some other way under the same conditions that I put up, then I would be glad to see it and learn from it. But still why defend how it works now, if it can be changed in C3 so this wouldn't even be an issue, since this is a part of the core of how C2 works, it would make sense to change it for C3 if possible, which is why I asked the question and not to be shown 10 examples of how to use waits for varies things, that have nothing to do with what this is about.

  • i see what you're tryin' to do.

    you want to use the object you created at the same moment as it was created (in the same tick).

    so basically what you do is use wait ( 0 ) to go to next tick and continue where the it left off (at that function).

    by default that is the expected behaviour - suggesting that your desing is bad. and probably top level won't be removed any time soon, but if you design your game good it's not even needed. also if you're aiming for the instant spawning of more elements that need to be "stuck together" and you want to do that in one tick - use containers. that's what they're used for. also "on created" is used for defining start state of an created object. but only after one tick is done your object gets UID, therefore you never had any output without wait(0).

    also, if you aim 60+ fps, have in mind that 1 tick is 0.016s (1/60)s which is really fast, and if you pick your objects in next ticks that won't look / work wierd. i know it takes some time to design the game correctly, but it works good.

    also what newt told you - do an action and if you want to set up some basic object items do it on created, otherwise use wait for some behaviours/events in your game that need to happen after some time /at some defined moment. instantly picking item that you created won't do much since that tick you're in has to PASS for object to really appear there.

    Think you are missing the point. Using containers for something like this is not very good I think. In my example I said imagine that you have several options and you have to choose one at random, lets say you have 10 options. Then when you spawn your object you spawn 10 other objects as well that is part of the container, to only use one of them, how is that a good design?

    And you are correct that the problem you run into is that it will be a bad design.

    "if you aim 60+ fps, have in mind that 1 tick is 0.016s (1/60)s which is really fast, and if you pick your objects in next ticks that won't look / work wierd. i know it takes some time to design the game correctly, but it works good."

    I don't think this is a valid reason. Computers doesn't work as we do, where you can say that if we don't see it, then the computer wont either. It notice every tick, and if something in your code does something in that 1 tick it gives you problem whether you see it or not.

    Newt just gave an example of how wait works, but I can come up with lots of example of how to use it where it works fine. But im not interested in that.

    So try this and you can use my example if you want, but when you make it and spawn the Red square, make it so, depending on a random roll of 3, which we assume is some important setting for the Red square, you make it spawn another object depending on the roll all in one go and print out the values from both of them. Its not unrealistic that your game when creating a unit might spawn something else that rely on some setting from the first unit.

  • O star of layout- set text to "hi"

    -wait 5 sec

    -set text to "This is an example of a timeline"

    -wait 5 sec

    -set text to "wait can do other things besides text"

    -wait 5 sec

    -set text to "like make a trigger out of a variable"

    -wait 1 sec

    -set variable "dostuff" to 1

    And again Wait in itself is not a problem and yes there are lots of examples of how it can be used And your example is also a fine way to use it, but again it could be done with a Timer just as well. But its fair enough to leave Wait and not remove it, its not really that huge of a problem.

    But If you as in my example have to create several objects which depends on each other in one go, then its not all that simple as it allow Wait() to be misused, not because there is something wrong with wait itself, but because C2 when creating objects doesn't make them available before the next top level.

nimos100's avatar

nimos100

Member since 23 Sep, 2012

None one is following nimos100 yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies