Home Artists Posts Import Register

Content

Hello!

Unity is an amazingly powerful game engine - but it can be hard to learn. Especially if you find tutorials hard to follow and prefer to learn by doing. If that sounds like you then this tutorial will get you acquainted with the basics - and then give you some goals to learn the rest by yourself.

The tutorial covers everything from installing Unity, to writing your first ever line of programming code, to creating UI, to building an executable game file you can share with friends. No experience is needed.

Thanks very much!

Mark

Files

maxresdefault.jpg

GMTK is powered by Patreon - https://www.patreon.com/GameMakersToolkit Unity is an amazingly powerful game engine - but it can be hard to learn. Especially if you find tutorials hard to follow and prefer to learn by doing. If that sounds like you then this tutorial will get you acquainted with the basics - and then give you some goals to learn the rest by yourself. The tutorial covers everything from installing Unity, to writing your first ever line of programming code, to creating UI, to building an executable game file you can share with friends. No experience is needed. === Files and Downloads === Assets - https://www.dropbox.com/sh/h5vez7ltgbmfnib/AADSCiI2dEKptcR7ydv8xR2Ba?dl=0 Scripts - https://pastebin.com/QiLkpeJe Unity Project - Coming soon... === Sources and Resources === (1) Time.deltaTime - https://docs.unity3d.com/ScriptReference/Time-deltaTime.html (2) Instantiating Prefabs at run time - https://docs.unity3d.com/Manual/InstantiatingPrefabs.html (3) Object.Destroy - https://docs.unity3d.com/ScriptReference/Object.Destroy.html (4) Debug - https://docs.unity3d.com/ScriptReference/Debug.html (5) ContextMenu - https://docs.unity3d.com/ScriptReference/ContextMenu.html (6) OnTriggerEnter2D - https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnTriggerEnter2D.html (7) GameObject.FindWithTag - https://docs.unity3d.com/ScriptReference/GameObject.FindWithTag.html (8) GameObject.GetComponent - https://docs.unity3d.com/ScriptReference/GameObject.GetComponent.html (9) OnCollisionEnter2D - https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnCollisionEnter2D.html (10) AudioSource - https://docs.unity3d.com/ScriptReference/AudioSource.html (11) PlayerPrefs - https://docs.unity3d.com/ScriptReference/PlayerPrefs.html Recommended Videos and Channels Brackeys - https://www.youtube.com/@Brackeys Tarodev - https://www.youtube.com/@Tarodev Game Dev Guide - https://www.youtube.com/@GameDevGuide Samyam (Best New Input System Tutorials) - https://www.youtube.com/@samyam Learn C# with these 9 lines of code - https://www.youtube.com/watch?v=aB9LJ9oHGOs === Chapters === 00:00 - Intro 02:26 - Installing Unity 03:42 - Step 1 - Unity UI 06:49 - Recap 07:11 - Step 2 - Physics and Programming 15:30 - Recap 16:09 - Step 3 - Spawning Objects 27:52 - Recap 28:32 - Step 4 - Logic and UI 37:12 - Recap 38:00 - Step 5 - Game Over 43:31 - Next Steps === Credits === Music provided by Epidemic Sound - https://www.epidemicsound.com/referral/vtdu5y (Referral Link) === Subtitles === Contribute translated subtitles -

Comments

SHAMANWOLF 1594

Whoa!! Great video!! I am learning Unity through Udemy and I really enjoy it, but you have just demonstrated very helpful ways of illustrating development process that I wish they would adapt. Excellent stuff!

Anonymous (edited)

Comment edits

2022-12-31 05:46:41 The timer pattern described in the video could be improved. Instead of incrementing a timer period every update, you can set a future time and check if the current time is greater than that future time. For example: nextDoStuffTime = time.Time + 5; // Do stuff in 5 seconds and then in your update code: if (time.Time >= nextDoStuffTime) { // Do stuff nextDoStuffTime = time.Time + 5; // Do stuff again in 5 seconds }
2022-12-02 23:49:19 The timer pattern described in the video could be improved. Instead of incrementing a timer period every update, you can set a future time and check if the current time is greater than that future time. For example: nextDoStuffTime = time.Time + 5; // Do stuff in 5 seconds and then in your update code: if (time.Time >= nextDoStuffTime) { // Do stuff nextDoStuffTime = time.Time + 5; // Do stuff again in 5 seconds }

The timer pattern described in the video could be improved. Instead of incrementing a timer period every update, you can set a future time and check if the current time is greater than that future time. For example: nextDoStuffTime = time.Time + 5; // Do stuff in 5 seconds and then in your update code: if (time.Time >= nextDoStuffTime) { // Do stuff nextDoStuffTime = time.Time + 5; // Do stuff again in 5 seconds }

Swolomo

Rad! I’m glad you got around to making this. Love how you went from knowing nothing to making a game at the visual and tactical quality you’re making now in a relatively short period. It’s super inspiring.

Anonymous

Yeah, that also bugged me* :P That and how one shouldn't change physics objects locations in Update() but in FixedUpdate() instead were my biggest gripes. It makes input a bit more cumbersome to implement, but it's safer for the physics. There were a few other technical issues I had (I'm a 12-year Unity monster) but they were mostly harmless, otherwise I was genuinely impressed that Mark was able to tutorialize a mostly complete Flappy Bird game (with recaps!) in 40 minutes. * Glad Mark fixed the if (GetKeyDown() == true) thing though, Grr!

DMG

I wouldn't recommend this format for games that might be played over long sessions - particularly anything you're shipping on console where it can be suspended and resumed without the player ever quitting and re-launching the app. In a not-unreasonable amount of time, `Time.time` begins to lose precision in ranges we care about. More here: https://gamedev.stackexchange.com/a/141811/39518

Anonymous

@DMG: Is the takeaway here to use one of the more precise alternatives to `Time.time` if your play sessions may last longer than 4.5-9 hours, or is there more to it than that?