15 årig scout, tycker om nyheter, politik och datorer (FOSS)

  • 1 Post
  • 45 Comments
Joined 1 year ago
cake
Cake day: September 20th, 2023

help-circle




  • nice game! although I feel like some of the setups in tumbling ballistic are impossible to beat, although there just random. Anyways, here’s my very messy code:

    // Arguments:
    let {x_position, altitude, angle, userStore} = arguments[0];
    
    let target_angle = 0
    let x_thrust = 0
    
    ///////////////
    // Side slip //
    ///////////////
    
    let half = 159
    let ms = 400
    let target_speed = ((half - x_position) / half) * ms
    
    if (altitude < 150 || target_speed < 0.1 * ms)
      target_speed = 0
    
    if (!("px" in userStore)) {
      userStore.px = x_position
    }
    let dx = userStore.px - x_position
    userStore.px = x_position
    let xs = dx * 60 + target_speed
    let axs = xs > 0 ? xs : -xs
    
    target_angle = axs < 90 ? xs : 90 * (xs / axs)
    x_thrust = (axs / 90) * (target_angle  > 0 ? target_angle : -target_angle) * 1
    if (x_thrust > 1) {
      x_thrust = 1
    }
    x_thrust = x_thrust * ((target_angle  > 0 ? target_angle : -target_angle) / 90)
    
    let atas = altitude < 150 ? altitude / 150 : 1
    target_angle *= atas
    
    let ad = target_angle - angle
    let aad = ad > 0 ? ad : -ad
    
    let aa = angle > 0 ? angle : -angle
    
    let xtc90 = altitude < 500 ? (altitude / 500) * 30 : 30
    
    if (aa > 90 + xtc90 || aad > 45 || altitude < 200) {
      x_thrust = 0
    }
    
    //////////////
    // Altitude //
    //////////////
    
    if (!("da" in userStore)) {
      userStore.da = 0;
    }
    if (!("pa" in userStore)) {
      userStore.pa = altitude;
    }
    
    userStore.da = userStore.pa - altitude
    userStore.pa = altitude
    let as = userStore.da * 60
    
    let tas = altitude / 1.35 + 0.2
    let thrust = 0
    if (as > tas) {
      thrust = 1
    }
    let acb = 200 + (as > 250 ? 100 : 0)
    let angle_cutoff = altitude < acb ? 89 * (as / 200) : 35
    if (angle_cutoff > 89) angle_cutoff = 89
    if ((angle > 0 ? angle : -angle) > angle_cutoff) {
      thrust = 0
    }
    
    thrust += x_thrust
    if (thrust > 1) {
      thrust = 1
    }
    
    //////////////
    // Rotation //
    //////////////
    
    if (!("dr" in userStore)) {
      userStore.dr = 0;
    }
    if (!("pr" in userStore)) {
      userStore.pr = angle;
    }
    
    userStore.dr = userStore.pr - angle
    userStore.pr = angle
    let rs = userStore.dr * 60
    let ars = rs > 0 ? rs : -rs
    let rsrtm = 0.02
    let rt = (-(angle - target_angle) / 360) * 10 + rs * rsrtm
    
    let ardmc = 50
    if (ars < 30) ardmc = 0
    
    let rd = angle - target_angle
    let ard = (rd > 0 ? rs : -rd) + rs * ardmc
    
    let ard180_1 = 180 - (angle > 0 ? angle : -angle)
    let ard180_2 = 180 - (target_angle > 0 ? target_angle : -target_angle)
    let ard180 = ard180_1 + ard180_2 - rs * ardmc
    
    if (((target_angle > 0) != (angle > 0)) && ard180 < ard && false) {
      rt -= rs * rsrtm
      rt = -rt 
    }
    
    if (rt > 1) rt = 1;
    else if (rt < -1) rt = -1;
    
    // Return:
    return { rotThrust:rt, aftThrust:thrust,userStore:userStore };
    



  • I just use the yellow one as I feel like they already represent everyone. I would definitely not feel any better about using a white emoji, I’d just feel like a racist trying to convince people that I’m better. I also like the yellow ones as it makes the standard to be anonymous about your skin colour. Or you could just use the outlined one for everything 🫥. Also the hole emoji is awesome 🕳️

    And that was a way longer ramble then I intended 😀

    And finally, good by 🖐️🖐🏻🖐🏼🖐🏽🖐🏾🖐🏿

    P.S. Typing them all out the yellow one is also by far the most readeble. The white ones work very good on the black background I’m viewing this on but they probably just blend in to the background if your using a light theme. Maybe we should just type out all the variants? 🤷🤷🏻🤷🏼🤷🏽🤷🏾🤷🏿🤷‍♀️🤷🏻‍♀️🤷🏼‍♀️🤷🏽‍♀️🤷🏾‍♀️🤷🏿‍♀️🤷‍♂️🤷🏻‍♂️🤷🏼‍♂️🤷🏽‍♂️🤷🏾‍♂️🤷🏿‍♂️













  • I natively speak Swedish but I’ve studied and used English for 4-5 years so I speak English fluently and would consider myself bilingual. I can think in either English or Swedish and I can mix sentences in Swedish and English freely. But I never think in a language that’s really a combination of those languages (what we would call svengelska in Swedish).

    I’m also studying french and German but I’m not fluent in any of those languages. When using those languages (or at least German) I think in a language that’s truly a combination of that language and Swedish/English. I use words from all languages and construct sentences as I would in Swedish (reverse word order for questions, no weird German thing with adjectives at the end etc). This of course becomes a pain as soon as I have to express a thought to someone else.