• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.


  • Content count

  • Joined

  • Last visited

Community Reputation

123 Neutral

About phestermcs

  • Rank
  1. For aiming, I add wind as if it's constant throughout the ball's trajectory. When the ball is hit, it's possible the wind will change enough during the ball's flight that the ball may go out-of-bounds, just like in real tennis. The player will need to aim more inside the court if they believe the ball could go out due to high winds, which will be rare. Right now I'm only working on 'normal' shots. To hit a given aim point, a stronger shot will have a lower angle than a weaker shot. I use this fact to adjust an initial angle based on the inputted relative amount of power (lower power, higher angle). The initial angle to adjust is determined by the right triangle formed from the starting position, the top of the net, and the top of the net less the height of the starting position, as if there where no downward forces acting on the ball. The shooting algorithm then shoots with maximum power, computes the error, adjusts the power, and repeats, until the aim distance is hit. I then rotate to account for any curving. I'm right in the middle of implementing this, but that's the basic approach I'm taking. I think the same approach will work for lob and drop shots, just with different coefficients used to compute the hit angle adjustment and shooting error correction.
  2. I've attached another doc on measured tennis ball drag and lift coefficients, if you're interested.
  3. Yes. The center is 3' high, while the ends are 3'6". Also, I don't think it's exactly a catenary as the center of the net is actually pulled down taught 6 inches, rather than hanging; the top of the net is straight from the ends to the center. I appreciate your input to and interest of my problem, but don't worry about it too much. I've learned enough since my original post that I probably don't need to implement the two-point boundary solver algorithm described in the attached article; shooting with RK4 will be fine. My real challenge now is incorporating the remaining player's inputs (adjusted by play conditions) into the shooting algorithm; shot type (normal, lob, drop), spin orientation, and a relative amount of power (think %) which is used in combination with a player's absolute max spin and power attributes to proportionally apply the 'power' to both spin rpm and velocity. The shooting algorithm needs to adjust both the translational direction and magnitude based on all this.
  4. The book "Game Physics" by David H. Eberly, includes free-to-use C source for several numerical integrators (and a great deal of other game related routines). The source can be found here for free [url="http://www.geometrictools.com/LibMathematics/NumericalAnalysis/NumericalAnalysis.html"]http://www.geometrictools.com/LibMathematics/NumericalAnalysis/NumericalAnalysis.html[/url]. Also, the book "Numerical Recipes in C++" has (not free to get, but free to use) source for several numerical integrators. Both books do spend some time describing trade-offs, which basically come down to accuracy/stability vs. performance.
  5. Taby, thanks for your continued thinking on this. The approach you've described is somewhat similar to what I've begun attempting. If you, or anyone who has read this thread, is interested in the solution, please let me know and I will eventually post (C# code) here. If not, thanks for your time!
  6. Thanks for your reply. I understand calculus, but I'm not fluent in it. I need to specify the ball's initial position vector (hit point), initial translational velocity (just 'shot-power'), initial rotational velocity vector (spin direction and rpm), and final vector position (aim point), and have returned the initial translation velocity vector (both direction and velocity) of the ball. If my calculus understanding is correct, since both the initial and final positions are supplied, and we're solving for the initial translation direction, the problem is classified as a two-point boundary problem. This is different than solving the same ODE as an initial boundary problem to animate the balls flight, which I already understand how to do using a simple RK4 ODE solver. First solving the ODE as a two-point boundary problem as part if simulating aiming the tennis ball, allows supplying all the initial dependents to solve the same ODE to animate the ball, and ensure it lands where it was aimed, all while considering gravity, air drag, AND the Magnus effect (so spin curves the ball appropriately). I reviewed the link you supplied and the Java code that was associated with it, and I don't believe it's applicable. Again, if my understanding of calculus is correct, while the java code does seem to fundamentally solve a kinematic ODE (computing thrust based on mass) using two points (initial location and velocity, and final location and velocity), the underlying ODE is fundamentally a 1st order, linear ODE, with a closed form solution, and can be solved algebraically (there actually is a way to solve that problem without iteration, see [url="http://wiki.beyondunreal.com/Legacy:Projectile_Aiming"]http://wiki.beyondun...ojectile_Aiming[/url]). I believe my problem is a 2nd order, non-linear ODE, with no closed form solution (thereby requiring a numerical solver) because the forces of drag (from air resistance) and lift (from spin) at any time are derivatives of translational and rotational velocity, both effected by those same changing forces (thus non-linear). The approach described in the article referenced in my original post is specifically intended to efficiently solve this class of ODE problems. My problem is even a little more complicated, in that I need to also ensure the ball's trajectory is above a certain height at a certain time (to clear the net, or to do a lob shot), and because the player's inputs are not absolute, but rather relative values of power and spin rpm. However, those problems will most likely be solved by applying a 'shooting' algorithm over the ODE solver. Do you understand the conceptual approach the article details? I can't tell if it's fundamentally an iterative based solver, can you? I ask because it may, in the end, be more efficient to use shooting with RK4 to simultaneously solve the two-point problem, the above-a-height problem, and determining the absolute translational and rotational velocities (power and spin) based on the player inputed relative power and spin. How well do you understand calculus, kinematics, and implemeting them in software? Regards, Paul
  7. Well, for example: I understand basically how an RK4 ODE solver works, enough to implement one given the 5 basic equations used. That took me about 30 minutes to get, and my primary resource was a couple of paragraphs and about 10 lines of sample code from the book Physics for Game Programmers. The article I attached to my original post is dense in calculus, with no code samples. I'm having trouble deciphering all of it, and by that I mean translating into a computer algorithm. I reason someone proficient in calculus could quickly understand the underlying conceptual approach the article describes; it quite clearly articulates all of the mathematical principles and equations it uses. By your question, I'm assuming that you understand the article, and by your statement, that you believe it would take you in particular much longer than 12 hours to convey that understanding to someone else, someone with anough rudimentary understanding of calculus to understand an implementation of the RK4 alogrithm. Is that a fair assumption? If you do understand the article, how long would it take you to implement (and here I assume you're also quite an experienced programmer)? From over 25 years experience in software development and enterprise consulting, I do not believe my estimate is orders-of-magnitude off, but if it ultimately is, then that's just what it took. If you're offering to actually help in someway, that would be fantastic. Regards, Paul
  8. I'm looking for someone to assist implementing the two-point boundary ODE solver described in this article [url="http://digitalcommons.calpoly.edu/cgi/viewcontent.cgi?article=1002&context=pbli"]http://digitalcommons.calpoly.edu/cgi/viewcontent.cgi?article=1002&context=pbli[/url] (also attached to this post), ideally someone who primarily understands calculus, secondarily programming. The assistance would be in the form of helping decipher the calculus in the above article and discussing its software implementation. Actual implementation would be done by myself. Note the article offers an approach that is more efficient and accurate than using 'shooting' with an RK4 based ODE solver. This is part of implementing a tennis game, and would be used to implement aiming the tennis ball (or more specifically used in determining the initial translational and rotational velocity vectors such that the tennis ball lands where it was aimed). The ODEs to be solved are the kinematic equations modeling tennis ball trajectories that incorporate gravity, air drag, and spin effects (Magnus effect). I envision an adequate person would be able to decipher the above article rather quickly, and estimate the time required to assist in the range of 4-12 hours. I would be willing to more than adequately financially compensate anyone that can help (assuming sufficient prior knowledge/experience). If you believe you can assist, or know someone who may be able to, please contact me as soon as possible. Regards, Paul