Jump to content
  • Advertisement
Sign in to follow this  
Olliepm

Unity Things you MUST learn before coding in games?

This topic is 1060 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi!  Just looking for some tips...

I've been learning to program for about a year now, but I come from an audio focused background.  My experience includes making a simple game in Unity using C# and some audio specific programs in C++.  I'm trying to focus more on indie game development now, so I was hoping to broaden my knowledge of programming here.  This would cover all aspects of game development.  I do not need to write my own game engine as I am content with Unity and Unreal for my purposes. 

Specifically I'm looking for a list of key topics to read up on that anyone who intends to make their own games should know about.  For e.g. I know nothing about 3D math because I'm able to build visual geometry using the Unity or Unreal editors without code - I'm not sure whether I ought to learn about it?  Other topics I don't know much about might be general software development concepts or conventions.  An example of something I had trouble with coming from an audio background was understanding how to #include header files, and how linkers work.  I felt when learning about these subjects I was lacking more basic fundamental knowledge, and found it hard to grasp how all of my individual code files were working together.  I'm fine with programming logic, but I could really use tips on how to structure my code according to accepted conventions.  

Anything you can think of that I should know about is worth suggesting.  I'll be able to read up on the subjects in my own time if you could simply suggest keywords to read up on and why the topic is important.  Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Writing games is quite unlike writing any other software.

Most software is written iteratively, with a lot of code reuse.

At least initially you can expect to write a game with no plans for reuse of any of the code, to write once and "throw away".

It is only after a few games you'll start reusing parts as a framework.

Don't get tripped up and fall into the trap of writing an engine from day one. This is the usual newbie mistake and will sap your creative time before you can say "design patterns".

Good luck in the road ahead!

Share this post


Link to post
Share on other sites

The best way to learn conventions and common patterns is to read code made by others, by writing code (and rewriting it for improvements), and getting your code reviewed.

 

Python has a python-tutor mailing list, where new programmers ask questions and discuss problems. Maybe something like that also exists for unity or unreal? (Never used those engines, it's still on my list of 'todo' :) ).

 

If it fits in your plans, you could consider finding a nice game open source project (there are only a few zillions available at the Internet), and read the code, dabble with it, perhaps fix a bug or two. Understanding and modifying existing code is however a related but different skill from writing code from scratch.

Share this post


Link to post
Share on other sites


Most software is written iteratively, with a lot of code reuse.

At least initially you can expect to write a game with no plans for reuse of any of the code, to write once and "throw away".

 

Would you agree that games reuse concepts more than they reuse code?

Share this post


Link to post
Share on other sites

Would you agree that games reuse concepts more than they reuse code?


Yes definitely, and there's certainly nothing wrong with that, especially when first starting out :)

Pong has been done a million times and that makes it no less effective as a learning tool...

Share this post


Link to post
Share on other sites

The best way to learn conventions and common patterns is to read code made by others, by writing code (and rewriting it for improvements), and getting your code reviewed.


Definitely!  I learned a considerable amount from reading through the source files of an open source library I was using.  On the other hand, I feel that without a complete understanding of how the (or any) entire library works, one might be lead to incorrect assumptions or confusion over /why/ code has been structured in certain ways.  

I'm really looking for theoretical topics to study here though.  For e.g. I had trouble with including header files at first for a couple of reasons, but it can be boiled down to this...

What I knew:  typing #include 'myheader.h' will make the code from my header work in the scope of this piece of code
What I didn't know:  ANYTHING about linkers.  

This meant that when one of my included files didn't work, I didn't know how to troubleshoot the problem because I lacked core theoretical knowledge.  I think there are probably similar gaps in my knowledge - I'm just not sure what they are.  All I really know is how to code inside the C++ box, but I lack most knowledge at a lower level. Coming into game programming I at least want to make sure I know how to keep things as optimized as possible and not create any bottlenecks at runtime.  That's all I'm really looking for! 

Edited by Olliepm

Share this post


Link to post
Share on other sites

 

Would you agree that games reuse concepts more than they reuse code?


Yes definitely, and there's certainly nothing wrong with that, especially when first starting out smile.png

Pong has been done a million times and that makes it no less effective as a learning tool...

 

 

That too. But I mean concepts like 2D layering, parallax scrolling, cartesian coordinates, etc. Though they may be implemented differently depending on the hardware (ex: NES, vs PS1 vs PS4), the concept of what those are stays the same.

Share this post


Link to post
Share on other sites

This meant that when one of my included files didn't work, I didn't know how to troubleshoot the problem because I lacked core theoretical knowledge. I think there are probably similar gaps in my knowledge - I'm just not sure what they are. All I really know is how to code inside the C++ box, but I lack most knowledge at a lower level. Coming into game programming I at least want to make sure I know how to keep things as optimized as possible and not create any bottlenecks at runtime. That's all I'm really looking for!
I have an old "The C++ programming language" by Stroustrup, and it goes into depth into C++ (duh), as well as more general considerations when programming. It is also very useful as a reference.

 

As such, a modern version of that book (you definitely want a book about C++11 or C++14 !) is probably useful to you.

 

 

 

Optimization and bottleneck elimination is a big pitfall, http://www.gamedev.net/topic/661044-optimization-philosophy-and-what-to-do-when-performance-doesnt-cut-it/#entry5180845 may be helpful here.

Share this post


Link to post
Share on other sites


I mean concepts like 2D layering, parallax scrolling, cartesian coordinates, etc.


Are those by any chance things I should know about?  

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!