Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Programming Tutorial


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
8 replies to this topic

#1 Alisa   Members   -  Reputation: 99

Like
0Likes
Like

Posted 05 October 2012 - 04:59 AM

Hi friends,

I would like to ask you, how can i learn the basics of computer programming?
Is there some video tutorial, or something like that??
If Yes then Please share with me.

Sponsor:

#2 Brother Bob   Moderators   -  Reputation: 8616

Like
0Likes
Like

Posted 05 October 2012 - 07:21 AM

Moving thread to For Beginners.

#3 FLeBlanc   Crossbones+   -  Reputation: 3117

Like
1Likes
Like

Posted 05 October 2012 - 08:07 AM

Khan Academy has a few introductory videos:

http://www.khanacademy.org/cs/tutorials/programming-basics

#4 Goran Milovanovic   Members   -  Reputation: 1104

Like
1Likes
Like

Posted 05 October 2012 - 01:52 PM

Python 3 tutorial series:

http://www.youtube.com/playlist?list=PLDFB7FFF90EE6F0C1

+---------------------------------------------------------------------+

| Game Dev video tutorials  ->   http://www.youtube.com/goranmilovano |
+---------------------------------------------------------------------+

#5 Sooker   Members   -  Reputation: 299

Like
0Likes
Like

Posted 05 October 2012 - 02:59 PM

This should answer your questions: http://www.gamefromscratch.com/post/2011/08/04/I-want-to-be-a-game-developer.aspx

I personally use C# with SharpDX, because I´m not sure about the future of XNA.
But you could use Unity3D with C#: http://unity3d.com/

C++ has Ogre3D, Allegro, SFML, ... as far as i know

If you know your language well, you should start writing 2D games like Pong, Space Invaders, ...
Don´t rush to 3D and don´t think about programming a (m)morpg. This are some hard tasks wich need experience.

Know your goal, and get to it.

#6 6677   Members   -  Reputation: 1058

Like
0Likes
Like

Posted 05 October 2012 - 04:00 PM

If your completely new to programming then I highly recommend python. Its about as simple as programming gets (short of visual tools anyway) while being a very powerful language at the same time. The skills you learn in python will then apply to other languages. Someone has already posted a python 3 video tutorial. Each generation of python is ever so slightly different. 2 is still remarkably common, 3 is relatively new but all the best tutorials are for 3. 2 is slowly being phased out. If you find the tutorials that suit you best are for 2 then use 2 but otherwise you might aswell use 3, just make sure on the python website you download the correct version for your tutorial (I believe that would be either 2.7 for python 2 or 3.1 for python 3). One python tutorial thats meant to be pretty good can be found here: http://inventwithpython.com/chapters/ (python 3)

C# and java are often recommended too. These are also excellent choices although harder than python (I happen to know both python and C#, have not used java although I hear java and C# are very similar in syntax and difficulty).

For comparison here is the same program written in python 3 and in C# 4.

Python

[source lang="python"]import randomimport timedef displayIntro(): print('You are in a land full of dragons. In front of you,') print('you see two caves. In one cave, the dragon is friendly') print('and will share his treasure with you. The other dragon') print('is greedy and hungry, and will eat you on sight.') print()def chooseCave(): cave = '' while cave != '1' and cave != '2': print('Which cave will you go into? (1 or 2)') cave = input() return cavedef checkCave(chosenCave): print('You approach the cave...') time.sleep(2) print('It is dark and spooky...') time.sleep(2) print('A large dragon jumps out in front of you! He opens his jaws and...') print() time.sleep(2) friendlyCave = random.randint(1, 2) if chosenCave == str(friendlyCave): print('Gives you his treasure!') else: print('Gobbles you down in one bite!')playAgain = 'yes'while playAgain == 'yes' or playAgain == 'y': displayIntro() caveNumber = chooseCave() checkCave(caveNumber) print('Do you want to play again? (yes or no)') playAgain = input()[/source]

C#

[source lang="csharp"]using System;using System.Collections.Generic;using System.Text;namespace DragonRealm{ class Functions { } class Program { static void displayIntro() { Console.WriteLine("You are in a land full of dragons. In front of you,"); Console.WriteLine("you see two caves. In one cave, the dragon is friendly"); Console.WriteLine("and will share his treasure with you. The other dragon"); Console.WriteLine("is greedy and hungry, and will eat you on sight."); Console.WriteLine(); } static string chooseCave() { string cave = ""; while ((cave != "1") & (cave != "2")) { Console.WriteLine("Which cave will you go into? (1 or 2)"); cave = Console.ReadLine(); } return cave; } static void checkCave(string chosenCave) { Console.WriteLine("You approach the cave..."); Console.WriteLine(""); System.Threading.Thread.Sleep(800); Console.WriteLine("It is dark and spooky..."); Console.WriteLine(""); System.Threading.Thread.Sleep(800); Console.WriteLine("A large dragon jumps out infront of you! He opens his jaws and..."); Console.WriteLine(""); System.Threading.Thread.Sleep(1200); Random random = new Random(); string friendlyCave = random.Next(1, 3).ToString(); if (chosenCave == friendlyCave) { Console.WriteLine("Gives you his treasure!"); } else { Console.WriteLine("Gobbles you down in one bite!"); } } static void Main(string[] args) { string playAgain = "yes"; while (playAgain == "yes") { Console.Clear(); displayIntro(); string CaveNumber = chooseCave(); checkCave(CaveNumber); Console.WriteLine("Do you want to play again? (yes or no)"); playAgain = Console.ReadLine(); } } }}[/source]
You can see for yourself which of the 2 is simpler to follow. I do have to say, that program could be simplified for a beginner a little further (in which case they begin to look a little more similar). The original python code I found here: http://inventwithpyt...m/chapter6.html I then ported it to C# myself a few days ago in order to practice my C# skills.

I do not recommend learning an un-managed language first. C++ is an excellent example of an un-managed language. Later on then C++ is probably the best language but its also one of the hardest to work with and immense for a newcomer. Not impossible for a newbie but no offense you haven't googled for a programming tutorial yourself yet so I doubt you have the patience to learn C++.


EDIT:
Jesus christ the forum's code tag does not work well, but then it does say experimental I guess.

Edited by 6677, 05 October 2012 - 04:04 PM.


#7 cYnbios   Members   -  Reputation: 112

Like
1Likes
Like

Posted 06 October 2012 - 01:13 AM

Use this: http://www.codecademy.com

It's similar to Khan Academy but it's not just videos, it's interacting and using codes also. There you can learn Javascript, Python, Ruby, and more. It's very beginner friendly so don't be afraid of trying it out.

Make sure to create an account to track your progress

#8 Vodahmin   Members   -  Reputation: 233

Like
0Likes
Like

Posted 06 October 2012 - 11:36 AM

If you haven't decided on the languages yet. I'd also recommend Python and C# for the starters. If you're planning to take a university course in the near future, you may expect that they will teach you Java (hopefully - some schools start from C - which is a great language but not the easiest to master).

As for the complete guide for beginners, I'd highly recommend this book. I used it myself to learn Python and I must say, that the book is well organized and straight to the point.

Edited by Vodahmin, 06 October 2012 - 11:39 AM.


#9 Alisa   Members   -  Reputation: 99

Like
0Likes
Like

Posted 08 October 2012 - 02:57 AM

Khan Academy has a few introductory videos:

http://www.khanacade...gramming-basics



I visit to this link ..... This link is too Good...
Thanks for sharing this link ..

Posted Image Posted Image Posted Image Posted Image




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