Jump to content

  • Log In with Google      Sign In   
  • Create Account


Unity examples/tutorials for a C++ programmer?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
14 replies to this topic

#1 Acharis   Crossbones+   -  Reputation: 3456

Like
0Likes
Like

Posted 27 June 2013 - 04:54 AM

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).


Europe1300.eu - Historical Realistic Medieval Sim (RELEASED!)


Sponsor:

#2 SimonForsman   Crossbones+   -  Reputation: 5970

Like
0Likes
Like

Posted 27 June 2013 - 05:31 AM

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)


I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#3 Acharis   Crossbones+   -  Reputation: 3456

Like
0Likes
Like

Posted 27 June 2013 - 05:56 AM

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.


Europe1300.eu - Historical Realistic Medieval Sim (RELEASED!)


#4 Andy474   Members   -  Reputation: 669

Like
0Likes
Like

Posted 27 June 2013 - 06:11 AM

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.



#5 SimonForsman   Crossbones+   -  Reputation: 5970

Like
0Likes
Like

Posted 27 June 2013 - 07:40 AM

 

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, 27 June 2013 - 07:42 AM.

I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#6 Rld_   Members   -  Reputation: 1378

Like
0Likes
Like

Posted 27 June 2013 - 08:29 AM

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)



#7 Karsten_   Members   -  Reputation: 1552

Like
2Likes
Like

Posted 27 June 2013 - 09:19 AM

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_, 27 June 2013 - 09:21 AM.

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.


#8 Panos Georgiadis   Members   -  Reputation: 150

Like
0Likes
Like

Posted 27 June 2013 - 06:00 PM

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, 27 June 2013 - 06:02 PM.


#9 Konrad Jablonski   Members   -  Reputation: 482

Like
1Likes
Like

Posted 27 June 2013 - 06:42 PM

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: http://www.youtube.com/watch?v=u3vNamukTQs

 

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 :)



#10 SimonForsman   Crossbones+   -  Reputation: 5970

Like
0Likes
Like

Posted 28 June 2013 - 01:24 AM

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: http://www.youtube.com/watch?v=u3vNamukTQs

 

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)


I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#11 Buster2000   Members   -  Reputation: 1584

Like
0Likes
Like

Posted 28 June 2013 - 02:40 AM

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.



#12 Rld_   Members   -  Reputation: 1378

Like
0Likes
Like

Posted 28 June 2013 - 04:13 AM

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 :)



#13 Panos Georgiadis   Members   -  Reputation: 150

Like
0Likes
Like

Posted 28 June 2013 - 04:49 AM

If this is the case, then I'll suggest you take a look at the digitaltutors Unity tutorials.



#14 superman3275   Crossbones+   -  Reputation: 2011

Like
1Likes
Like

Posted 28 June 2013 - 09:39 PM

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.


I'm a game programmer and computer science ninja ph34r.png!

Here's my 2D RPG-Ish Platformer Programmed in Python + Pygame, with a Custom Level Editor and Rendering System!

 

Here's my Custom IDE / Debugger Programmed in Pure Python and Designed from the Ground Up for Programming Education!

Want to ask about Python, Flask, wxPython, Pygame, C++, HTML5, CSS3, Javascript, jQuery, C++, Vimscript, SFML 1.6 / 2.0, or anything else? Recruiting for a game development team and need a passionate programmer? Just want to talk about programming? Email me here:

hobohm.business@gmail.com

or Personal-Message me on here smile.png!


#15 Acharis   Crossbones+   -  Reputation: 3456

Like
0Likes
Like

Posted 06 July 2013 - 05:22 AM

 

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, 06 July 2013 - 05:22 AM.

Europe1300.eu - Historical Realistic Medieval Sim (RELEASED!)





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS