Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411524 Posts in 69377 Topics- by 58431 Members - Latest Member: Bohdan_Zoshchenko

April 28, 2024, 02:47:16 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityTownhallForum IssuesArchived subforums (read only)TutorialsI'm going on a long path to learn programming
Pages: [1] 2
Print
Author Topic: I'm going on a long path to learn programming  (Read 16809 times)
Conker534
Guest
« on: April 03, 2011, 10:47:41 PM »

Hey guys. Well I decided I want to move away from game maker, I have no prior knowledge of programming, but I do know a okay amount of GML and Sadscript. Now I want to be an awesome programmer, what would be a good language to make games in?

People tell me C# or Java. Can you guys help me out. Thank you! I can't wait to start my journey.
Logged
Triplefox
Level 9
****



View Profile WWW
« Reply #1 on: April 04, 2011, 12:26:05 AM »

Programming languages shift like sand dunes. To become an awesome programmer, learn some computer science.

Once you have a handle on things, the differences won't matter so much and you can choose languages according to professional purpose.

To actually answer the original question, with my other advice in mind, try one of these:

Javascript
Python
Ruby

All of them have some capacity to make games, but neither should that be your goal off the bat. The goal is learning quickly, and these languages have the twin benefits of lots of documentation and a relatively fast, user-friendly working environment, without many preliminaries. It's when you become a professional that you have to put up with cranky, error-ridden, unhelpful tools with obscure methods of installation and no documentation(i.e. you have to read source code to understand it).

Once you have an environment set up and you have your "hello world" tutorial working, spend time learning these concepts, which you would find in introductory CS courses:

Some key stuff
http://en.wikipedia.org/wiki/Source_code
http://en.wikipedia.org/wiki/Compiler
http://en.wikipedia.org/wiki/Version_control

Memory
http://en.wikipedia.org/wiki/Array_data_structure
http://en.wikipedia.org/wiki/Reference_(computer_science)
http://en.wikipedia.org/wiki/Pointer_(computing)
http://en.wikipedia.org/wiki/Manual_memory_management
http://en.wikipedia.org/wiki/Garbage_collection_(computer_science)

Algorithms
http://en.wikipedia.org/wiki/Algorithm
http://en.wikipedia.org/wiki/Sorting_algorithm
http://en.wikipedia.org/wiki/Search_algorithm
http://en.wikipedia.org/wiki/Shuffle#Shuffling_algorithms
http://en.wikipedia.org/wiki/Recursion

Data structures
http://en.wikipedia.org/wiki/Data_structure
http://en.wikipedia.org/wiki/String_(computer_science)
http://en.wikipedia.org/wiki/Linked_list
http://en.wikipedia.org/wiki/Associative_array
http://en.wikipedia.org/wiki/Tree_(data_structure)

Any of the languages I listed allows you to code these things up and see them in action.

Most of them already have some of these data structures and algorithms as a built-in feature somewhere, and handle details of implementation for you; all are garbage-collected. Try to build structures of your own, from the most primitive constructs the language allows, for learning purposes - once you're satisfied with your understanding, use whatever works.

The terminology and syntax each language uses tends to differ widely, but if you combine the abstract concepts with books, tutorials, and questions(Technical is always there for you) anything is possible.

To motivate the learning, this is a typical first-year CS project that would make use of most of these concepts:

Design a data structure to represent a deck of cards, and the hands controlled by four players. Then design algorithms to sort and shuffle the deck, deal cards to each hand, and rank the high-card hand. Then create a simple game that deals the cards to the four players and prints out a winner(or tie).

This project doesn't require graphics or input or a timing loop or most of the things we associate with gaming, but if you can do it, you'll be prepared to look up the rest on your own. If you can't - well, you probably won't be able to make games.
Logged

st33d
Guest
« Reply #2 on: April 04, 2011, 02:30:31 AM »

I'd personally recommend tackling a puzzle game and stay clear of physics till you've finished it.
Logged
Derakon
Level 2
**


View Profile
« Reply #3 on: April 04, 2011, 08:43:04 AM »

Of the many languages I've tried, I have to say that Python does the best job of getting out of your way and letting you focus on the design. It's a good place to start learning.

However, good program design requires a lot more than just practice (though practice is a huge part of it, don't get me wrong...). Understanding things like runtime analysis, data hiding, interfaces, and so forth (just to name a few!) are all key to making large games; without them you'll end up with a slow, buggy, and unmaintainable mess. I got a primer in all that stuff at college, which then solidified as I tried to work on my own projects. It's of course possible to self-teach, but I wouldn't know where you'd start.
Logged
Krux
Level 2
**



View Profile
« Reply #4 on: April 04, 2011, 09:09:30 AM »

for games i would recommend Processing. Java is not the best language out there, but processing had done a great job in making game programming a nice experience.

If you just want to learn a programming language, I would recomment Scala. It is optimised in expressiveness, consistency and is 100 times faster than Python.
Logged
Richard Kain
Level 10
*****



View Profile WWW
« Reply #5 on: April 04, 2011, 09:21:04 AM »

I would consider both C# and Java to be good starting points. Both of them are Object-Oriented languages. Both of them have a degree of memory management and garbage collection. (so you don't have to deal with low-level memory management) I am very fond of OOP, and feel that it is a better methodology for learning advanced programming. Another benefit of either C# or Java is that the two languages are very similar. Learning how to program effectively in one will teach you how to program effectively in the other.

In fact, becoming independent of specific languages is one of the marks of an experienced programmer. Once you understand most of the basic principles of programming, it becomes much easier to switch between languages. Specific syntax is just a matter of practice, most modern languages feature many of the same structures. For my part, I started off learning Actionscript 3.0, and later moved over to C#, and then to Haxe. I've even dappled in a little Obj-C. If I really wanted to, moving over to Java would be fairly easy for me.
Logged
jotapeh
Level 10
*****


View Profile
« Reply #6 on: April 04, 2011, 09:36:41 AM »

I think Triplefox has given you an amazing start. In fact I'd almost recommend his post be stickied as a Programming Tutorial in and of itself.
Logged
JigxorAndy
Level 6
*


Working on Dungeon Dashers


View Profile WWW
« Reply #7 on: April 24, 2011, 08:36:10 AM »

I agree! Triplefox's post is great. Lots of good overview information there.
Logged

Twitter / Dungeon Dashers: Website / Steam Store
Gekko
Level 0
*


View Profile WWW
« Reply #8 on: May 05, 2011, 01:34:11 AM »

Learn many languages. I recommend C/C++ with SDL & OpenGL. That's the "low level" stuff nowdays and will be the toolset that allows you to create cross-platform stuff that is actually fast. You might be better off starting with a higher level language such as Python, but making larger games should probably be done with a language that gives you more control.

Create a text adventure with C++. Learn the basic tools, memory pointers, references, singleton patterns, factories and all that (as mentioned above). Once you have some kind of data structures and programs written, move on to SDL (Simple Directmedia Layer). Lazyfoo's tutorials are good. Once you can handle SDL on some level, learn basic OpenGL. I recommend reading the OpenGL Super Bible. Now merge SDL and OpenGL and make your game.

EDIT: Also, This is somewhat important.

EDIT 2: Oh, also ask a lot of dumb questions. I still do that.
Logged
RetroX
Level 0
**


Gravity Well


View Profile
« Reply #9 on: May 05, 2011, 05:41:45 PM »

I personally recommend C/C++ the most because, despite popular opinion, can actually be less complicated than Java (and probably C# but I don't have too much experience in that; I can't really say).

Let me explain.

In C++, you have value types, pointer types, and reference types.  Pointers can be avoided, and references are easy to explain.  Even though pointers can also be explained easily, memory management can be a headache with segfaults and such.

In Java, you have objects, which are called object references, which are really pointers.  And primitive types are always copied by value.  You also have the wrapper types (Integer, etc.) which can confuse newer programmers.  What is copied by "reference" and what is copied by value?  You don't know.  Java decides which one depending on the type of data.  In C++, you decide which to use for the situation.


In Java, you have abstract classes, interfaces, classes, and enums.  Each of these has special aspects that can only be used in each kind.

In C++, you have classes.  Period.  Each has all elements of all of Java's classes, and you can mix and match without having to worry.  Multiple inheritance is possible.  Enums are just synonyms for integer constants.


Oh, and Java forces one class per file and every file MUST have a class, which is kind of annoying.  You're forced to use static methods when global functions would be a better option.  If you want organisation, use namespaces.  But they aren't required.


Java, to me, is really just a more limited subset of C++ with a global default object and a list of forced methods that, while they do make code consistent, are forced.  Pretty much everything that you write in Java can be made in C++.  It's just that you can't go the other way.

There are a few features that Java has that C++ doesn't have, like GC (which I'm kind of on the edge as far as whether I like it or not), but the new C++0x standard seems to be filling the gap, and the GCC is working on supporting all of it and VC++ already does.  C++0x also is supposed to have limited GC, if I recall, but I don't think that it will be very good.


I am pretty biased as far as languages go, but that's my two cents as far as C++ goes.


Also, don't use SDL.  Use SFML.  It's far superior to SDL and a lot easier to understand; SFML is also object-oriented, which is a plus.
Logged
st33d
Guest
« Reply #10 on: May 06, 2011, 02:54:09 AM »

Java isn't comparable to C++.

Also, C++ is pretty advanced for a complete beginner. Triplefox's suggested languages offer the fastest route to getting a basic game made without worrying about pointers, allocating memory and compiling and linking.
Logged
RetroX
Level 0
**


Gravity Well


View Profile
« Reply #11 on: May 06, 2011, 03:42:30 PM »

Java isn't comparable to C++.

Also, C++ is pretty advanced for a complete beginner. Triplefox's suggested languages offer the fastest route to getting a basic game made without worrying about pointers, allocating memory and compiling and linking.
Java and C++ are both based off of C, even though they were intended for completely different purposes.  They're easily comparable.  Either way, I do realise that I'm incredibly biased toward C++, and I won't deny that.

In general, compiling and linking shouldn't be too much of a hinderance to a new programmer; overall, it might actually be easier to make a game in Java or C++ than in Python, Ruby, or JavaScript.  JavaScript is really much harder to make a game with, and while it may be good for more advanced programmers, I wouldn't recommend it to someone who hasn't programmed before.  After all, JS is intended for web design, not game design.

Honestly, if you're just trying to get into basic programming and game design, flash or game maker would be a better choice.  It'll show you basic programming concepts while still being able to make simple games.
Logged
X3N
Level 6
*


View Profile
« Reply #12 on: May 08, 2011, 06:05:48 PM »

+1 to TripleFox's post. Sticky that!
Logged

destiny is truth pre-op
starsrift
Level 10
*****


Apparently I am a ruiner of worlds. Ooops.


View Profile WWW
« Reply #13 on: May 10, 2011, 09:03:01 AM »

Awesome post, Triplefox.

'Bout the only thing I would change about that is to notate that while trendy programming languages shift like sand dunes, C has been around forever and is still very widely used. And it's also a stupid language to start with.
Logged

"Vigorous writing is concise." - William Strunk, Jr.
As is coding.

I take life with a grain of salt.
And a slice of lime, plus a shot of tequila.
wshnyl
Level 0
*


View Profile
« Reply #14 on: May 16, 2011, 10:22:14 AM »

Nice post + replies!

I have the following questions about the beginning :

1. I decided to learn C++ or C#. (i programmed in Delphi/Pascal before)
   Which is the "best"? Or doesn't matters? Can i use OpenGL/DX.. in both?

2. Is there an ideal "learning curve" for game developing? For example : first game "Tetris",   
   second "PacMan", third "Mario"... ?

Thanks for the answers!
Logged
Dacke
Level 10
*****



View Profile
« Reply #15 on: May 16, 2011, 10:47:55 AM »

I would only want to add one thing to TripleFox's recommendation:
Get your hands on a good editor (or preferably an IDE). Life is so much better when you get syntax highlighting, code completion and something that finds all the (syntactical) errors you make. Think of it like a real-time spell-checker.

Personally I mostly use Java, but I think it is better suited for building huge structures rather than learning basic concepts. The same goes for C++ and probably C# (which is very Java-like).

I would not recommend starting with neither Tetris, PacMan nor Mario. All those games depend on the screen being updated several times every second, which can be tricky to get right. Start by creating something completely turn-based, like a card game (see TripleFox's suggestion), a puzzle game (st33d's suggestion) or a simple text adventure (Gekko's suggestion).
« Last Edit: May 16, 2011, 10:58:18 AM by Dacke » Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
jotapeh
Level 10
*****


View Profile
« Reply #16 on: May 17, 2011, 08:21:42 AM »

Definitely not Mario, anyway. I started with Tetris and it wasn't too bad. You're basically dealing with a 2D array of booleans and shifting things around every second or so. If you need you can even implement Tetris as a turn based game, where you have to press 'down' to make the block fall. That might simplify it Wink
Logged
wshnyl
Level 0
*


View Profile
« Reply #17 on: May 17, 2011, 08:28:42 AM »

Ok, thank You guys!
Then i write the card game and a puzzle game first.
Logged
Theophilus
Guest
« Reply #18 on: May 19, 2011, 10:41:47 AM »


2. Is there an ideal "learning curve" for game developing? For example : first game "Tetris",   
   second "PacMan", third "Mario"... ?

Thanks for the answers!

I'd suggest smaller steps.

-Click some object style game
-Scrolling shooter
-pacman
-platformer
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #19 on: May 19, 2011, 06:44:39 PM »

Magic number is the smallest game and yet you almost apply any design rules on it.
Logged

Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic