So, do you need to self teach yourself C# before you start measing around?
So, do you need to self teach yourself C# before you start measing around?
You won't be able to accomplish much at all without being able to code. Note that it doesn't need to be C# as Unity also works with javascript and Boo.
You can get some sweet falling cubes without code though!
There's a lot of free code in the web like character controllers, you can still do some nice things without your own code.
I have a question. is it possible in unity to lock the amount of input reads (i guess to explain. 60 input frames per second while the game runs at 30 fps?) Does that make any sense and if so, is it possible?
You could set the Application.targetFrameRate to 30 or 60.
Or do it yourself:
time += Time.deltaTime;
if( time > 1f/60f) // or 30
{
time = 0;
// Process input
}
Unity will poll hardware every frame as far as im aware. But why would you not want it to?
That won't achieve what he wants to do. If I understand it correctly he wants to have an internal framerate for input and logic locked at 60, and have the Camera render at 30.
I haven't tried it myself but that should be easily achievable by locking framerate to 60 then Turn Off or On the camera (enabled = false/true) every other frame. For example, in a behaviour on the Camera, do enabled = !enabled in the Update-method.
If you have no other cameras, that should achieve what you want.
What I'd like to know is which is BETTER to use in Unity (if there's a difference)
The fact that almost every tutorial I see use C# makes me think that there would be a reason not to use JavaScript.
Im curious as to why he wants this though :S
The camera toggling seems awfully hacky
There is no difference in functionality that I'm aware of, it's a personal opinion you are asking for.
Not really. There is no raw functional difference in how the language can interact with the engine, but there is a huge difference in available documentation and general industrywide usability of C# knowledge compared to UnityJavascript knowledge.
Thats not personal opinion, that's hard facts; one of the languages will be more useful you in your project right away, as well as more useful for you to learn in the long run.
I'm not here to argue about which language is better, you are more knowledgeable than me, however I've never been told of any one thing that C# can do that Javascript can't. I am not trying to tell people who have no preference to learn Javascript, just that if they already know Javascript and aren't using Unity because they don't know C#, that they are being silly and putting up an obstacle for no reason, I think you'd also agree that learning either language makes it far easier to learn the other, so later down the road when they run into an obstacle and they need help and find help in the form of another language, they can probably figure it out thanks to knowing the other.
My posts are only to remove the idea that you need to use C# to make a game, especially for someone who isn't an advanced coder, who shouldn't have these questions anyways as they would almost certainly be very comfortable with one of these languages.
The beauty of a hobby project that one would ideally make who is using this thread as advice, would benefit from just starting with whatever they are comfortable with, and Unity is flexible enough to grow with them even in the same project in case one decides to mix code. That is my point, if you have an example of something functionally that C# does that Javascript can't, be my guest and point that out but as to your point about documentation or finding help online, that really isn't something I'm arguing with you on, I agree C# is the language of choice for many professional developers and it's quite obvious that it would be very well documented as such.
The thing is, if you know Javascript and want to start with Unity the jump from Unity to UnityJavascript is only very slightly smaller than the jump to C#. Unity Javascript isn't the Javascript you find on the web. Especially these days, when Javascript almost always means jQuery in one way or another. Javascript in Unity is just C# with a bit different syntax.
The differences pretty much boil down to:
var VARIABLENAME : type
instead of
type VARIABLENAME
and
function FUNCTIONNAME(args) : returntype
instead of
returntype FUNCTIONNAME(args)
and the fact that a .js file in Unity won't need the
"class ScriptName : MonoBehaviour" at the top for MonoBehaviour classes.
Also
yield;
instead of
yield return true;
As someone who knew Javascript and started with Unity only 6 months ago, I have to say that I felt more comfortable using the Javascript in Unity than C# in Unity, I'm not a professional, I've only done small indie projects and just coming from my own experience, I feel that you are seeing this from a C# standpoint, coming from that language might make it seem like Javascript in Unity is just as easy to pick up as C# for a Javascript user, lacks the context of not knowing C#, the reality is when I look at C# I only slightly understand it, but looking at javascript in unity is much more comfortable for someone like me.
I think we've started to derail this thread though and we should go back to actually talking about our experiences / answering questions rather than dealing with which language is better.
To those reading this debate, it doesn't matter what you start with, the point is that you start.
My problem with either Unreal Engine or this is how do i make 3d models? A game will definitly need them Maya is complicated.
How good is unity at rendering nature scenes and open world environments?
How good is unity at rendering nature scenes and open world environments?
How good is unity at rendering nature scenes and open world environments?
Ughh whenever I open up Unity I just stare at the blank screen like a dumbass and get depressed. Farthest I've ever gotten was that I made a third person car out of some cubes and spheres (and some awful c# lol )
Question, I'm trying to script where you press specific buttons with mouse to change the scene. How do I do this?
For example, if I pressed #1,2,3, and 4, it changes the scene.
Ughh whenever I open up Unity I just stare at the blank screen like a dumbass and get depressed. Farthest I've ever gotten was that I made a third person car out of some cubes and spheres (and some awful c# lol )
Thanks, but it's not GUI. Maybe I should've specified.You mean when you press a specific number or a GUI button?
If is numbers, you can put this in the Update method of a script (C#):
if(Input.GetKey(KeyCode.Alpha1)){
Application.LoadLevel("level_name");
}
This will load a scene with a specific name if you press "1" (in the alphanumeric kb).
If is a GUI button, something like this (in the OnGUI method):
if(GUI.Button(new Rect(0, 0, 100.0f, 100.0f), "Text")){
Application.LoadLevel("level_name");
}
Two things:
- The scene needs to be added in the Build Settings (File -> Build Settings).
- When the scene is loaded the object that contains this script will be destroyed unless you use DontDestroyOnLoad or you can have a similar object with the same script running in the loaded scene.
Ughh whenever I open up Unity I just stare at the blank screen like a dumbass and get depressed. Farthest I've ever gotten was that I made a third person car out of some cubes and spheres (and some awful c# lol )
Thanks, but it's not GUI. Maybe I should've specified.
For example, let's say you are trying to script an electronic lock? The one that has numbers. If you press buttons "1,5,2,7" on the keypad it will unlock the door.
I'm trying to do something similar to that with gameobjects using mouse button.
So Unity is getting a mascot, I introduce you to... Unity Chan XD
Is unity well suited for 2D games? I'm working on a game right now and I've heard good things about Unity.
Wii U support sounds interesting too.
For reference, I designed a top down Zelda clone in Shockwav and I'm trying to work further on it but shockwave is frustratingly limited.
My wife and I have been looking to create a minesweeper type game, and I figured 2D Unity would be a good place to start.
Is there any reason this is overkill? We are basically just doing it as a learning exercise and something we can do together.
Guys is Unity good for 2D games with sprites, or what do you prefer?
Oh good. Which scripting language is easier to learn? Javascript or C#?
Oh good. Which scripting language is easier to learn? Javascript or C#?
I would say Java, but neither is really what is used, as both are Unity script based on one or the other. If you know one or the other, you will still need to learn how Unity calls certain functions etc. It's axis are also different from the norm.
These are things you pick up as you go, but I would say Java based Unity script is easier.
There is no Java in Unity. There is a scripting language that is slightly similar to Javascript called UnityScript, but there are many strong arguments for using C# instead of UnityScript. Read my earlier posts in this thread for some of them.
The issue I think he's taking with your post is that you say Java instead of JavaScript, which are two different languages.
That is like literally, what I said in my post lol. That the Java in use is Unity script. I'm not sure how you could quote me then tell me again what you quoted
The way I see it, if you lean toward web tech and client-side stuff in browsers (AJAX, for example) or simpler server-side stuff (Node.js), concentrate on Javascript. If you want to do more complex server-side programming, .NET/Mono development, or have more of a C-orientated background, use C#. Or use Boo if you want to be contrarian. You can certainly use some combination of any/all of them if you can keep track of different languages or find certain things easier to do in one over another (this is possibly bad form though, if working in a group).I would recommend J based US for ease over C#, from my own experiences, as being slightly less maddening, not because it is in any way 'better'.
I have unity downloading and studying C# seems to fit it, but I would like to do as much myself as I can so is there any tutorial for Doing game from scrach in C++ for example? My goal is to make sprite charachter to show on level. Maybe make it even jump. I think it would be great project at side of university studies and unity. Edit: Using visualstudio 2013 ultimate.
Edit2: What is best language to learn. I get C# from uni, but when specialising to game dev I think i am gooing to take some other language as side study. Java any good. Sorry for off-topic but unity is still downloading.
C# is a good language to start Unity with, especially if you're already immersed in it. Check out this tutorial for 2D game design. It covers creating a shmup in Unity using 2D sprites, movement, projectiles, collision, background and parallax scrolling, and a few other topics.
http://pixelnest.io/tutorials/2d-game-unity/
Don't take their bit about using Visual Studio for C# development too seriously. That's their opinion and they can have it, but I haven't had any issues following their tutorial using MonoDevelop. Don't make things complicated unless you're comfortable dealing with the self-imposed complexity.
Also take a look at their other tutorials, they have some interesting articles.