• Advertisement
Sign in to follow this  

Unity examples/tutorials for a C++ programmer?

This topic is 1661 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

I'm a C++ programmer and I wanted to try Unity. I have watched the standard Unity tutorials (from their main page).

 

Do you know any good "source codes" to download? I find these very hard to find... I just wanted to download a few projects and check how it's done (theory can get you so far, checking how others did is a better way to learn to me). Especially something that is not 3D (I'm doing mostly 2D/GUI/text based strategies).

Share this post


Link to post
Share on other sites
Advertisement

Why not just download Unity and try it out ? , it comes with an example game and if you got some programming experience allready you can just jump in head first. (its not that difficult)

Share this post


Link to post
Share on other sites

Why not just download Unity and try it out ? , it comes with an example game and if you got some programming experience allready you can just jump in head first. (its not that difficult)

Yes I did it. It's just that is seems they have just this one/very few examples only. And none of them are 2D stuff.

Share this post


Link to post
Share on other sites
Yes I did it. It's just that is seems they have just this one/very few examples only. And none of them are 2D stuff.

 

iirc, Unity doesn't have a dedicated 2D Library, (or didn't last time i checked) you have to use the GUI side of it if you wish to use it for 2D.

Share this post


Link to post
Share on other sites

 

Yes I did it. It's just that is seems they have just this one/very few examples only. And none of them are 2D stuff.

 

iirc, Unity doesn't have a dedicated 2D Library, (or didn't last time i checked) you have to use the GUI side of it if you wish to use it for 2D.

 

 

You can also set a camera to use orthographic projection + there are some 2D libraries / plugins in the asset store.

 

Allthough for a 2D game there might be far more suitable engines than Unity out there.

Edited by SimonForsman

Share this post


Link to post
Share on other sites

I learned as I go. It might feel a bit strange to work with unity from the start, but once you get used to how things are handled internally, it's pretty easy to do stuff. Eventually you will know what you want to achieve and with a big community like unity has, it only takes a google search like "unity3d how to make object follow the mouse" and you will get plenty of hits that can help you out or refine your search.

 

As for tutorials, I found that the videos on burgzergarcade were ok to start with and get a grasp on how things work (check out the hack and slash one)

Share this post


Link to post
Share on other sites

Unless you are set on using Unity for 2D, if you already know C++, why not just use SDL and/or OpenGL for your 2D game?

 

If you want it to work on webpages (and without a plugin), have a look at using the Emscripten compiler. One of my personal projects is to re-implement the Unity API using C++ and the above technologies. So far I have found them to be very capable.

Edited by Karsten_

Share this post


Link to post
Share on other sites

Correct me if I am wrong, but considering what I've read into Unity Community forums, Unity uses C# instead of C++. Hopefully, there'll be a way to combine Unity with C++ but this is not the official way of doing things. Again, maybe I'm wrong. I've never make use of Unity, so ...

 

Let me quote some posts that might be helpful for you:

You don't really use C++ in Unity. You can in certain specialized cases, such as plugins, but not for scripting. And definitely not for Flash.

Short answer is no, you can't use C++ with Unity. In Unity, you can code in C#, UnityScript or Boo. You then deploy the same code to all the platforms supported by Unity. It does the conversion for you.

That said, I think that's the reason why you don't find many resources available for C++ in Unity. 

Edited by Zeldforged

Share this post


Link to post
Share on other sites

I've been using Unity with C# for about half a year and now moving back to C++. I can give u source code for this project  if you want: 

 

Mainly it's just trail and error. To make it 2D you just change in camera properties to Ortho.

 

Mainly unity is good because it supports wide range of platforms like Android, iOS, Windows, Mac, Linux... it is good engine to know since it is quite popular among small companies. But C++/SDL/OpenGL is much much more important to know :)

Share this post


Link to post
Share on other sites

I've been using Unity with C# for about half a year and now moving back to C++. I can give u source code for this project  if you want: 

 

Mainly it's just trail and error. To make it 2D you just change in camera properties to Ortho.

 

Mainly unity is good because it supports wide range of platforms like Android, iOS, Windows, Mac, Linux... it is good engine to know since it is quite popular among small companies. But C++/SDL/OpenGL is much much more important to know smile.png

 

Indeed, Unity is great for mobile games since you don't really have to worry that much(most of the time it just works) about the whole cross platform thing and on the Android side they do tons of work to get things working on the extremely wide range of devices out there (Something that can be a major headache to do yourself). On the PC the big advantage really is the webplayer (There are plenty of other engines and also lower level frameworks that offer mac,win,linux support)

Share this post


Link to post
Share on other sites

You can try the 3dbuzz tutorials for unity.  One of them goes through the whole process of making a pseudo 2d space invader style game.   It is very basic but it does cover all the points you need to get started.

Share this post


Link to post
Share on other sites

Correct me if I am wrong, but considering what I've read into Unity Community forums, Unity uses C# instead of C++. Hopefully, there'll be a way to combine Unity with C++ but this is not the official way of doing things. Again, maybe I'm wrong. I've never make use of Unity, so ...

 

Let me quote some posts that might be helpful for you:

You don't really use C++ in Unity. You can in certain specialized cases, such as plugins, but not for scripting. And definitely not for Flash.

Short answer is no, you can't use C++ with Unity. In Unity, you can code in C#, UnityScript or Boo. You then deploy the same code to all the platforms supported by Unity. It does the conversion for you.

That said, I think that's the reason why you don't find many resources available for C++ in Unity. 

 

He says he is a C++ programmer wanting to do something in Unity, not that he wants to use C++ in unity.

 

Or that's what I got from it at least :)

Share this post


Link to post
Share on other sites

You can't program C++ with Unity.

 

Just learn some basic JavaScript (it's very easy, especially from a C++ background) and then read the documentation.

 

If you're having trouble getting "real" games together, look at some tutorials to make pong or other easy games.

Share this post


Link to post
Share on other sites

 

He says he is a C++ programmer wanting to do something in Unity, not that he wants to use C++ in unity.

 

Or that's what I got from it at least smile.png

Correct. I'm just a C++ programmer that looks for examples/tutorials suitable for a C++ programmer's mindset (so without unneeded lenghty explanations like what "if" statement or "bit operator" is biggrin.png). I know Unity uses C#.

Edited by Acharis

Share this post


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

  • Advertisement