« first day (1274 days earlier)      last day (4040 days later) » 

00:00
@AlexM. Take him off of ignore
This handsome avatar
HOW TO MAKE LE AFRO err.... err.... MOVE
I don't know jack.
@Grey If he wants me on ignore, let him. As he is a large member of the community, I have a lot of respect for him, so I respect the fact that he doesn't want to hear me speak. I will do better to censor myself after this.
@Grey and just why would I do that
:/
@Grey well that's going to be slightly hard if the afro is not a separate layer
I have the original
svg
@AlexM.
layered and everything
00:03
hmm, apply a water wave algorithm to it or something
no idea, why does it even have to move
Itd be awesome?
Idk
better make a full avatar of yourself
and make it dance
I bet you got the moves like mick jakesoon
@mick
yeah, on this one
LOl
00:05
current favorite
sup
nah jk
it doesn't beat butterflies
that one is just too smooth
1
Q: How do I convince my boss to get rid of our open office and give us individual offices?

Bryan CimoMy Job is a thinking job (programmer) and I work in an open style of office. I used to have a quiet area to work in and at one point, my own office. We are moving our office to a new building and the plan is to make it even more open. How can I convince management to move us into an office ...

/headphones on
I'd love a closed office though
I was half asleep this morning
and hearing everyone talk and make sounds around me felt really really bad
felt like taking a kitten and killing it
classical music tends to cover the noises
and still provide silence
i like partially open offices
silence is... an artificial thing.
its why you invest in good headphones
I just want my morning silence and my permanent peace of mind
I hate noisy people in general
there are certain people who are always happy and go around shouting HEYAH HOW IS EVERYBODY DOING
i dont think i'd be any more productive in a closed office of my own
00:13
I just can't
take it
you need a nerf gun
lol I feel like yelling
just nerf that sucka
"WOMAN WHY THE FUCK ARE YOU SHOUTING IN MY EARS
AND WHY THE FUCK ARE YOU ALWAYS HAPPY
eventually the entire office will join in
00:14
DO YOU EVEN WORK"
and prozac
being happy with your workplace is a good thing
being happy at your workplace isn't always a good thing
any sort of such extreme emotions can affect your performance in some way that is not desirable
also the performance of others
ideally, at work, one should do his job and then go home
nothing more
@Grey What are you worknig on right now? :3
a screensaver
but I have to find a shader technique before I do it.
@Grey you know
00:22
Cool. Still working on Down?
if you increase the hair in size, vertically (and progressively), and then go back
at different speeds on each loop
@hasherr yes
it will look like jelly without horizontal movement
How's it going? Updated anything yet?
2
@AlexM. scale?
00:23
yeah just be sure to always keep it positioned properly
@hasherr it was ok. I'm kind of burnt out on it for now lol :p
imagine some sort of piece of elastic material
and someone pulls one of its extremities
it's the same effect
@Grey It's okay. Just work on something else until you get back into it. I'm dropped off of DPA for now
@AlexM. Okay I'll give it a go
you can definitely get more realistic effects with those splines
but I'm sure a shader is overkill
00:25
hrm. k then
@Grey Do you know of anybody else who muted me? :(
Hooke's law is a principle of physics that states that the force F needed to extend or compress a spring by some distance X is proportional to that distance. That is, :F = k X, where k is a constant factor characteristic of the spring, its stiffness. Hooke's equation in fact holds (to some extent) in many other situations where an elastic body is deformed, such as wind blowing on a tall building, a musician plucking a string of a violin, or the filling of a party balloon. An elastic body or material for which this equation can be assumed is said to be linear-elastic or Hookean. Hoo...
also this
@hasherr i don't think so
Well, now I'm paranoid
00:34
lol
Hmm, my pong is being funny
how so
What happens is that my ball ends up touching the pong paddle but my collision handling is too fast so the ball ends up bouncing forward and back against the paddle until it either gets out and glitches and goes off map
hmmm
man I'm sleepy but can't get myself to go sleep
00:44
@Grey What do you think?
@hasherr Record prev pos and when you get the collision set it to the prev pos and reverse ur vel
@Grey Saving the old position is a pain.
Previous at: 503.7646, 139.4233 Now at: 503.7646, 139.4233
Previous at: 516.10785, 117.6877 Now at: 516.10785, 117.6877
Previous at: 528.6478, 95.60566 Now at: 528.6478, 95.60566
lol
I'm honestly not sure how to do that
okay
so you have current and prev
//redacted
00:49
@Override
public void update()
{
    handleWallCollision();
    pos.x += velocity.x * Gdx.graphics.getDeltaTime();
    pos.y += velocity.y * Gdx.graphics.getDeltaTime();
    System.out.println("Previous at: " + previousPos.x + ", " + previousPos.y + " Now at: " + pos.x + ", " + pos.y);
    previousPos = pos;
}
What's wrong with that?
Take the previousPos = pos and put it on top of handleWallCollision
Previous at: 54.027756, 311.99744 Now at: 54.027756, 311.99744
Previous at: 66.52784, 289.9857 Now at: 66.52784, 289.9857
Previous at: 54.85086, 269.42334 Now at: 54.85086, 269.42334
Yeah that didn't work.
@Grey See what I mean?
Yes
What does handle Wall collision do
Makes sure that the player can't leave the boundaries
public void handleWallCollision()
{
    if (pos.x <= 0f)
    {
        velocity.x = -velocity.x;
    }
    if (pos.y <= 0f)
    {
        velocity.y = -velocity.y;
    }
}
woops, that's the old method
Okay nvm lol. I thought you were messing with the position in there. MUCH WEIRD. NO DICE.
00:55
Yeh
I'm not sure what to do
okaywait
System.out.println("Previous at: " + previousPos.x + ", " + previousPos.y + " Now at: " + pos.x + ", " + pos.y);
previousPos = pos;
You had this originally right.
Okay do this, but print your stuff out after you set previousPos to pos
Previous at: 63.258484, 123.0803 Now at: 63.258484, 123.0803
Previous at: 50.825546, 144.97382 Now at: 50.825546, 144.97382
Previous at: 38.44003, 166.78383 Now at: 38.44003, 166.78383
Grey no
ffaaak
Bad grey!
:((
00:57
:(
I don't get it either.
wait
It works
I think
Nope
Do you except the previous position to be such a significant change
Tell you what
do something like:
if(k pressed)
offset x by 5
do it now and tell me what happens.
Wait, what?
I basically want you to make your ball jump
01:00
why?
just do it v=v
It's a test.
I'm not sure what you were trying to accomplish with that
Same thing?
JYeah
WHYY
SO post?
I guess :/ I should know this tho lol
He's asleep I think
01:04
?
a taker
goodluckmatt
bails
>_>
@MattD Recording Previous Position
<_<
@MattD You want to help with the not-so-complicated pong issue?
Before I make yet another stupid SO post?
01:05
sure
i havent had a chance to look at your other stupid SO post
i was busy getting drunk last night
im also at work, but ill do what i can
What happens is that my ball ends up touching the pong paddle but my collision handling is too fast so the ball ends up bouncing forward and back against the paddle until it either gets out or glitches and goes off map
hehehe
i knew that would be the problem
because its the first problem everyone has with collision
01:07
theres two parts to the collision process
Yeah
a) there's the detection of a collision and
We're having trouble with it :P
b) there's the resolution of the collision
public void handleBallCollision(Ball ball)
{
    if (ball.boungingBox.overlaps(boungingBox))
    {
        ball.velocity.x = -ball.velocity.x;
    }
}
01:07
its quite possible to detect collisions and decide to not do anything about it
This method is inside of my playerPaddle class
is that a member of something?
ok
i find physical examples help here
RuneScape
Which of these two RuneScape Community J Mods would you side with in an event?
none
So it takes the ball object, detects the collision, and then handles the ball's velocity like you'd expect
get yourself a coffee cup lid, or a tennis ball
01:08
siding with any one of them means kissing official ass
something round
I have a ball on my desk
right. now you need something to bounce it against
Wall on my left
got a pad or something
wall wont work
you see, the problem is that the bounding boxes overlap. which means the ball is, by the time you detect that there's a collision, partially inside the wall
01:10
What do you suggest? I have a clipboard around here somewhere
I see
so, in reality, you can throw the ball against the wall, and the ball bounces off the wall (after compressing against the wall slightly). in games. you throw the ball at the wall, and we wait for the ball's bounding box to intersect the wall's bounding box (which means the ball is partially inside the wall) and then we decide to make it look like the ball bounced off the wall
So I need to detect when they touch, not when they overlap.
no. thats almost impossible
what you need to do, is work out when they touched
because then you can work out where they touched, and then you can move the ball back to that position, and then change its velocity
alright
Partially troll thing I said.
sorry
so. you have the starting position of the ball BS. you have the end position of the ball BE. somewhere along the line described by BS and BE we have the point where the edge of the box, intersects with the edge of the wall.
oh that reminds me.
01:13
Right
the other thing we dont want to use is use the bounding box at BE.
we want the swept volume of the bounding box from BS -> BE
because when we collide that with our wall bounding box. its much easier to work out where the collision actually happened
so when you throw the ball against the wall
the ball's discrete motion every 1/30th of second can be described as a capsule
the wall's not moving. so we can describe that as a plane
Well the wall is moving in this case
now we can work out where along BS -> BE the plane intersects
same deal then. the paddle "sweeps" an area
and you're comparing the swept area against the swept ball
now this is where it gets fun
because both objects are moving
Suree.
yar
01:16
so, lets say you take two balls. and you throw them so their paths will cross. but you throw one ball much faster than the other. if you sweep the areas of their motion, you would come to the conclusion that they actually hit each other. but where in time they cross determines that they actually didnt
collision is all about time :)
Sure.
so, what we're trying to do is find out when a collision occured. and then if a collision occured, and where it occured. then we can use that information to resolve the collision
but you kinda see that in your head right?
Yeah
right. so the maths for this are very well documented, and searching for it in google will get you the required maths
It's like a crime scene. Get a call at a certain time. Find out if the call was real. Investigate it to find out where it happened.
01:19
exaclty
it gets more fun when there's multiple things in motion
so, what you do is "broadphase" collision, which is typically very fast, but very innacruate. to throw out things that really wont collide
then, you sort your collisions by time
then, you do narrowphase detection which works out if things actually did hit
now. its possible that one object was marked in multiple collisions. and since we've altered the path of that object, we can remove it from any further collisions that happened later
(or we can resimulate, bu no one bothers to do that)
so, capsule/swept rectangle is broadphase
I'm writing on my whiteboard how I would implement this
then working out exactly where there was a collision is narrowphase
The thing that confuses me is the timing
hehe
the sweep of the capsule is time
well, its motion over time.
so, if the intersection is bang in themiddle of the capsule, it was at exactly half the timestep
Now I'm confused again
I just don't understand the implementation for that.
01:22
(also, the timesteps we're talking about are so small that you can cheat a lot)
swept sphere collision stuff is really really really well documented
I'm not using spheres, what about rectangles?
same concept
a sphere is just a little easier as you can assume distance from a single point
are the OOB or AAB
ok
here's one of the best collision tricks i ever learnt
I didn't think there was this much to it
01:25
there's a thing called the separating axis test. and it does what we're talking about. finds the axis between two things and then works out where they intersect
but there's a really really cheap way to fake it
alright
imagine your balls bounding box
in your pong game "space"
if you were to flatten that 2d object into a 1d line. by projecting the box down to the X axis, and across the Y axis.
we'd have a small line floating in space right?
Um... sure?
I'm having trouble visualizing flattening a 2d object into a 1d line
we'd have two small lines, one marking the flattened position on the X axis, the other marking the flattened position on the Y axis
flattened position?
so. you know how your browser has a scroll bar?
Yeah, of course
01:28
on the Y axis, your bounding box would look like that
Okay
on the X axis, your flattened line would be the same thing. just under the box
like a shadow
okay
So we have 2 lines
if you took a light. and shined it down from on top of the box. itd cast a shadow under the box on the X axis
and if you took a light and shined it onto the left side of the box, itd cast a shadow on the Y axis
thats basically flattening the 2D object down onto its cardinal axis
Okay...
01:29
ok. so what we then do. is we take the paddle. and we do exactly the same thing. and draw another line on the X axis, and another line on the Y axis
and we look at the X axis and go. HEY THESE LINES OVERLAP
if we look at the Y axis. and go HEY THEY OVERLAP HERE TOO
we've got a collision
...
that's just detecting it though
kind of
but where the intersection occurs tells us a lot as well
I already understand that, I want to know how to get the time
well that tells you the time ;) if you're using swept "lines"
And I have to go in a few minutes, I've spent all night working on this when I should've been working on other things.
01:31
hehe
this took me 6 months to work out on my own
and when it clicked
it was like lightbulb. and ill never forget it.
Why when I look up 'Basic Pong collision' on Google does it come up with people saying
    public void handleBallCollision(Ball ball)
    {
        if (ball.boungingBox.overlaps(boungingBox))
        {

            ball.velocity.x = -ball.velocity.x;
        }
    }
fixed their solution
I found at least 5 people saying that.
Not one of them learned about Sweep collision or anything like that
what im trying to tell you is the complicated and correct way of saying "move the ball backwards along its motion until it stops colliding with the wall, then change its velocity and simulate it for as much time as you moved it backwards"
which is why just changing the velocity doesnt work
because the ball is still inside the damn wall
But it works for them.
Right, but how do I get it out of the wall?
01:34
move it backwards along is line of motion
Until what?
it stops colliding
And that's the point where you place it?
which is what we're trying to do by finding the time of actual collision, we're skipping the iterative approach of just moving it backwards, and working out exactly where to place it
yes. and if you want to be correct you can simulate it for however much time you just rewound
Your use of the word time confuses me. You make me thing that it is actual time.
01:35
well it is
Like the time of collision, where you're really referring to it as a place
no, i mean time.
Moving backwards in time sounds hard
one last thing. games work in discrete timesteps. 30fps is 1/30th of a second. so we have a snapshot at T0, and we have a snapshot at where we think T1/30th is. there's still 33ms between those snapshots.
so, within that discrete timestep, im moving my objects along a path over time. over that 33ms. and I can pretty much assume linearity unless there's insane acceleration. so. i can pretty much assume that the middle of the path my ball takes, is equal to half the elapsed duration of the discrete timestep
That makes no sense to me.
HALF your path = time?
01:38
yes. because the path is your motion for that timestep
the ball has a location at the begining of the frame
and it has a location at the end of the frame
I don't know anymore. Thanks for the help, I'll think about it later.
we can draw a line between those two points.
that line is the motion of the ball, over the time of the timestep
I don't see how you can draw a line between time and a position
if we had half as long a timestep, we'd only travel halfway along the path
well, thats what simulation is ;) its also what integrating/differentiation is
Welp, I'll talk to you later.
01:40
if it takes me an hour to drive from here, to your place
and i drive for half an hour
how far have I gone?
Halfway
But how the hell do you get position out of that.
if i have a ball, that takes 33ms to move from point A to point B, how long did it take to get to the middle?
so. if i take two lines
and those lines describe the motion of two balls over 33ms. and the lines intersect each other at exactly in the middle. when did the collision occur?
16.5...
Stop talking
Going to shower to think
01:42
think about what happens if the lines intersect at halfway for one. and 3/4 for the other
time and position are intrinsically linked. meters per second
distance per time.
have fun man :)
oh yeah. exploding brains. ... and hey its lunchtime!
02:08
@MattD I mostly understand what you're saying, but code implementing is gong to be soul-crushing.
am I the only one here who zooms in on sites? I kinda have to zoom in on all of SE (125%) to get a comfy experience at 1440x900 on a 19" monitor
Pip
Pip
meh
I get good default resolution on my 1600x900 monitor
I find that it's easier to read text if it's big; I don't think I have sight issues
it's just that I kinda register characters more easily if they're big
I don't have to try as hard to read them
Pip
Pip
I gotta go to bed, night all
night @AlexM.
02:17
yeah me too, nite
 
1 hour later…
03:22
@hasherr nah. its mostly pretty simple. as i said, its well documented on the interwebs
@hasherr also, these days i just use box2d ;)
 
5 hours later…
07:58
hello
hi
whatsup
not much
I just woke up
Hey Lasse, endrohat
08:05
hi radical
heya
It's afternoon here, but even I just woke up :p
I'm trying to get a lot of sleep before the jam :P
Heh cool
and it's only 10am
08:15
i just had lunch
08:33
@endrohat, are you working on some game ?
yes
a clone of "dangerous dave"
old dos game
I remember the game
What are using to make it?
libgdx
Ah okk
I remember playing 'dangerous Dave', it was nice
ya. i knw
what about you?
08:43
Working on a little word game for ios. And thinking of stopping my 3d engine project :/
Stopping it and working on a game instead :p
@lasse, planning to use Opentk for the jam?
yeah
Cool
I probably won't have more than a few hours over the whole weekend, for the jam :(
what are you using to make your word game?
08:48
Uikit actually. Graphically it is a simple game. My friend has been working on it mainly, and I am now helping in some areas
oh ok
Where in India are you from, if you don't mind me asking?
mumbai
Ok.. I am from Delhi
ok. cool

« first day (1274 days earlier)      last day (4040 days later) »