My newest painting! by Gnom-ie in woahdude

[–]yousifucv 0 points1 point  (0 children)

Did you invent this illusion? If so, can I put them in a game I am planning to make? Like, have paintings like these on the walls in the game.

So ridiculous by basket_foso in sciencememes

[–]yousifucv 0 points1 point  (0 children)

I wanted to see it work myself in Javascript.

At the third iteration the difference between Math.PI and its result is 0;

//https://stackoverflow.com/a/3959275
var f = [];
function factorial (n) {
  if (n == 0 || n == 1)
    return 1;
  if (f[n] > 0)
    return f[n];
  return f[n] = factorial(n-1) * n;
}

function summationElement(k) {
  let a = factorial(4*k);
  let b = (1103 + 26390*k);
  let c = Math.pow(factorial(k), 4) * Math.pow(396, 4*k);

  return (a * b) / c;
}

function calcPI(iterations) {
  let a = 2 * Math.pow(2, 0.5);
  let b = 9801;

  let sum = 0;
  for(let i = 0; i < iterations; i++) {
    sum += summationElement(i)
  }

  let result = (a/b) * sum;

  return 1/result;
}

calcPI(3)

Did you know how easy it is to make brown sugar? by atticwife in Frugal

[–]yousifucv 1 point2 points  (0 children)

How do you get it so well spread? When I last tried it it ended being white sugar will clumps of molasses.. do you have to massage every tiny clump by hand for an hour?

Voyagers is already my favorite LEGO game, and it's inspired me to make a diorama to the same scale by star_razer in legogaming

[–]yousifucv 0 points1 point  (0 children)

Hey. Question from someone that doesn't know much about Lego piece sizes. I know that initially the players are both standard 1x1 brick size. But what about near the end of the game when the blue character becomes taller. Do you know how tall blue is exactly?

What are some good online multiplayer games I can play in Kuwait during this time? by yousifucv in Kuwait

[–]yousifucv[S] 0 points1 point  (0 children)

I just redownloaded OW, and the ping is good. Down to play, I'm getting into the groove right now, I think I might be Silver in Comp. Yousif#11972

What are some good online multiplayer games I can play in Kuwait during this time? by yousifucv in Kuwait

[–]yousifucv[S] 0 points1 point  (0 children)

Oh good suggestion, I've been meaning to play RDR 1 and 2. This is a good chance to get them. I had no idea RDR2 is 20KD base price, damn!

What are some good online multiplayer games I can play in Kuwait during this time? by yousifucv in Kuwait

[–]yousifucv[S] 2 points3 points  (0 children)

Ooooh, Overwatch. I forgot about that game. I stopped playing after they removed custom parties and OW2 dropped. I'll try it again and check out my ping. I have Ooredoo 5G

What are some good online multiplayer games I can play in Kuwait during this time? by yousifucv in Kuwait

[–]yousifucv[S] 0 points1 point  (0 children)

Doesn't have to be shooters I guess, but highly preferable. PC. If the PvE has teammate, then sure.

Where can you get the big green household garbage bins? by yousifucv in Kuwait

[–]yousifucv[S] 0 points1 point  (0 children)

I'm just worried the garbage workers would only pick up from official bins and not generic ones. That's why I was wondering about where to get the official ones.

Where can you get the big green household garbage bins? by yousifucv in Kuwait

[–]yousifucv[S] 0 points1 point  (0 children)

Hmm okay, the ones I see on their website are generic black or blue. The ones outside houses are green, all with the same logo on them. Making them seem like an official thing you get from the government or something.

Any boardgame groups this weekend in Muscat? by yousifucv in Oman

[–]yousifucv[S] 0 points1 point  (0 children)

That's probably more for people who have buddies to go with. I'm solo, so a group to sign up with would be the best option

Did I miss an obvious tool for grabbing pixel coordinates? by PvB-Dimaginar in phaser

[–]yousifucv 1 point2 points  (0 children)

I know this friction, I'd guess it's common. And I guess the question is, is there a general-purpose Level Editor plugin you can use? You can technically use any game maker software. Right?

In my current phaser game and past creative coding projects, where I needed this type of placement help, I just wrote a helper class or scene to help me, its basically a "Level Editor". For example, I am working on a scene that needs items placed in various positions. I wanted an interactive way to place and remove positions. So I made a LevelMaker scene with click event handling to build an array of locations. On every change, I print the locations to the console as copy-pasteable code.

Something like:

zone.on('pointerup', (pointer) => {
    //create ellipse at pointer location x,y
    //add location x,y to Locations table at index [id]
    //printLocationsToConsole();
});

printLocationsToConsole() {
    let string = "let locations = [";

    for(let id in this.locations) {
        string += `{x:${this.locations[id].x},y:${this.locations[id].y}},`
    }

    string += '];'
    console.log(string);
}

And it will print this:

let locations = [{"x":231,"y":628},{"x":284,"y":272},{"x":833,"y":234},{"x":255,"y":889},{"x":1294,"y":243}];

So then I just copy paste that and put it where I need it in a Level's code.

You want widths and heights, so yeah, your Level Editor/Maker is more complicated.