<- 1  -   of 3455 ->
^^
vv
List results:
Search options:
Use \ before commas in usernames
in the end I actually went for precomputation, because if you compute the position of the ball in real time as the shot is taken you can get into a situation where the ball gets stuck or whatever and then what do you do? you can't backtrack to an earlier point in the shot and change it so the ball doesn't get stuck because you've already drawn the ball to the screen in its currently computed position.

so I went for an approach where the shots are precaculated to completion in a separate thread and only actually animated once you have a successful solution for the entire shot. then the main thread picks up the completed shot from the physics thread and only then does it start animating the ball
using two threads was sort of necessary as well because it's a multiplayer game, so you can't allow the physics computations to stall the main thread since that has to do a guaranteed 60 fps on any shots which are currently running
but yeah I'm not going to pretend I planned all this out beforehand lol. I had to make all the mistakes first before I could avoid them
Edit history:
Turtle: 2015-12-01 01:43:24 pm
I like turtles.
Quote from DJGrenola:
I'm sure that my solution is really sucky and inelegant compared to box2d or some of the other open source 2D physics engines but if I'd have gone for off the shelf solutions like that I would have learned nothing

I've come to believe that there are no elegant "100%" solutions, only degrees of cleverness in hiding their inelegance.

Quote from DJGrenola:
in the end I actually went for precomputation, because if you compute the position of the ball in real time as the shot is taken you can get into a situation where the ball gets stuck or whatever and then what do you do? you can't backtrack to an earlier point in the shot and change it so the ball doesn't get stuck because you've already drawn the ball to the screen in its currently computed position.

so I went for an approach where the shots are precaculated to completion in a separate thread and only actually animated once you have a successful solution for the entire shot. then the main thread picks up the completed shot from the physics thread and only then does it start animating the ball

That sounds kind of like how, in the platformer I'm working on, collisions take the player's current position plus their rate of travel to ensure smooth collisions that don't get one stuck in the wall - you never move too fast to be caught by the wall's hitbox because it starts checking for the collision at a bigger distance proportionate to your movement speed.

Unless it's not like that at all.

Quote from DJGrenola:
but yeah I'm not going to pretend I planned all this out beforehand lol. I had to make all the mistakes first before I could avoid them

Story of my life doing my senior project a few months back.  Managed to write a far better (cleaner, anyway) platform engine in a week over the summer just applying what I learned from doing everything sloppily the first time.
Quote from Turtle:
Quote from DJGrenola:
I'm sure that my solution is really sucky and inelegant compared to box2d or some of the other open source 2D physics engines but if I'd have gone for off the shelf solutions like that I would have learned nothing

I've come to believe that there are no elegant "100%" solutions, only degrees of cleverness in hiding their inelegance.


yeah I'd agree with that, and I think a lot of game developers would say the same thing. I remember carmack talking about the ragdolls in doom 3 and how he was completely against using them because you get these pathological cases some of the time where the damn things don't stop twitching. but they found ways to make them reliable, which almost certainly amounted to a bunch of ugly hacks.

Quote:
Quote from DJGrenola:
in the end I actually went for precomputation, because if you compute the position of the ball in real time as the shot is taken you can get into a situation where the ball gets stuck or whatever and then what do you do? you can't backtrack to an earlier point in the shot and change it so the ball doesn't get stuck because you've already drawn the ball to the screen in its currently computed position.

so I went for an approach where the shots are precaculated to completion in a separate thread and only actually animated once you have a successful solution for the entire shot. then the main thread picks up the completed shot from the physics thread and only then does it start animating the ball

That sounds kind of like how, in the platformer I'm working on, collisions take the player's current position plus their rate of travel to ensure smooth collisions that don't get one stuck in the wall - you never move too fast to be caught by the wall's hitbox because it starts checking for the collision at a bigger distance proportionate to your movement speed.


I've also learned that collisions are always a bit of a pig. pretty sure mine took three rewrites before I got them right. having a ball collide with some irregularly shaped scenery and having to compute the normal angle so you know how it bounces off the scenery definitely took a few tries. there's a lookup table involved in that also to get the performance up, it really wasn't the trivial thing I thought it would be.
Club 27 Goals
wtf, now that chick that sent me the fanfics started talking to me about how grimy and dirty she is, and really needs a shower. I mentioned how I love to wash girl's hair in the shower, so she wants me to come over to wash her hair and receive oral sex in return. I told her that sounds nice, except that she lives like 18 hours away. So then she started sending me pictures and videos of her in the shower.

Mind you this is the same chick that said since she's like 26 she's too much older than me to date her.

Apparently she was just doing this to "Help out" with my breakup.
red chamber dream
oral? what are you guys, 14?
red chamber dream
this is what i was talking about earlier, i would love to know what goes through a chick's mind when she offers a guy oral only

who the fuck wants that lol
Club 27 Goals
well she was saying she's tired and shit too, so it would be like a self-service thing I guess?

She went into much more detail and more things after that, but yeah.
Club 27 Goals
I'm pretty sure she's just pushing my buttons to see where I cave in, since I'm perceived as a lonely single now.

but hey I mean, she is really cute, and well endowed, so I'm not complaining.
red chamber dream
i wouldn't worry about it because she's just fucking with you anyway

i mean you live 18 hours apart
red chamber dream
yeah heh
Club 27 Goals
so my grandma gave me $600 for christmas early, so I could go travel to another state. I already have $200 credit with an airlines.
Club 27 Goals
what state to travel to go

perks of colorado is weed, although my job does drug tests once in a blue moon
Club 27 Goals
and I can't pocket the $600 or use it for anything else, has to be for traveling somewhere
red chamber dream
you are free to stay with me if you do wanna get summa dat danky dank
Club 27 Goals
idunno I've heard some crazy stories from bios
Club 27 Goals
and would bios be okay with that?
red chamber dream
we're taking a break

(so his anal fissure can heal)
Club 27 Goals
I wonder how long drug tests go back before. There's gonne be one at the end of Jan when I get promoted.

I knew I should've went through with that green card, I just didn't wanna pay the fees and shit.
red chamber dream
uhh if you're getting tested in jan i hope you haven't smoked lately

usually takes 60-90 days
Club 27 Goals
it's been a couple weeks, and wasn't much. was just some edibles too
red chamber dream
you're probably fine then
red chamber dream
if you don't smoke much at all, it's like 30 days, especially if you exercise a lot
Club 27 Goals
goddamn, I've been so lazy lately. it doesn't help I make waffles like every night now