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

2D polygon collision detection and rigid body dyna

43 posts in this topic

hey chums, I'm currently writing a 2D collision and rigid body demo and tutorial, you can download the demos, code, docs here http://uk.geocities.com/olivier_rebellion/Polycolly.zip or http://uk.geocities.com/olivier_rebellion/ "2D swept+overlap polygonal collision and response" what it does... - 2D swept and overlapped convex polygon collision detection. - local-space collision tests. - exact contact point calculations. - 2D rigid body dynamics, with friction and restitution and all. - segment-polygon intersections (for modelling bullets and other particles). it starts from relatively simple (separation axis method for overlap detection), and builds up to the rigid body dynamics. I will extend the docs to give a complete overview of the code. It should make its way to jnrdev when no_skill will have time. In the meanwhile, I'm still in the process of completing the doc, which stops at collision detection and basic arcade physics. I'm also thinking of implementing joints later on. have fun!
0

Share this post


Link to post
Share on other sites
Excellent demos :) You have alot of docs on it too, Ill probably read through them when I come to the physics in my 2d engine.
Regards.
Ash.
0

Share this post


Link to post
Share on other sites
Thank you olii for sharing.

You deserve a higher rating for your constant contributions on collision detection methods to the community!
0

Share this post


Link to post
Share on other sites
Quote:
Original post by owl
Thank you olii for sharing.

You deserve a higher rating for your constant contributions on collision detection methods to the community!

Agreed. The post you made when you initially presented this in a thread on the for beginners forum helped me a lot.
0

Share this post


Link to post
Share on other sites
I've updated the docs, and finally agreed on a structure for them :)

All docs will now be written in HTML directly (word6 HTML, mind you).

...I'll use this thread to keep you guys up to date with the progress.
0

Share this post


Link to post
Share on other sites
what contact forces? :) I'm thinking of using a penalty method, by inserting a spring between two objects that overlap at the contact points. 'But', I really want to do this right in the long term, so I'm considering other methods, like constraint based. At the moment, I'm just pushing the objects apart, which is fine but will brake in extreme cases (massive objects standing on small light objects, high gravity, ...).

I'm also thinking of iterative methods to resolve contacts, but I've got to think about it.
0

Share this post


Link to post
Share on other sites
Another great tutorial… easy to read, easy to understand and although I am yet to put the code into action I imagine, judging by the demos provided, that it is very effective.
Are you planning to extend and explain how one might handle rotating objects (as seen in the demos)? I imagine that might prove quite useful.
On a side note, a friend of mine downloaded the demos only to find that they did not run correctly. Apparently the first program (bin folder) works fine, but in the other two the polygons move about shrinking to nothing and then re-growing. Any ideas on that one?
The only criticism I hold is that, within the articles, your sentences sometimes begin with capital letters and other times do not. It doesn’t exactly matter anyhow.

Jackson Allan
0

Share this post


Link to post
Share on other sites
Oli,

Let me give you some advice. You seem to post a lot of info here for free, and it's your right to do so, but consider who's reading your articles. One, people who are competing with you in the game development business (you are in this for profit, correct?) And two, people that have no business writing games, because they're not good at it. This has negative effects in the community. It creates a lot of noise which makes it harder for legitimate developers to get noticed. It floods the market with poor quality games which in turn makes the consumers reluctant to try more independent games. So I ask you to reconsider your position. You have talent, that's great, but don't give the answers to the jocks and retards, it's really not helping.

--Bart
0

Share this post


Link to post
Share on other sites
Quote:
Original post by bpj1138
Oli,

Let me give you some advice. You seem to post a lot of info here for free, and it's your right to do so, but consider who's reading your articles. One, people who are competing with you in the game development business (you are in this for profit, correct?) And two, people that have no business writing games, because they're not good at it. This has negative effects in the community. It creates a lot of noise which makes it harder for legitimate developers to get noticed. It floods the market with poor quality games which in turn makes the consumers reluctant to try more independent games. So I ask you to reconsider your position. You have talent, that's great, but don't give the answers to the jocks and retards, it's really not helping.

--Bart


I'll just go ahead and strongly disagree. I appreciate Oliii's advice and insights. I consider myself neither jock nor retard. I'm not an idiot or newbie, but I don't work professionally. I feel that if you have something good to share, you should share it. I plan to write some tutorials soon myself, since i feel that A) it teaches those with less knowledge, and B) gives the real pros a chance to rip you to pieces, thereby teaching you.

If you are developing games for profit, your game will shine on it's own if you create it good enough. If it fails, it's not because of all the other games out there. The good ones do get noticed. The cream rises to the top. If it doesn't, it probably wasn't good enough.



[Edited by - leiavoia on June 23, 2004 12:55:08 AM]
0

Share this post


Link to post
Share on other sites
Quote:
Original post by bpj1138
Oli,

Let me give you some advice. You seem to post a lot of info here for free, and it's your right to do so, but consider who's reading your articles. One, people who are competing with you in the game development business (you are in this for profit, correct?) And two, people that have no business writing games, because they're not good at it. This has negative effects in the community. It creates a lot of noise which makes it harder for legitimate developers to get noticed. It floods the market with poor quality games which in turn makes the consumers reluctant to try more independent games. So I ask you to reconsider your position. You have talent, that's great, but don't give the answers to the jocks and retards, it's really not helping.

--Bart


I am not a professional game developer. Does this mean I am a ‘retard’ who does not own the right to make games? I might just dumb the community down a little in my efforts?
To class the people on these forums as either professional developers or those who have no business in game development because ‘they are not good enough’ seems a little absurd. As far as I am concerned anyone who wishes it should has the right to create games – am I allowed to play basketball with a group of friends even though we might not be basketball pros? Or would that be defacing the sport and discouraging spectators? We should be encouraging independent game development, not knocking people back because they might be new and do not have a degree in computer science. The more people interested in game programming the better – it only means we have a larger community, more games to play and more talent to rise before us. I ask you – how does one become an independent developer without beginning at some place? How does one learn if all resources are blockaded? I myself am a hobbyist programmer (of several years) with a completed game behind me. Am I not good enough to continue creating games that others will enjoy because I am inexperienced in the department of rigid body dynamics?
I do not mean offence, and I hope none is taken. I do not wish to start an argument, and I can see the reasoning behind your opinion. I am merely challenging this view of which seems, to me, so illogical.

Jackson Allan
0

Share this post


Link to post
Share on other sites
Very nice oliii!

I'm working on contact forces in a lcp way and it's not getting somewhere so if you do that for me (grin). For me it's a lot of work. I think a penalty method is easier/faster to implement but you seem to have a lot of time :)

Looking forward to see more.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by bpj1138
Oli,

Let me give you some advice. You seem to post a lot of info here for free, and it's your right to do so, but consider who's reading your articles.
--Bart


na, I don't agree. :) See, when I started, and even now, I found the web, forums, tutorials invaluable. Basically, I'm slowly paying back my debt to the community. I am 100% for free and sharing.

I don't own my brain, the company I work for does. I do work in the game industry, but what I'm posting is hardly top secret, so they don't mind. It's advanced-beginner, not exactly ground-breaking, but useful. I could probably, with a lot of effort, make a commercial library in the long term, if only I cared, but first, this is also a learning exeprience, and sharing the code, basically open source, help me improve it bit by bit. So it's not a one way process, I get help and insights as well.

Call me a hopeless leftie, but I don't see it as a money opportunity. :)

about the syntax, format, punctuation, well, I plan on correcting the tutorial once I've got everything in there. The HTML format isn't great either. I'll probably have to use another HTML editor. I've cleaned the code for the first tutorials, and it's coming along nicely.

Next is the rotation stuff, I probably won't explain matrices in great depths, like I didn't write anything about vectors, and just point to some articles on the web. Explaining vectors, matrices, cartesian coordinate systems, trigonometry, polar coordinate systems, seems a bit beyond the scope.

Then rigid bodies, although I'm tempted to just point to Chris Hecker's tutorials, since it's nothing more than an implementation of his stuff.

thanks for the feedback anyway ;)
0

Share this post


Link to post
Share on other sites
oupsy. While doing a major cleanup on the code, I found a major bug in the dynamic collision test. conceptual bug. in short, it's not working :)

actually, it is now :) I just mis-read Dave Eberly's doc on OBB-OBB collision detection. Now it's fixed. The demos has been updated, but not the doc, which will change a bit. Most of the stuff is correct, except the calculation of the time of collision (you have to take the MAXIMUM time, not the minimum), and you also have to test the vector perpendicular to the relative displacement (or velocity) as well as the usual separating axes.

0

Share this post


Link to post
Share on other sites
Just to keep you updated. Demos have been cleaned up, up to tutorial 5. Handling rotations is explained briefly, and two demos are provided for that, since it's an important step towards explaining rigid body dynamics. The rigid body demos still have a few legacy bugs in there, noticeably, the dynamic collision detection, and the inertia calculations.

6 demos are provided, demonstrating the stuff step by step, as explain in the docs. So it's less the anarchy it was once before. :)
0

Share this post


Link to post
Share on other sites
Quote:
Original post by bpj1138
Oli,

Let me give you some advice. You seem to post a lot of info here for free, and it's your right to do so, but consider who's reading your articles. One, people who are competing with you in the game development business (you are in this for profit, correct?) And two, people that have no business writing games, because they're not good at it. This has negative effects in the community. It creates a lot of noise which makes it harder for legitimate developers to get noticed. It floods the market with poor quality games which in turn makes the consumers reluctant to try more independent games. So I ask you to reconsider your position. You have talent, that's great, but don't give the answers to the jocks and retards, it's really not helping.

--Bart


I think ollie has more friends than you.


0

Share this post


Link to post
Share on other sites
another tutorial (number 6), although a short one. How to compute contact points from collision information. Then I can move on to rigid body dynamics. Demo provided.

Also, bug fixes in one of the previous demos.
0

Share this post


Link to post
Share on other sites
another 2 tutorials. The rigid body tutorial (altough, it mostly poitns to Chris Hecker's physics page), and the segment-polygon test, put into action (you get to shoot things).

That should be all for a while. :)
0

Share this post


Link to post
Share on other sites
This is great work, love the demos. I'd like to put this kind of stuff into my games sometime :)
0

Share this post


Link to post
Share on other sites
Hmm, I'm having some problems building the projects!? I have both VC6 and VC7. I tried building it in VC7. But I got errors like:

error C2061: syntax error : identifier 'u_int'

Where's u_int defined!?

/MindWipe
0

Share this post


Link to post
Share on other sites
Quote:

Let me give you some advice. You seem to post a lot of info here for free, and it's your right to do so, but consider who's reading your articles. One, people who are competing with you in the game development business (you are in this for profit, correct?) And two, people that have no business writing games, because they're not good at it. This has negative effects in the community. It creates a lot of noise which makes it harder for legitimate developers to get noticed. It floods the market with poor quality games which in turn makes the consumers reluctant to try more independent games. So I ask you to reconsider your position. You have talent, that's great, but don't give the answers to the jocks and retards, it's really not helping.

allow me to strongly disagree. people like oliii are what make an indie community possible at all. most people who use this wont even be flooding anything, but just learning from it in general. but as other said, true excellence will never have problems rising to the top. unless there is something or somone censoring it...

oliii, this is quality stuff, i have never seen such a torough rigid body dynamics tutorial WITH implementation. stuff like this is going to make you famous in the indy community, im sure :)
0

Share this post


Link to post
Share on other sites
hey olii the article and the demo are really, really impressive. I really appreciate the fact that you have released and continue to release extremely interesting demos along with their source.

Hmm i just tried to compile the demos using VC6 and i have the same problem as MindWipe...
0

Share this post


Link to post
Share on other sites
sorry, u_int is, as you should have guessed :) unsigned int, for lazy typers like myself. It should be define at the top of the Vector.h.

It's all to do with multiple versions of the files, from one demo to another.

typedef unsigned int u_int;

thanks for the feedback. I'll be writing some general optimisations next. keeping the 2D scroller design in mind, I'm thinking of a broad-phase collision filter, and a generic collision system design. Some optimised code for points, segments, and boxes.
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