Home » Community » Forums » For Beginners » Very first post
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic


 Last Thread Next Thread 
 Very first post
Post New Topic  Post Reply 
Hey everybody,

I been hanging around the site lately and finally decided this was the place for me. I am a starter at programming. I have never made a real game, just about 7 or 8 little programs and stuff trying to learn the different concepts ect. I know this is going to take a long time before I even see the first graphic show up. To me though, this is worth it. I have always wanted to become a game programmer, not just for my love of games, but computers also. I would like to ask one question though. I have so far been learning C, but I am feeling like Python would be a better language to use, or at least my friend said so. He said that a lot of Python was soo much easier, and I could have graphics in my games a lot sooner. But if that is true wouldnt everybody just use Python? There has to be some kind of downside to it right?

 User Rating: 1050   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I've not ever used Python, so this might be off base, but...

... and I'm no great expert, so these observations or assumptions might be off because of that...


Generally, if something is easy to slap something small together, it becomes less maintainable with larger projects.

Generally, if something allows for rapid development, it's making assumptions that makes it more difficult or tedious to do more advanced things which utilize the normally assumed parameters.

Generally, if something does a lot of work for you, it will be slower either in compiling or running, because that work takes time.

 User Rating: 1814   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

I haven't used Python before, but I can tell you straightaway a reason it's not good for gamedev: it's interpreted. This means it'll be a fair bit slower than a compiled language like C.

I can also tell you that C/C++ is still the language of choice in the vast majority of the professional and indie game industry. Although we're seeing a lot more flexibility with graphics libraries, if you want to write tight, fast, robust, scalable code, you can't get much better than C++ in the hands of a competent programmer.

Note the ++ - I wouldn't limit yourself to just C, make sure you get your head around object orientation too - it helps immensely in larger projects.

Anyway, best of luck with your learning! If you want to dive in the (relative) deep end, I'd start off with Nehe's OpenGL tutorials, Andy Pike's DirectX tutorials and Drunken Hyena. All good stuff.

[Edited by - Fruny on April 19, 2005 4:59:29 PM]

 User Rating: 1044   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

It's just one of those questions that will always bug you at first. Did I choose the right language? Any language is going to have it's ups and downs. I learned C++ first (not counting BASIC here) and it was a rough road. Actually, saying "learned" is not even appropriate because it never stops. A lot of what I hear is that C++ is hard for beginners and that Python is a good language to start with because it's "easier".

It's hard for me to give an unbiased opinion for two reasons.

1. I now love C++.
2. I do not know Python.

I am slowly trying to learn Python now though . Python + C++ (yes you can do that) == WOW.

 User Rating: 1436   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

Just pick one language and get a solid foundation in it. Once you have that it becomes a piece of cake to learn a new one. Right now if I put my mind to I could probably become fairly proficient with a new language in a week or two of studying .

 User Rating: 0   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I'm also fairly new to this site. I've been learning the basics to python and am almost ready to start meddling in some pygame experiments. The real downside of python is that when doing large (especially mathematical) computations, it is considerably slower than C/C++. This, of course will not affect your learning the basics, such as functions, and it also won't affect your first PvP tic tac toe game. It might affect writing a competant AI for chess, but by the time someone gets there, they should be experienced enough to pick up C or C++ fairly quickly. I've also heard that knowing and combining python and C++ is a killer combination. In closing, I would suggest sticking with python. (and I will be taking my own advice by the way.)

P.S. Call me a n00b, but what do you guys mean by troll? I might as well learn now and save myself embarrasement later.

 User Rating: 1033   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I think gsail pretty much pinned it.


Another reason why people don't use python is that, well, when everybody tells you that C++ is THE language to use, you end up believing it and, joining the choir, you start telling other beginners that C++ is THE language to use...

Questions like "What's the best book for XYZ?" have the same problem: people will advertise the book they learned from, whether or not it really is any good, generally because they haven't had the opportunity to objectively compare multiple books, or because they just plain lack experience with the language and fail to see what the book is missing or where it is incorrect.

C++ is a decent language, but is not the best choice if you're just starting to program. Too many details to deal with that get in the way of you actually learning how to program. Same with C.

 User Rating: 2027   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

This may sound pretty bizzare but...

LEARN ASSEMBLY FIRST!

If you happen to have a Ti8x calculator, check out Assembly Coder's Zenith.

Let me explain. I got my hands on a Ti86 about 7 years ago and the immediately started playing around with the Ti-BASIC editor that's built into the calculator. Naturally, I wanted to experiment with making games that I could give to my friends who also had 86's. The problem with Ti-BASIC is that it was TOO SLOW for anything more robust than turn based games.

Along came assembly to the rescue. I STRONGLY urge anybody to get a Ti86 just for assembly learning purposes. Reason? The Ti86 uses the Z80 microprocessor as it's CPU. Z80 assembly is considerably easier to learn and use than other assembly languages. It is also very easy to interface with the Ti86 and get even 10 lines of ASM code to display some cool graphics on the screen. Seriously it's that easy.

The point is that no matter which assembly language you choose to learn, assembly teaches you what goes on behind the scenes of any high level language (like C++). This can be invaluable to you later on...

You don't have to spend months playing around with assembly like I did either. Spend a few hours reading the tutorials on the site I gave you a link to.

I see that you've already been learning C, and that's cool. I definetly agree with the other poster that you should check out C++ as well. C++ is merely an extension of C, not another language.

The reason I stress learning assembly is because from my experience, I have had a MUCH easier time grasping new programming concepts than other people that I have taken programming and related classes with. I know that everybody learns at their own pace and all, but I'm telling you the reason why I understood lectures better than most of my class was because it was a concept I had already learned from using assembly.

Anyway...that's my shpiel for the day ;)

 User Rating: 1042   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I haven't used Python, but I think it would be pretty good to move on up to C++ if you're serious about it being a career or anything, because, right now, C++ is the market standard (mostly) for almost every type of program. C and C++ are pretty similar but some of the syntax is different...

 User Rating: 1026   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Quote:
C and C++ are pretty similar but some of the syntax is different...


There is much, much more to C++ than its C subset.

 User Rating: 2027   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Quote:
Original post by Kenny Francis
C and C++ are pretty similardifferent but some of the syntax is differentsimilar...

Fixed

 User Rating: 1436   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

Quote:
Original post by Rhaal
Quote:
Original post by Kenny Francis
C and C++ are pretty similardifferent but some of the syntax is differentsimilar...

Fixed


lol. Slap a "n00b" sign on my T-Shirt and make me dance around in a cage like a monkey.

 User Rating: 1026   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

*chuckle*

 User Rating: 2027   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I am just starting to learn C++ as well. But I am a five year veteran of the Euphoria programming language which is basicly the same but a lot easier. The first day I was messing with text, the second graphics. Not kidding. Euphoria is good, the only problems are 1) that most game companies want some one with VC++ skills, and 2) it is hard to find resources to learn the language. The good thing about C++ is that it has so many resources and people using it that you can talk to on forums like we are now. Good luck and happy coders!

Locke1105

 User Rating: 1010   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I think starting with any programming language doesn't really matter.One and foremost your background on programming logics are really good.Let's take C as your primary language,you have to really make sure that you know your programming really really well(i mean really well).Then dive into C++,from there your logics and way of programming will be much easier and if your logics are good any programming language could be learn easily.But C++(object oriented) is the way of programming high rendered games.Win32 is a good start for starters.

Long time ago(before I even thing I could program),I brought lots of books and try learning on game programming.I found out that I can't really understand them(I then started C programming in my course).Things start making sense.C++ came into my course then the books I got on game programming making even more sense.Finally graduated and go back to those books and finally making sense.(Finally)

So I guess understanding and writing in C language(any kind of language) is kind of important,without those basic logics,nothing can be done even persuing to any new language.

cheers,
Commy2005

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I'm currently researching Python because I want to write Blender plug-ins. How I'm doing this is writing the file routines and data structures in C and then wrapping them in Python to create my custom 3D file format exporter.

The problems I'm having right now is that Python is not recognizing my extension. I can import it, but I can't use any of the functions I've defined. I've been working on this for the past 4 1/2 hours trying to figure it out-no luck!

Also, I believe that a lot of the tutorials for Python suck ass! They really don't cover the right information or the informtion they have convered good enough. For someone like me, that is a huge draw back that pisses me off. It also seams that a lot of tutorials are just flung together any don't really carry any structure, also a big draw back.

I know Python could be usefull. I need to learn it for Blender and other progrrams. Also, I've given though to encapsulating the Python interpreter in my own projects, as Blender has. I think it could be a pretty good scripting language for a game as Lua is. Neverwinter Nights doesn't really seam to lag, so I find my self wondering if Python would do just as good.

From what I've seen and the people I've already talked to, Python isn't really that also and it's great for extending any application!

 User Rating: 863   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

If youre understanding C i wouldnt try to hit up a whole nother language like python, when youre confident in C start on C++. However if C is hard to grasp try python as the language itself is easier to understand. I've used python and i like its simplicity but it doesnt seem to have the power of C or C++ .


 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

YEAH!!! I figured it out damn it! I successfully wrote an extension for Python in C. Python IDE thingy ran it and I had no problems except one. I forgot to str( int ) on the integer value. But that doesn't mean my extension didn't work, because it did once I fixed that error. The output was exactly what I wanted.

Now, I need to learn how to export C/C++ structures and classes for Python. I'm not to sure on how Python will handle FILE*s. I have file stream routines wrote in C that require a valid(open for writing) FILE* as one of the parameters. I'm not to sure on how to handle this in Python and C.

Let's see, you create a DLL project firstly. Add the Python build directories to the project, or as I did, to VC++ so that I wouldn't always have to add those directories each time I made a Python extension.

The Python implementation of the functions should return a value! I was working with a simple print function and it wasn't working at all. Then, I returned the actual string but it didn't print it. The add function, however, worked. This is how I used my extension

import Pants
result = Pants.Add( 2, 3 )
message = Pants.Say( "2 + 3 = " )
print message + str( result )

... output ...

2 + 3 = 5



I was using printf to write the string passed to Pants.Say( ). I think my problem was that I should of used Python's std::out interface instead of C's. Then maybe I would have actually got it to print the text.

It sucks that I had to use Pant with the '.' operator to access any of my functionality. But maybe I'll figure something else out, until then. Tootles :D

 User Rating: 863   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Quote:
Original post by sakky
It sucks that I had to use Pant with the '.' operator to access any of my functionality. But maybe I'll figure something else out, until then. Tootles :D


from Pants import *

This is similar to doing "using namespace Pants;" in C++, and carries the corresponding caveats about name clashes.





As a general rule, if you post in For Beginners and your code contains the word 'char', you have a bug. std::string roxors teh big one one one one.
"OMG! I'm so happy! I have "1 Friends"!!!" -- coldacid
"Basically whenever you invoke the dread ellipses construct you leave the happy world of type safety." -- SiCrane
"I mean, if you had sex for every time O'Reilly used the word Patriotism you'd be almost as awesome as Chuck Norris." -- tthibault

<triforce101> uh im not a noob i finished the game

 User Rating: 1990   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

if you learn C++, then it gives you a good basis for learning other languages as it is similar to so many others - BASIC, Java etc - and if you ever decide to splash out on a good compler, then you may be able to mix C++ C#, Java and BASIC programs together

 User Rating: 1013   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Quote:
Original post by Telastyn
I've not ever used Python, so this might be off base, but...

... and I'm no great expert, so these observations or assumptions might be off because of that...


Generally, if something is easy to slap something small together, it becomes less maintainable with larger projects.

Generally, if something allows for rapid development, it's making assumptions that makes it more difficult or tedious to do more advanced things which utilize the normally assumed parameters.

Generally, if something does a lot of work for you, it will be slower either in compiling or running, because that work takes time.
Remember that you're talking to an impressionable beginner. One and two are wrong with Python given it's extendability with C and many libraries which have already done this for you. As for the last one, of all the people here who whine about speed, I have yet to see more than one or two applications come out of this community that really needed to use C/C++ in the first place. It reminds me of the kids around town who staple fins to their poorly contructed, beaten down cars in order to go suuuuuuuuuuuuuuuuuuuuuuupeeeeeeeeeeeeeer faaaaaaaaaaaaaaaaassssssssssssssssssst.

I don't understand why people even bring this up to a beginner. The really important thing is that they grasp the simpler mechanics of programming. The important thing to them is that they have some sprites dancing about in a small amount of time. Python lets you do both.

By the time any of the speed becomes an issue he/she will probably have encountered C well enough to write extensions. Also, Python is fine with large scale projects as we're using it for a first-gen, realtime device that does tons of processing at work. If we had started with just C/C++ I'm willing to bet that we'd be half as far at this point. Make it work. Make it work fast.

As for learning Assembly, sure, it's neat. But it's unnecessarily tedious. Python has tons and tons of easy to use, snappable parts.

 User Rating: 1169   |  Rate This User  Send Private MessageView ProfileView JournalView GD Showcase Entries Report this Post to a Moderator | Link

Hmmm, I'd say learn C++ just because of the huge amount of resources. Last time i checked there weren't that many resources for pygame. But is python and pygame really that easy (I myself would like to know)? If it is easy, is it worth the difference?

 User Rating: 1031   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Most people don't use python because it's only recently started to catch on.

 User Rating: 380   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may not post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: