Skip to main content
GameDev.net gamedev.net
🔒 Locked

Very first post

Started by FPSFragbait Apr 15, 2005 at 10:18 PM 21 replies 3.7k views
Original Post
FPSFragbait
FPSFragbait
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?
Telastyn
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.
davedx
davedx
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]
Rhaal
Rhaal
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 [smile]. Python + C++ (yes you can do that) == WOW.
- A momentary maniac with casual delusions.
Vanke
Vanke
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 .
gsail
gsail
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.
Fruny
Fruny
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.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Qa303asmGuru
Qa303asmGuru
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 ;)
Kenny Francis
Kenny Francis
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...
Fruny
Fruny
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.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Rhaal
Rhaal
Quote:
Original post by Kenny Francis
C and C++ are pretty similardifferent but some of the syntax is differentsimilar...

Fixed [wink]
- A momentary maniac with casual delusions.
Kenny Francis
Kenny Francis
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 [wink]


lol. Slap a "n00b" sign on my T-Shirt and make me dance around in a cage like a monkey. [lol]
Fruny
Fruny
*chuckle*
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
locke1105
locke1105
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
commy2005
commy2005
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
sakky
sakky
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!
Take back the internet with the most awsome browser around, FireFox
sinrtb
sinrtb
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++ .
sakky
sakky
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 Pantsresult = 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
Take back the internet with the most awsome browser around, FireFox
Zahlman
Zahlman
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.

Xpyder
Xpyder
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
JUST-CODE-IT.NETManaged DirectX & C# TutorialsForumsArticlesLinksSamples

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.