Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

UML diagram + explanations.

alt text

bonus if I can make it happen in Java.
Also killing panda is bad =)

share|improve this question
Sorry, you're going to have to do better than that to get me to click on your link. Some text? Explanation? Description? – Chris Garrett Jul 23 '10 at 15:11
@Chris it's a legit UML diagram – Bryan Denny Jul 23 '10 at 15:12
Now that i know the name, next time i'll use something more convenient than :s – hide Jul 23 '10 at 15:18
Could you put most of the text into the body of this post? Images work best as additional information, not the entire content. – Colin Gislason Jul 23 '10 at 15:25
up vote 3 down vote accepted

These gameplay features can be broken into several domains:

Collision checking

How do you know that the panda's have met? How do you know the evil hero has slain a panda?

Scene management

How do you keep track of all the entities in a scene? How do you destroy entities? How do you create new ones?

First, scene management. An easy way to keep track of everything in your scene is just to make a list. Then, when you want to make a new entity or destroy one, it either adds or deletes it from the list. Simple.

Then, because you have your list of entities, you can have very basic collision checking by simply checking every item in your list with the other items. Just calculate the distances and see if they're close enough to collide.

And that should give you a general idea of how to solve these problems. :)

share|improve this answer
evil hero? What, just cause he slaid a panda? :) – SnOrfus Jul 23 '10 at 15:56

This is honestly kind of ridiculous. You've gone and created an object hierarchy without even considering how instances of the object interact. Where's your infrastructure? Where are the object containers? How do you handle locality? Et cetera.

Get yourself to interacting non-ojects in the world, then do your abstractions after that. You don't make a car by styling the interior then filling in the mechanics afterwards.

share|improve this answer
About all the question : I don't know ! I can only know what i learned and game programming books mostly don't teach this or i'm not reading the good books/websites. Please just direct me. – hide Jul 23 '10 at 17:46
Also, a lot is managed by the library, lwjgl.slick and as far as i can tell it's fairly similar to XNA, pygame and others. So i don't worry too much about the foundation of a game. – hide Jul 23 '10 at 18:06
But that's what his question was really about, object interaction. – CiscoIPPhone Oct 25 '10 at 16:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.