Jump to content


Photo

[Unity3D] Beginner Help please


  • Please log in to reply
6 replies to this topic

#1 Elric

Elric

    Designer

  • Hosted
  • 2,857 posts
  • Projects:Middle-Earth Expanded
  •  Coder
  • Donated

Posted 11 August 2012 - 05:15 PM

Hey,

I am already a pretty good coder in quite a few languages but the actual unity3D program confuses me. Can someone point me in the right direction for learning how to add things to the unity and code things in etc?

It would be much appreciated. :D

#2 duke_Qa

duke_Qa

    I've had this avatar since... 2003?

  • Network Staff
  • 3,837 posts
  • Location:Norway
  • Division:Revora
  • Job:Artist

Posted 14 August 2012 - 11:58 AM

Oh sorry, didn't see you there.

I heavily recommend reading up on c#, it is a bit more advanced than the unityscript, but its 99.5% the same as proper c#, so you get skills in that language while using it.

The philosophy of unity is that its component-based. You need a minimum of one script added to a gameobject in unity to be able to get anything running.

Here's a basic hierarchy of existent classes(link to the whole list):

Object(mother-object, most if not all classes inherit from this class, not very often used directly)
-Gameobject(Physical objects, at minimum contains a transform node for position, rotation, scale. Can be adjusted by adding components like Mesh for 3d and collision and rigidbodies for dynamics. you usually need at least one to add code to a scene)
- Component(mother-class of components, not used directly)
-- Monobehaviour(The standard class, child of component. You rarely can't go wrong with this one)

Those are the very barebones you'd need to create something that interacts with code.
You will want to start with Monobehaviour. once you've made a class with Monobehavior, you can click and drag it onto a gameobject. then it should be applied like a component and show up in the inspector. A Monobehavior class assumes the gameobject its attached to is its root, so if you write "transform.position=new Vector3(0,0,0);", you are more or less writing "thisGameObjThatTheComponentIsStuckTo.transform.position=new Vector3(0,0,0);". "this.transform..." works as well.


However, the problem with Monobehavior is that you can't create them through code with "MonoClass classReference = new MonoClass();". you need to do it this way:

MonoClass classReference;
this.AddComponent<MonoClass>();
classReference= this.GetComponent<MonoClass>();
classReference.callFunction();

Anyway, I think for 14 minutes of work this is a rough start, I'll tell you more if you have questions.


edit: also, a very good resource for beginners in unity is http://www.unity3dstudent.com/. Very good videos for how things connect.

Edited by duke_Qa, 14 August 2012 - 12:27 PM.

"I give you private information on corporations for free and I'm a villain. Mark Zuckerberg gives your private information to corporations for money and he's 'Man of the Year.'" - Assange


#3 Elric

Elric

    Designer

  • Hosted
  • 2,857 posts
  • Projects:Middle-Earth Expanded
  •  Coder
  • Donated

Posted 15 August 2012 - 01:16 AM

:D thank you. I have already mastered the basics by the time you had posted this. but the resources i can very much use. I already have a general basic game called zombie island 1.0

i dropped making it and started making the same thing but with counter strike weapons which requires modelings and a bit of animating so erm. ya..

you can download the zombie island game here:

http://www.gamefront... Island 1.0.rar

#4 duke_Qa

duke_Qa

    I've had this avatar since... 2003?

  • Network Staff
  • 3,837 posts
  • Location:Norway
  • Division:Revora
  • Job:Artist

Posted 15 August 2012 - 07:10 AM

Haha, pretty nice for a quick game, though I missed ammo pickups.

Just ask if there's anything you need help with, I'm no expert but I've probably seen something akin to it.

"I give you private information on corporations for free and I'm a villain. Mark Zuckerberg gives your private information to corporations for money and he's 'Man of the Year.'" - Assange


#5 Elric

Elric

    Designer

  • Hosted
  • 2,857 posts
  • Projects:Middle-Earth Expanded
  •  Coder
  • Donated

Posted 16 August 2012 - 05:30 AM

i was gonna make ammo packs from scratch but dropped the game before i did so. :p

#6 MattTheLegoman

MattTheLegoman

    LEGO Knight of Minas Ithil

  • T3A Staff
  • 3,669 posts
  • Location:Tomorrow, when the War began
  • Projects:Mapping this Middle-earth
  •  Mapper
  • Division:BFME
  • Job:T3A Staff

Posted 16 August 2012 - 05:36 AM

Well, you could just make it, in a sense, like the King Kong video game. Ammo was scarce - being stranded on a tropical island of course, so you had to rely on other things - like an axe perhaps, and balls of titanium - it makes it that different level of fighting - adds to the scariness of the game.

Remember that all worlds draw to an end and that noble death is a treasure which no one is too poor to buy. - C.S. Lewis

There will come a time when you believe everything is finished. That will be the beginning. - Louis L'Amour

What will matter then will be people. If relationships will matter most then, shouldn't they matter most now? - Max Lucado


#7 Elric

Elric

    Designer

  • Hosted
  • 2,857 posts
  • Projects:Middle-Earth Expanded
  •  Coder
  • Donated

Posted 16 August 2012 - 04:27 PM

Well i am remaking it and basically your stranded on an island and there isnt many guns. mostly melee weapons. 1 car. etc. your goal will be to survive as long as possible. I was thinking of trying to make an online feature to go with it.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users