scripting and unity3D

Started by
11 comments, last by kop0113 10 years, 3 months ago

Hi again people!

So yesterday I've asked here some informations about physics engines and how to write a game engine. After some research, I understood that for now it would be best to learn a bit how an engine works before trying to write my own engine. So, I've tried two engines: cryengine and unity3D. I didn't like cryengine, so I'll stick with U3D. I've understood some of the basic things and such, but now I'm stuck. I guess that to do all those fancy videogames stuff (like , I don't know, programming the AI?) You need always scripts, am I right? Well, my question is, where do I learn to use those scripts? Give that I can't use C# (but I know C++), is there a manual or something? Because while I'm able to code, I don't know how to make a script for unity. Any book or online tutorials on that? The more detailed the better.

edit: should I try UDK ? Which is more simple? Which is more beginner-like?

Advertisement

The projects on the unity page are quite nice to work through. The first one touches on some of the basic concepts and the third one goes into more advanced coding techniques.

http://unity3d.com/learn/tutorials/projects

There is also a manual that explains the theory behind unity concepts and a reference guide that can be used to check functions and search for a specific behavior etc.

http://unity3d.com/learn/documentation

Thank you! I don't know why I did not find that before. It also contains a stealth game tutorial! Perfect!

edit: may also ask: do I need to learn C#? Or is C++ enough?

Well, when I started with Unity I also only knew C++. You'll find that the syntax is almost exactly like C++. So instead of learning C#, do the tutorials and get familiar with the syntax but focus your efforts towards understanding the Unity API. Because the majority of your programming will be based on functions/variables that already exist within Unity.

Goodluck smile.png

Ok, I'll see.

Given your username and your excitement about the tutorials having a stealth project, I think I can guess what kind of project you'll be working on, taffer...

Given your username and your excitement about the tutorials having a stealth project, I think I can guess what kind of project you'll be working on, taffer...

Oh yes you can!

There is also the Unity Youtube Chanel, wich contains a lot of video tutorials for both scripting and learning to work with the editor.

I suggest for you to watch some of the videos to learn the basic workflow for the engine.

Hope that helps.

Unity is more beginner-like than UDK (by far, in my opinion) and gives you a cleaner way to get code into your game.

All you need is to get good with C# and programming in general, and learn the Unity classes (GameObject and Transform are important). All you've gotta do is write a script and drop it on something in the game to get the code running.

I would suggest using Visual Studio C# Express or MonoDevelop to write your code. They have convenient features that will help you in the future.

Bookmark/favorite these pages, they're very useful to have around for when you need them:

  • This one for the search bar; it lets you search any class in Unity and see all of the methods and variables inside it
  • This one to find information about specific components and how to use them (such as colliders, rigidbodies, lights, etc.)
  • This one for whenever you need to configure your colliders/rigidbodies; it's helpful because at the bottom of the page it gives you a chart of which kinds of colliders will collide with others
  • This one for all you need to know about C# syntax

Also, since I believe you're programming a 3D game, you should know how Vector3's work if you don't already.

[twitter]Casey_Hardman[/twitter]


I would suggest using Visual Studio C# Express or MonoDevelop to write your code. They have convenient features that will help you in the future.

I can also recommend SharpDevelop (http://www.icsharpcode.net/opensource/sd/) as a great free IDE for C#/.NET development.

This topic is closed to new replies.

Advertisement