# Creating a UML Diagram [closed]

For part of an assignment, I'm creating a networked version of asteroids, I need to include a UML diagram for the design, tbh i dont even know where to begin. How do you start one off?

• The fact that you're making a game of asterioids has nothing to do with needing a UML for your design. You could ask this on SO. Well, except for the fact that "How do you start off" questions are not acceptable. But the, they're not acceptable here either. So... look around online. Dec 6 '12 at 20:04
• I actually do not think the TO’s problem is the beginning with UML. I guess he more has a problem with the beginning of structuring game code. Dec 6 '12 at 20:39
• If it's part of an assignment and you don't know how to do it, you need to ask your instructor. Remember, you're paying them to help you. (or your parents are).
– House
Dec 6 '12 at 21:45
• @Byte56: I do not know what it’s like in other countries, but in Germany the university system has been changed to make people work on practical tasks at home on their own. So it is on porpuse that one should not ask the professor, but instead search for other solutions. We need to solve practical task sheet each week and in the lectures the professor just talks about all theoretical aspects (e.g. he would explain what UML looks like, what arrows there are or maybe also what methods for deducting classes from code, but without examples). Thus, imo it’s totally acceptable asking such a question Dec 7 '12 at 7:25
• Ok well apologies for asking a question like this, the education hasnt been great and approaching the educator leaves me more confused no matter how many times I go, I havent went about creating a UML diagram before and was told I needed one included, so I figured my best bet would be to ask someone on here ... I dont understand why it wouldnt be acceptable to ask How do you start off, i wasnt asking someone to do it for me, just a few pointers ... Will structure questions better in future. Dec 7 '12 at 19:44

UML (as an "assignment") is usually done for software engineering classes, right? And these usually want plain object orientied software design.

So start of with thinking what objects are there in the game and derive classes from them. Like there is a spaceship, so why not having a Spaceship class? Or there are asteroids flying around, so make an Asteroid class.

Of course these two were pretty obvious. A bit more difficult is stuff like the network manager (that one is still ok, you just have to think about what to send over the network and who is responsible), the collision management etc.

Actually, from what I experience this only comes out when you are trying it and see what works and what problems arise. Thus, I do not like UML diagrams that much. They are good, when you already know how something works, but definitely for somebody who just begins in an area. But it’s school, しかたがない (we cannot change it).

Maybe you also want to search for Component-based game design. However, it’s not that easy to understand (as there seem to be different flavours etc.) and I am still trying in practice how it works (best).

So much for the starting point. Hope you get on with it.

Also consider searching for random game framework tutorials on the net to see how game programs usually work. E.g. they are not event based (unlike usual window-click applications), but have a game loop. Some beginning frameworks in my eyes would be XNA for C# (good tutorial base) or pygame for Python.

• Seriously, component based game design for an asteroid game? Dec 7 '12 at 0:02
• Was this what I was downrated for? Or just because I answered a question that many people rated down and somebody thought "Oh, such a stupid idiot, answering a bad question, let’s rate him down". Seriosly, sometimes it would be good to see reasons for downratings to improve, because like this SE is just frustrating for beginners. Dec 7 '12 at 6:54
• +1 For helping even when the question was not well formulated. Dec 7 '12 at 13:03