• 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.
Sign in to follow this  
Followers 0

physics help

3 posts in this topic

hi there. I have been working on a pool simulator in DarkBasic for a while now and it doesnt work correctly. And i cant see why. 


so the problem is that when sliding on the table the balls angular velocity doesnt change as fast as it does in real life ( i have a pool table available so i have checked it over and over. (i also found some highspeed videos online which confirm the error) 


I use the following to calculate the motion of the ball on the table:



V = vector for velocity of ball

W = vector for angular velocity of ball

P = vector for position of ball

Vt = vector for perimeter velocity at contact point ( with table)

r = radius of ball

R = vector from center of ball to the table ( length r)

m = mass ( 0.16 kg )

g = acceleration due gravity ( 9.81)

us = coefficient of friction while slipping (0.2) ( have tried all kinds of values)

ur = coefficient of friction while rolling (0.01)

x is cross product

d is delta

dt = time-step of the simulation ( on the order of 5x10^-5 )


Vt = (R x W) + V

if Vt = 0 then the ball is rolling without any slip

dV = -us*g*dt*(Vt/|Vt|)                                 (Vt/|Vt|) is the unit vector in direction Vt

V = V+dV

dW = [(-us*m*g*r*(Vt/|Vt|)]x R) * (5*dt)/(2*m*r^2)

W = W+dW

if the ball is rolling:

    V = V-(ur*g*dt)*(Vt/|Vt|)


Wz = Wz*(1-uz*dt)               where Wz is the z(perpendicular to table) component of the angular velocity and uz is a friction to slow it down ( nothing in the "real" physics would stop pure z spin)


this seems to produce approximately 10-15 times too weak dW. Why is this?


any help very much appreciated 







Share this post

Link to post
Share on other sites

Where did you get the equation for dW? It's very difficult to dissect the entirety of this problem without knowing where the equations came from.


Share this post

Link to post
Share on other sites

sorry, i will clarify:


from newton, F = ma -> F = m*dv/dt 

Fu = u*N                                                                            force of friction = coefficient of friction times normal force

Fu = u*m*g*(r?)                                                              

cant say i see why the r is there now that i think of it i got this from here where it says so but cant see why? maybe this explains it. with my radius of 0.02857 it would cause quite the difference at least.


Fu x R = torque caused by the friction force

T = I*a                                                                                 Torque = moment of inertia times angular accelleration

T = I*dw/dt                                     

dw = T*dt/I


moment of inertia for a sphere is (2/5)*mass*radius^2


thank you for your time


Share this post

Link to post
Share on other sites

The torque is given by R x F, not F x R.


In the z-direction: N=mg. In the forward direction: ma=-uNv^=-umgv^=f, where f is the force due to friction.

The torque on the contact point is then R x f = -umgr (r^ x v^) = I dw/dt, so dw = -(5ug)/(2r) dt (r^ x v^).


If Ww^ (magnitude and direction) is the current angular momentum, the update after euler integration is [ W w^ - ((5ug)/(2r)) (r^ x v^) dt ].


There is more analysis that could be done, but check if this sign change in the cross product does anything for you.

Edited by deekr

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0