UML diagrams for video games

Started by
17 comments, last by Khatharr 7 years, 6 months ago

I've seen UML used on whiteboards and done so myself when describing how systems are put together, but that is very transitory and as a communications tool. That's all UML is, after all, is a communications tool.

Like the others before, I don't see UML in design documents or anything related to the game itself on any regular basis.

Rarely someone will document how a system works. They generally don't use UML formally, but with a UML-style collection of boxes and lines to communicate the relationship. Other times the UML communications diagrams showing how data flows over time will show up, but it isn't common.

Advertisement

I have to agree with what has been said above. Although, I think there exists some tools that spit out UML given source code. If those work,just generating the UML before you show the project to your professor won't hurt you much.

I used something like that for a java project for an assignment. That one was a plugin for Eclipse.

[EDIT]

Oh wait, I reread your question and realised that none of us really answers it directly. You are asking how would you make an UML diagram if you're using something like Unity or UE4? Then an Eclipse plugin for Java won't help you as much : D

Again though, I have to mention that making such a diagram is even more utterly pointless if that is the case.. But too often parts of assignments are, and what can we do?

I'd just put such engine-implemented modules or classes as simple boxes with just their names in them.

Also, when saying UML, I'm just thinking class diagram, not the countless other diagrams that goes in under it. How much are you required to produce? If they require UML-standard use case diagrams, an emotional breakdown is perfectly acceptable :)

Programmer of HolyPoly games.
The way I understand it. UML is a standard. And it explains it self rather very well.
The L wich stand for " Language"
It purpouse it to communicate Modeling. If both participant know UML then they communicate the model to each other.
If only one ore none knows UML but uses there own way of expressing model. Sketches.
Then they need to explane what it means to the Other.

Me thinks in specific branches like game development and small teams The use of it is often not needed.
But in large corporation with huge teams and lot of junior programmers its good thing to speak the same language and know the same modeling language.
In software where there is lot of change and no clear target as in games.
But in large scale bussness software where there is legacy stuf from decades no drastical changes.
But if new employer come in they can read the UML and see the bigger picture or that part of the package or module.

Two fictional examples.
Mostly in UML example they come from bussness side.
Like bank where your department team design the ATM software for specific new ATM model.
In this case the use cases are clear also as it done before for older ATM models .
In your team are two new employers. If corporation uses UML and the new team members knows UML . Communicating the job can be started right on.


Indie dev team of 5 experimenting with new idea going for prototyping a few ideas
How do you usecase gameplay and fun. Where most are self tought programmers and there dev experience are of one man to less then 7 teams . No UML. Sketches wil do.

My experience as first impression of somebody else software base. A DX11 example bundle and framework.
Then I compile that frame work of other dev from internet as DX11 example bundle .

You see long list of project which depend on other projects in that list where some project are end app tech sample demos using the framework project. Mixed in that long list.
With in each project there is huge list of .H and Cpp files where there is no insight of dependancies.

In my own very little pet project it not a problem one project and a short list of files.

My own project are so small I don't need UML. I am alone so for Communicating with myself. Make sense after 6 month I have no clue what I did. If my project got bigger. It would be nice.

i'm a student and i want to develop a project (video game), and the "UML" is mandatory. When using a game engine, how do you "uml" these abstracted parts (physics, tweening, audio players, etc).

Can you be more specific in the part that you're having trouble with / what you've tried so far? What's different about a game engine to the other problems that you've used UML for so far?

If two parts are not associated with each other (physics/audio) then you end up with separate UML diagrams for each part, which is a good thing! This means that each diagram is simpler, and when working on physics, you only have to look at the design for physics.

At a higher level in the engine you might end up with diagrams that tie more systems together -- e.g. Race-Car is a Car, Race-Car has a PhysicsRigidBody. Race-Car has a Audio-SoundSource.

Agreeing and disagreeing with what other people have said above -- UML is used as a tool to communicate, but it is used quite rarely. Often a kind of "pseudo UML" (like pseudocode) is used rather than a strict interpretation of UML...

For an example, here's a very, very early design from our rendering library:

http://i.imgur.com/TRUmPPp.png

http://i.imgur.com/AmJp8Bb.png

http://i.imgur.com/zkSC9fm.png

My share;
I also adopt some of the positive things and use it to illustrate relationships. Like this:
http://www.sierracosworth.nl/gamedev/crealysm11_design_v0.4.jpg

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

If two parts are not associated with each other (physics/audio) then you end up with separate UML diagrams for each part

In gamedev as in a lot of software design, these connections can be kind o wooly.

For example, audio might be considered separate from the physics until you consider that it might be tied in with volume of an explosion based on distance and physical properties such as it's force and maybe a direction vector (for example, shaped charges, reflections of an explosive force around a corridor). Also, there's the fact that different surfaces and shapes of room reflect sound differently so it can also be associated that way for example with reverb effects.

Perhaps that's a little too advanced for 99% of games, though...

I am a bit on the fence. I am with the majority here in that I am strongly against class diagrams, and I also hate flow charts. On the other hand I quite like creating informal use case diagrams to flesh out systems I am designing. I find that this saves me quite a bit of time and headache when making decisions. It also has the benefit of providing a much clearer picture of system interactions and designs than merely having some easy to read code would be.

Perhaps strictly formal UML diagrams are too much of a hassle, however diagrams with clear intent and purpose are quite useful no matter how you try to spin it. Just don't waste your time writing class diagrams, they are the biggest waste of time a programmer could possibly know. Diagram interactions, not definitions.

Just don't waste your time writing class diagrams, they are the biggest waste of time a programmer could possibly know. Diagram interactions, not definitions.

If you create a diagram of definitions, you're automatically documenting whole sets of implied interactions.

informal

A-OK

void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

This topic is closed to new replies.

Advertisement