General Structure of a Unity Game

Updated on November 6, 2016 in [D] Game Dev. gossip
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0

This is a really general question,
how should i structure a simple game.

I have troubles structuring my games that they are working fine, currently im doing it by making an game controller with a coroutine that is started when you hit the play button, but it don’t know if i’m doing it right because the implementation of for example the ui always feels kind of strange.

What would you suggest when i create for example a simple highscore android app?
Do you have some tips or what should i take into account?

  • Liked by
Reply
1 on November 5, 2016

Well, I know what you’re going through.
But it’s something that you must learn yourself.
 
There’s not just one structure that works everywhere. And you’ll have to learn what to do in different situations.
The only way to really learn that, is by doing it wrong a couple of times.
(I know, it feels really unfair 😉 )
 
But what may help you is to take a look at some design patterns. These are common ways of solving problems. Here’s a good list: https://en.wikipedia.org/wiki/Software_design_pattern
Good luck!

Helpful

Thank you for the answer.

Show more replies
  • Liked by
Reply
Cancel
2 on November 6, 2016

If I had to weigh in from personal experience I would follow this procedure:
1. Character Controller 
2. Core Mechanics (e.g. collectibles for a platformer or moving platforms).
3. Basic test environment
4. Crude but working testing UI
5. Additional features
6. Everything else
7. Add assets to make it look nice (always do last for efficiency) 
   
Whilst it isn’t Unity, I would suggest that you consider giving this series a little watch as it outlines a person’s experiences in game development and what they learned from years of experimentation. It isn’t Gospel however it works well if you combine it with @Dion Dokter‘s suggested link.
  
As you make more games, it comes a lot more naturally. 🙂

Devoted
on November 6, 2016

What you say is true, but I just want to add onto that a little bit:
[LineSpace]
The art assets to make the game look pretty shouldn’t really be last… Like, yeah, things like the character art should only be added at the end, and before that you should use temporary art. But there are things you need to design first, or it will be very painful to make it look pretty after everything (or almost everything) is done, and the best example I can think of is level design, so I will use that:
[LineSpace]
I first want to say that if you prefer watching a video, you can watch one here. The guy there uses Unreal, but it applies to every engine. The reason it starts at 10:35 is because before that he explain Unreal-related things, which don’t matter here.
[LineSpace]
Now I will start with writing, if you prefer reading:
[LineSpace]
[LineSpace]
1. Prototype Pass: This is the very basic prototype of the level. You don’t care about making it look pretty, just make it work. Then you can get people to play it and make sure it plays good. This is pure gameplay. The layout of your level.
2. Meshing Pass: You add meshes and materials. Here you make it look pretty. You add in meshes and shapes to design how your level. It should look good and have the right shapes of your final level.
3. Lightning Pass: This is where you make everything come to life. You obviously make lightning, play with reflections, lightning, post-processing effects, details, etc.. This is not very relevant to most 2D games, but it’s extremely important for 3D games.
4. Polish Pass:
You add final touches. Like particle effects, sound and basically whatever you can think of. In the video they say you should play with reflections here, but in my opinion it’s something that should only be done in the lightning pass. Though they have way more experience than me, so maybe it should be done in the polish pass.
Other things you need to do: This is not a step, you do this all the time while working on your level, in all the steps. Of course there is scripting, to make your level functional. Actually, that’s all I can think of, I just had to put it in a different category…
[LineSpace]
[LineSpace]
So every time you make a new level that will be in the game (not a test level, but an actual level), you go through those steps. You don’t put that kind of art in the end, because that will be very painful. You can find examples of how the level evolves each pass in the video.
[LineSpace]
[LineSpace]
[LineSpace]
BTW, the reason I make spaces using that “[LineSpace]” thing is because you can’t make line spaces in a reply…it’s pretty annoying. :/

Helpful

@Garakh Thank you for your personal view and for the video series even though i have already watched it 😉

@Or Avirm That structure and the video are great helps to get your level creation done, i will use it when i get to more complex level creations than the ones i’m currently working on.

Show more replies
  • Liked by
Reply
Cancel