• 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
butterscotch

How to make a small physics engine ?

12 posts in this topic

I want to write a small physics engine as part of learning exercise. I had physics and mathematics during engineering but have no idea of the interfacing between physics and graphics in games and the practical approach inside the physics engine. I figured out a couple of books namely, 1. Real-Time Collision Detection by Christer Ericson 2. Game Physics by David H. Eberly 3. Methods of Mathematical Physics (Paperback) by R. Courant, D. Hilbert 4. Partial Differential Equations of Applied Mathematics, 2nd Edition by Erich Zauderer, Erich Zauderer I heard they are great, must have, worth the money kinda books but since the money involved aint so small for me i want to make sure if they are useful for starters and aimed towards writing engines. Can you please tell me 1. Which are required, which aren't ? 2. What else should I add to my cart to make it look like a comprehensive course? (My dream book will be "How To Write Your Own Physics Engine in 6 Months") I am working as a software engineer for the last 2 years and i have decided to go into the physics part of games mainly for my interest in these areas. Hope some of you could relate to my situation and give me a good advice on this. Thanks!
0

Share this post


Link to post
Share on other sites
I haven't looked at that books, but I recommend you to read 'Physically Based Modelling' course from Witkins and Baraff. You can get some insights to design your physics engine.
If you want a relatively small physics engine, it's a good starting point.
Graphics system draws something at somewhere, it doesn't care if scene is static or dynamic, and physics system only share that somewhere and keeps updated with the stimulus it gets.
The interface could be to gather the spatial information (state of object and it's physical properties) from the scene and update before rendering. Then you have to expose an interface to apply forces and such to the system.
0

Share this post


Link to post
Share on other sites
Of those you list, I would pick Eberly's book first since it covers practical physics simulation in games. Christer's book is fabulous, but is more about just collision detection. Recommended highly (and I can't stress that enough), but more specialized.

I would not personally want to look at the other two books. Good for theoretical understanding (maybe, they could just be crap textbooks too), but not particularly helpful for practical implementation of numerical physics.

That said, there is another book that I might recommend more than what you have listed here. That book is Eberly's "3D Game Engine Architecture." This is an extremely nice book that talks about good game engine design. The discussion is based on Eberly's own engine, which is very, very well thought out and implemented. He talks about physics in this book as well, though in less detail than the game physics book. What is nice in this book is that he talks about how the engine fits together as a whole, which is helpful for knowing how physics and graphics connect.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by grhodes_at_work
That said, there is another book that I might recommend more than what you have listed here. That book is Eberly's "3D Game Engine Architecture." This is an extremely nice book that talks about good game engine design. The discussion is based on Eberly's own engine, which is very, very well thought out and implemented. He talks about physics in this book as well, though in less detail than the game physics book. What is nice in this book is that he talks about how the engine fits together as a whole, which is helpful for knowing how physics and graphics connect.

Seconded. I bought this book about a month ago and it's been one of the best game-related book purchases I've ever made.
0

Share this post


Link to post
Share on other sites
Maybe look at

Physics Based Animation (Graphics Series)
by Kenny Erleben, Jon Sporring, Knud Henriksen, Henrik Dohlmann

though I haven't seen it myself
0

Share this post


Link to post
Share on other sites
I'm studying Eberly's book, I find it heavy on the maths (he has a nice revision section at the back), but it's a very good book. I'd reccomend it as a beginner in programming physics myself.
0

Share this post


Link to post
Share on other sites
I wouldn't start by writing a physics engine, instead write some simple physics demos.

e.g. modelling a pendulum, a double pendulum, a soliton, a spring...

All of these teach you the basic concepts of modelling a real world object and will help you explore the various methods and there accuracy and instabilities. So look at euler, leapfrog, RK2 and so forth.

I did a computational physics course as part of my degree and it increased my understanding of game engines as a consequence, the methods are basically the same.
0

Share this post


Link to post
Share on other sites
Gameversity.com has a course on building a physics engine. It's start with simple point mass, collision detection, goes to rigid bodies, soft bodies (cloth simulation), and covers rag-doll physics.

The material is written as a book and you get one chapter of the book per week. The book itself is probably worth the price of the class. You also have access to the physics engine code (which you'll need to program some of it yourself).

Eventhough I had most of the books mentionned (which helped me get through the course) I found that taking the course is the only way that I could really force myself to go through all the material in such a short time period (12 weeks). When you have other students working at the same time on their own projects and you see their result, it motivates you to try and do even better.

Good luck!

Shadx
0

Share this post


Link to post
Share on other sites
you can also take a look on this very good game physics articles:

http://www.gaffer.org/articles/
0

Share this post


Link to post
Share on other sites
I have most of the books that have been mentioned above, and have found each to be very useful. However, for the "this is my first physics engine" crowd, I would recommend "Physics for Game Developers". It is on of the O'Reilly books, and although I am not a huge fan of their code sample style, it is an excellent introduction to the needs of a basic physics engine. In saying this, I am guessing that you are interested in writing a basic rigid body simulation. Once you have graduated to that stage, I would recommend moving on to "Game Physics" and "Real-time Collision Detection" which are two of my favorites. I hope this helps.

Scott
0

Share this post


Link to post
Share on other sites
Quote:
Original post by scott_l_smith
...However, for the "this is my first physics engine" crowd, I would recommend "Physics for Game Developers"....


I'd personally recommend not reading (or buying) that book - it's full of mistakes, bad explanations and the example code is badly written, buggy, and barely works etc etc... (using left-handed coord system and imperial units IIRC does not endear it to me...).

That sounds (and is) rather negative, so in an effort to be balance that:

Using the Chris Hecker articles as an introduction, followed by Baraff's siggraph notes and then the decent books mentioned here should give you a good overview of all the basics you need to know, though using these for your first implementation would be daunting. Then there's a bunch of papers (most you can find on the web for free) worth reading - some of which will make everything seem very complicated, and some of which will make everything seem very simple! I'm pretty sure someone who posts here has made a web page with a list of most of the common/useful papers - but I've lost the link - will look for it!

One important thing is to write some little test projects as you go along, starting with simple stuff. They'll give you a code-base - e.g. you'll develop a maths library, and a basic rendering framework for testing - that will make it a lot easier when you come to write the hard stuff. And at the end of it you'll have some nice demos for job interviews :)
0

Share this post


Link to post
Share on other sites
Quote:
Original post by MrRowl
Using the Chris Hecker articles as an introduction, followed by Baraff's siggraph notes and then the decent books mentioned here should give you a good overview of all the basics you need to know, though using these for your first implementation would be daunting. Then there's a bunch of papers (most you can find on the web for free) worth reading - some of which will make everything seem very complicated, and some of which will make everything seem very simple! I'm pretty sure someone who posts here has made a web page with a list of most of the common/useful papers - but I've lost the link - will look for it!

One important thing is to write some little test projects as you go along, starting with simple stuff. They'll give you a code-base - e.g. you'll develop a maths library, and a basic rendering framework for testing - that will make it a lot easier when you come to write the hard stuff. And at the end of it you'll have some nice demos for job interviews :)


I think that is the best recommendation. At least I found it works for my case.
I worked at my little physic demo for the last 4 months and although I still don't have much in it right now (just a couple of stacking cubes and bouncing around), I realized that I learned quite a lot from it. I started from scratch with some articles (Baraff's and Baltman's), some theses (Baraff's and Erleben's) and some nice demos as my "ultimate target" (b34r's and MrRowl's). After a while I bought the two books (Game Physics and Real-time Collision Detection) and i think that all the topics in the books is "nothing new" since you can almost find them in the net in form of articles, codes... (but i still recommend you these books since it will save you some times).

My experiences: Yes I did start with simple things, a small rendering framework, write my own math library (matrix, vector, quaternion,...) and start with collision detection between two cubes (maybe not a wise start) then apply impulse, integrate it and finally after everything work fine, I start to stacking boxes. I'm stopping doing it right now because of my time constraint but I will definitely come back to stacking more boxes sometimes later! It's so exciting...
0

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