I think ballparks may be my next area to work in after the projects I am working on now.
One great thing is that since ballparks were implemented, browsers have gotten better; most if not all browsers now support a "Canvas" object that lets me draw on it directly. That means I should be able to render ballparks from your dimensions, not just the default look. If I can do that, I may be able to actually show where on the field long hits go.
Chris
I'd like to see evidence of ball park influence
Re: I'd like to see evidence of ball park influence
To help us serve you better, please use the support system for all questions or problems. PMs should NEVER be used. The Support system is always read before PMs.
- mattyb5000
- Posts: 448
- Joined: Sat Sep 30, 2017 11:02 am
Re: I'd like to see evidence of ball park influence
Find that code! This would be amazing!!!Admin wrote: ↑Fri Nov 09, 2018 3:29 amNot necessarily. I actually wrote this code ages ago.ballmark wrote: ↑Fri Nov 02, 2018 3:08 pm I think I'd like a little more specificity. I'm trying to imagine what you mean, and all I can think of are scenarios that would require massive amounts of coding specific to to the dozens and dozens of ballpark designs available to users and then I think about the time requirement that would require of Admin and then I think about the issues we have just keeping the game interface up and running and then I shake my head a lot.
The football sim uses a detailed physics simulation for kicks, so it knows precisely where the ball is when it crosses the plane of the goalposts. I adapted that simulation to baseball, which is a bit different (look up the Magnus effect, it's fascinating), and in tests, I was able to determine exactly how far above or below the top of the wall the ball is. I actually had enough detail to be able to say, specifically, "This ball that would have been a home run in the default park was just a double in this park".
And then.... the code got shoved in a drawer. I didn't have access to the soft chewy center of the sim yet, and it was too much work for too little benefit to integrate my code with Tyson's as they were radically different approaches.
How did this work? Right now, the sim uses five "rays" out from home plate to define a park. So no matter what angles or curves a park has, parks of similar sizes behave similarly. I simply subdivided the park into more rays, overlaid them on the original park drawings (which I did in Visio, so getting precise measurements was easy), and hand-keyed all that data into a spreadsheet. So a stadium with a funky corner would occasionally have balls go into that funky corner and actually behave properly.
The question is whether or not I can still locate this data. (rummage rummage rummage) It's not close at hand. I do have the foul area calculations; that was another planned upgrade that was never implemented.
So it has definitely been on my mind to revisit this.
Chris