a5d05b1c-161f-4ae0-82fb-2da11ccea737's Forum Posts

  • 6 posts
  • Hi there

    I know about the global preference setting for a default export location for all projects

    However, I have 20+ projects that need to be in separate export folders

    Whenever I export I need to edit the default export location to target my desired folder

    How can I save a default export location per project, and if not, can it be added?

    something like this:

    Global Preference - Export location = /home/generic/

    Project1:

    Project - Export location = /home/exports/Project1/

    LocalOveride = true

    - Exports to /home/exports/Project1/AppName

    Project2:

    Project - Export location = /home/exports/Project2/

    LocalOveride = false

    - Exports to /home/generic/AppName

    Thanks for your time

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi guys, am I correct in my findings?

    Date.Hours(TimeStamp) etc. all return an automatically localized return value?

    My Question in a nutshell is how to localize a timestamp from a given value and not from the local machine

    Here's the scenario:

    I have a server feeding me a UTCTimeStamp and the server's regional settings separately.

    I have to compare that to the terminals current time which i get from Date.UnixTimestamp (also not localized; obviously correct)

    so I localize both and compare... (this is to be able to compare regardless of the local machines regional settings)

    Here's the issue I have:

    I have a localized timestamp that i want to extract Hours from

    put it into Date.Hours and get out an hour that is now (localized + more localized)

    my workaround is that i have to unlocalize the stamps again just to feed it through Date.Hours

    If it is the case i have the following suggestion:

    Date.Hours(Timestamp) returns hours of that timestamp only

    Add:

    Date.Localize(Timestamp,"regional") if regional is not given then it should use that machine's regional settings

    example:

    ServerTime: UTC +2 hours

    ClientTime: UTC -2 hours

    Localized from Server

    var Timestamp = Date.UnixTimestamp();
    var Region = "+0200";
    var LocalizedTS = Date.Localize(Timestamp,Region);
    
    console.log(Date.Hours(LocalizedTS));
    //output: 14
    [/code:y6eavdnu]
    
    [b]Localized from Client[/b]
    [code:y6eavdnu]
    var Timestamp = Date.UnixTimestamp();
    var LocalizedTS = Date.Localize(Timestamp);
    
    console.log(Date.Hours(LocalizedTS));
    //output: 10
    [/code:y6eavdnu]
  • OK, so interestingly enough this happened:

    and I know you said its wrong, but hear me out for now

    remember the code of:

    every tick -> subtract 1 * dt from Timer

    every second -> set text to floor(Timer)

    now that i exported with webgl disabled, the timer jumps

    so every third "supposed" second that the text updates

    the text indicates 2 seconds have passed and not one

    eg. it will go: 60,59,57,56,54,53,51... etc.

    so either the tick is happening correctly and the <Every second event> is lagging behind

    or the tick*dt comes out to more than 1 second.

    <EDIT>

    So i restarted both and subsequently it has not skipped time again.

    the bad pc's animation is still a little behind but not by as much

    and the timer actually ticks in uniform now.

    meaning that it may still be 1second + something extra,

    but both machines do it at the same rate

    so when the timer starts on both and there is maybe a 1second difference between the 2

    that 1 second difference stays constant no matter how much time elapses.

    Anyone know why this is different between processing on GPU and CPU?

    specifically why time can lose integrity when GPU doesn't have enough juice?

  • Thank you for your response, and your time, i really appreciate it

    [quote:i3a41aej]"Every 1 second" event should take 1 second, bullet with speed 1000 will cover 1000px etc.

    If your second PC is so slow and laggy that C2 engine can't compensate it, then you will not be able to do this with dt either.

    I hear what you are saying, so if there is not enough juice supplied to the C2 Engine, then the internals run slower yeah?

    but if I look at the Windows' clocks on both machines, they tick at exactly the same rate,

    So is the C2 timer internal and not getting its time from the PC's internal clock? is there a way to access that?

    I read somewhere as well that Chrome doesn't have a high performance clock built in, does that affect C2's clock integrity?

    I'm also going to try set my project to webgl Disabled, to see what happens when it's being processed by the CPU and not the GPU,

    Not holding my breath but will be interesting to see what happens

  • Hi everyone,

    I have read a lot about dt, lots of forum questions and the very helpful post:

    scirra.com/tutorials/67/delta-time-and-framerate-independence

    but every time i try to put it in to practice, I realize that I actually don't understand it.

    This is what I'm using, 2 PC's running chrome only with webgl enabled

    one PC runs at 60fps, the other 20-40 fps when playing the game

    Here are 2 scenarios that I'm struggling with.

    1.

    I have a sprite animation of 34 frames, its initial animation speed is 40,

    so I expect this to run a little faster than a second.

    obviously this slows down considerably on the bad fps PC

    = so I saw "NewOne" I think his name was, saying that dt basically means 60/1

    now i set my animation speed like this:

    set sprite speed to 40*60*dt

    this looks more or less fine on paper when i log it,

    60fps: speed: 40.0079999585

    +-30fps: speed: 79.9752000254 OR 60 OR 40.005600079 depending on dt at that time before I start it

    so it sounds like they should finish same time, but bad-fps-pc is always lagging behind on screen,

    I suppose because I set the speed once before it starts and not update while animating, since dt would be changing right.

    also, in the case of speed > 60fps, doesn't it just max to 60fps thus making it animate slower than dt said it should to keep up?

    this is getting long, sorry about this, but thank you for your time

    and here is scenario 2: (and this is interesting because i read Ashley saying the (Every X second event, is frame independent), but I observe it differently)

    2.

    I have a SpriteFont that updates it's text to the time that is counting down.

    Originally I had:

    (int) Timer = 60

    Every 1 second -> subtract 1 from Timer

    -> SpriteFont set text to Timer

    60fps: Runs just fine

    +-30fps: lags behind, and the more time passes, the wider the time gap between the two

    then I tried:

    Every Tick -> subtract 1*dt from Timer

    Every Second -> set text to floor(Timer)

    makes no difference, or makes too small a difference to say that it works,

    Time still lags behind and increases in difference the longer the time

    ______________________________________________________________________

    So basically I'm just stupid and don't know how to implement this properly

    Or I'm seriously missing something about dt,

    or how dt, timers, sprite animations and chrome all fit together.

    _____________________________________________________________________

    Thank you for taking the time to read this, if there's any clarity I can provide please let me know

    I greatly appreciate any insight and help on this.

    Thank you

  • Update:

    Add condition: for each. expression: CurKey, CurValue

    For example, hash table =

    {
     "a":{
           "b":1,
           "c":2
         }, 
     "d":3
    }[/code:1d8cjctk]
    
    for each "a" will get 
    key = "b" , value = 1
    key = "c" , value = 2
    
    for each "" ("" is root) will get 
    key = "d" , value = 3
    ( There are two keys "a" and "d" in root, but value at key "a" is not a number or string, only get key "d")rexrainbow2012-04-16 01:08:18
    

    Hi Rex Very nice,

    A little unnatural that root doesn't return all though

    Couldn't you make it recursive to give all elements. For instance, using your example:

    {
    "a":{
           "b":1,
           "c":2
         }, 
    "d":3
    }[/code:1d8cjctk]
    
    for each "" ("" is root) will get 
    key = "a" , value = (has children or not int, not string) then for each "a"
    key = "b" , value = 1
    key = "c" , value = 2
    key = "d" , value = 3
    
    I don't know if that's helpful or if that's something you were going for
    it's just how i think those structures should be returned
  • 6 posts