PDA

View Full Version : First Love, err... Language


dypaul
02-12-2005, 08:34 PM
I'm just starting out to learn how to program. I would like to ask you veterans what language I should start with so that I learn all the important concepts/ideas of programming without getting bogged down in all the minutiae of C/C++ rules. My ultimate goal is to learn to program Tetris, to study it to death, to grasp what programming is all about, before tackling C/C++. Thanks.

Bmc
02-12-2005, 08:38 PM
FlashMX 2004 and Actionscript

dypaul
02-12-2005, 09:00 PM
If anyone here is self-taught in game programming, can you tell us how long it took you before you could program a game as simple as Tetris?

Also, where can you find a nice course study program that you can follow on your own, modeled after a real one in college perhaps? Thanks.

James C. Smith
02-12-2005, 09:19 PM
BASIC -> C -> C++

Also messed around with Logo, ASM, Java, C#, VB, PHP, forth, and plenty of other stuff. But all my series stuff was the top 3.

In the early days I used Wang BASIC on mini computers, AppleSoft BASIC on the Apple ][, GWBASIC on the PC, and then MS-Quick BASIC.

lakibuk
02-12-2005, 09:19 PM
I think your post is violating the first rule of this forum's FAQ.
1. Do not post requests for tutorials, how to use API/DirectX/OpenGL or any other package, help with your code or how to code it - These subjects are well covered by other forums such as Gamedev.net and Ludumdare.
Anyway. You could start with Java. The language is a little bit friendlier than C/C++. Don't try to start with Tetris, it's not as easy as it looks. Start with a project that does not have graphics. Graphics are usually rather tedious to program. Make a small console game like "number guessing": The game generates a random number 1-100 and asks for your guess. If your guess is lower the game's answer is "the number is higher" and so on.

Rainer Deyke
02-12-2005, 09:30 PM
My first language was C. The language that I would recommend to beginners is Python.

Gnatinator
02-12-2005, 09:46 PM
FlashMX 2004 and Actionscript I second actionscript. I use it for prototyping and creation of more simple games.


I personally started with C (then moved onto C++), but I would not reccomend it to someone who hasnt touched any programming before. Unless you are very determined (and a little insane), you should start smaller.

If anyone here is self-taught in game programming, can you tell us how long it took you before you could program a game as simple as Tetris? I was programming with the console on and off for a few years when I started. (I was in no rush, so I took my time) Then got into game (graphical) programming after. However, if you keep at it constantly, I dont see why you couldnt be done much sooner. Pong is an excellent starter game btw.


Also, where can you find a nice course study program that you can follow on your own, modeled after a real one in college perhaps?Formal education, bleh. Get a book and "roll your own" (Thats the best way to go ;)). And yes, I am completley self taught.

[EDIT]
Python would also be pretty good. :)

[EDIT2]
Java probably wouldnt be too bad either.

Dan MacDonald
02-12-2005, 11:02 PM
Moved the thread to "Indie Basics" from "Technical"

Diodor Bitan
02-12-2005, 11:38 PM
Be different and start with Lisp. Won't bring you a lot closer to a tetris clone, but definitely closer to what programming is all about.

Triple_Fox
02-13-2005, 01:06 AM
It doesn't matter where you start, just that you keep at it: it's progressing that's really difficult. These are some things I studied to get to where I could really start writing my game without difficulty:

-Comparisons of languages. Find one or two that suit your needs, and learn their differences(by experience if needed). There aren't really many "bad" languages, and you can make code for nearly any task with nearly any language - the main limitation is hardware access. But the included features, library support and an inevitable ingrained preference towards some features over others is what differentiates them. If you really want stuff on the screen quickly, aim towards the higher level languages. But going from "stuff on the screen" to "game" really required of the following things...
-Data structures. These are good for going past "Hello world" and "1+2=3" programs into semi-interesting applications.
-Object-oriented code. This was the really big, popular concept of the 90s(but of course invented far earlier) and it is indeed useful when applied thoughtfully. I found it hard to grasp initially because it seemed so darned abstract and unrelated to computing; it became useful when I finally realized that objects were just another of several ways to store and manipulate data.
-Algorithms. They involve more math than data structures, so they're usually tougher to implement, but are also good practice and come in handy to do a lot of things from pathfinding to 3d graphics.

Once I had all of those things covered, making the step into game-making was just a matter of applying the above to "putting stuff on the screen" so that I could get a little skeleton game and toolset together, then rewriting the code many many times until it had reached a state where I felt it was clean enough to do something more complex(i.e. the game I wanted to do). Things like timed gamedev competitions(Ludum Dare mostly) also helped push me along to try new things, but the simple grind of alternately adding a feature and then reworking an existing one so as to make further features easier to add has been the brunt of my work since last summer.

Of course, I've aimed a lot higher in complexity than what a lot of indies try out of the gate, which means I still don't have a finished game; it's certainly not the commonly recommended indie strategy, but I've also been careful to make it something where if the first attempt doesn't turn out so hot, I can reuse most of the code and even the art for a totally new kind of game and get something new ready in a matter of months(weeks even?)

Vectrex
02-13-2005, 03:23 AM
really, try BlitzMax (not blitzbasic). BlitzMax is beautifully simple yet has all the major programming concepts (Like object orientation), not to mention is dead easy to actually get something on the screen (java/c/c++/python even flash take alot of messing about)
It's mac at the moment with windows being released soon. A LOT of the games you see on this forum are BlitzBasic games (Blitzmax is the 'sequel')
www.blitzbasic.com
I remember how much fun and productivity I had in AMOS on the ol' Amiga. Every thing else is horrible in comparison. If you've never programmed before trying to do 'real' programming is pointless as long as you don't want to make the next HalfLife2.

Abscissa
02-13-2005, 04:14 AM
I always found QBASIC to be a good starting point.

princec
02-13-2005, 04:31 AM
Start with BASIC. I think Blitz will do the job and get you results on the screen fast, which is extremely gratifying.

Then move on to Java :)

Cas :)

svero
02-13-2005, 05:41 AM
I agree blitz is a nice starting point. It reminds me of programming games in extended basic on the TI99/4a. It had basic sprites and stuff.. That's how I started many years ago.

luggage
02-13-2005, 05:50 AM
I'd suggest starting with something like Blitz. Just make sure you learn to walk before trying to run.

Escotia
02-13-2005, 05:53 AM
This does not seem a suitable post for these forums IMO. How much does 'I need to learn to program' have to do with running a successful Indie Business?

I don't want to tell the mods how to do their job because it's one I wouldn't want but it seems to me like the general focus of these forums is changing for the worse.

It's not too far from posts like this to GameDev.net

Slippery slope.

C_Coder
02-13-2005, 05:57 AM
We can suggest you all the languages that exist but it is up to you to choose what is best for your project.

I started with BASIC (in the old days) then Z80 ASM, QBasic, 8086 ASM and then C/C++ and C# apart from other scripting laguages that can be used for quick testing.

Since Tetris is not a fast action packed game but more of a puzzle game, it can be programmed with any programming language available today.

BASIC is very easy to pick so I would suggest VB.NET if you wish to use the .NET framework.

Anyway, as I already said, you have to choose the right tool for the right job.

ggambett
02-13-2005, 09:32 AM
Heh, my "path" is almost the same as James's. ZX Spectrum BASIC -> gwbasic/qbasic/turbo basic -> C/C++.

Nowadays I'd recommend Python without thinking twice.

Jim Buck
02-13-2005, 10:08 AM
I agree blitz is a nice starting point. It reminds me of programming games in extended basic on the TI99/4a. It had basic sprites and stuff.. That's how I started many years ago.

Whoa, that brought back memories! I also started on a TI-99/4a. I still have all my stuff (including that crazy large floppy drive system) stored away somewhere. I remember trying to learn the assembly language back then and thinking "WTF???". :)

Dan MacDonald
02-13-2005, 02:00 PM
LOGO->C->pascal->VB->C++

Makes no sense I know, but that's how I learned em.

Bluecat
02-13-2005, 02:25 PM
AppleBasic->COBOL->C->C++->Python

RedKnight
02-13-2005, 03:33 PM
Pascal -> C -> C++

C/C++ is the only langauge I'm going to use for the rest of my life.

20thCenturyBoy
02-13-2005, 04:50 PM
Pascal -> C -> C++

C/C++ is the only langauge I'm going to use for the rest of my life.
Um...they're two different languages.

20thCenturyBoy
02-13-2005, 04:56 PM
ZX Basic -> Pascal -> C -> C++ -> Java

oddvark
02-13-2005, 05:00 PM
basic -> 68000 assembly -> pascal -> ADA -> C++ -> Java ->back to pascal :)

20thCenturyBoy
02-13-2005, 05:13 PM
back to pascal :)
Delphi? Or Turbo Pascal?

oddvark
02-13-2005, 05:21 PM
Turbo Pascal first, then a few years later, delphi :)

Surrealix
02-13-2005, 06:51 PM
If anyone here is self-taught in game programming, can you tell us how long it took you before you could program a game as simple as Tetris?

Visual Basic.

That is, VB 6, not the .NET version. I started teaching myself to program when I was 11, and could probably have programmed tetris after about 2 years. I'm completely self-taught, up until last year, when I took first year computer science.

With the release of the DirectX and OpenGL documentation for VB, I've never really felt inclined to shift to C++, or even .NET.

Abscissa
02-13-2005, 07:44 PM
There's a very similar thread going on right now over here (http://forum.gbadev.org/viewtopic.php?t=5035). It might be helpful too.

ManuelFLara
02-13-2005, 08:09 PM
Pascal > C > C++

I don't plan to change it until the .NET Framework is anywhere so I can use C# :)

Jim Buck
02-13-2005, 09:42 PM
Not as much as favorite languages as much as a evolution of languages learned, exposed to, and/or used:

Commodore PET BASIC --> TI-99/4a BASIC --> TI-99/4a Extended BASIC --> VAX BASIC --> Pascal --> COBOL --> C --> VAX Assembly --> Modula-2 --> C++ --> Prolog --> HTML --> RISC Assembly --> Lingo --> JavaScript --> Perl --> Python

If I had to choose favorite languages, it would be HTML/JavaScript and Python.

princec
02-14-2005, 01:46 AM
On the one hand, I agree... on the other hand, there are many of us in here with say, 1 out of 3 critical skills. I'm crap at business & marketing, I have no knowledge of web coding, and I can't use Photoshop, but I can code, so I ask questions about the bits I don't know. As far as I can see there's no harm in someone strong in other areas but with no programming knowledge from asking about it in here.

When the first 'i r writing a MMOLRGP need coderz and h3lp plz' post turns up I'll get me coat ;)

Cas :)

Fry Crayola
02-14-2005, 02:08 AM
I started out with Locomotive BASIC on the CPC6128. And that was good for many a year. I started dabbling in Z80 Assembler in the twighlight years before I finally got a proper PC in 1999. Fiddled with QBASIC and DIV Games Studio before moving on to BlitzBasic.

Also learned Java at University, and did a little C in my work experience but enjoyed neither.

Ricardo C
02-14-2005, 02:11 AM
BASIC (learned enough to code really terrible text adventures :p) --> Fortran --> Pascal --> C++ --> C-Script (3D GameStudio's C-like scripting language)

Unless Conitec stops updating GameStudio, and lets it fall behind the competition, I don't see myself ever returning to "real" programming. C-Script is just too comfortable for me to abandon.

Greg Squire
02-14-2005, 07:58 AM
Basic (TI994a) -> Action (Atari 800XL) -> C -> C++ -> Java -> HTML & JSP -> Basic (BlitzBasic)

I've pretty much come full circle. Started with Basic and now back to basic. I'll have to say though that Java is still my favorite language. Once you learn one language, it's not nearly as hard to learn another. IMHO, what language you use shouldn't be the first consideration. First it's the game design, then the third party engine, libraries, and any other technologies that will help you build that vision. After those are chosen, you then use the language that the engine supports. If the engine supports more than one then you could then pick your favorite. In my case it's currently BlitzBasic (Blitz3D).

Abscissa
02-14-2005, 02:03 PM
My progression: Apple Logo and Applesoft BASIC -> Apple II machine code -> QBASIC -> Visual Basic (v3.0) -> C -> C/C++ -> Java (Breifly) -> C# and D

I've also done a little bit of work with these at one time or another: (X)HTML, XML, CSS, ASP (w/ JScript and VBScript), PHP, GWBASIC (the precursor to QBASIC), NSIS's scripting language, DOS/Win Batch, ABEL (IIRC), MAKE, Ant/NAnt, SCons, A-A-P, Prolog, X86 Assembly, Assembly and Microassembly on a ficticious stack-based CPU (For a college class), TI86 Basic, Maple

And then there's a bunch that I've looked into but never really used.

Favorites: Applesoft BASIC, QBASIC, GWBASIC, C#, D, Microassembly on a ficticious CPU, ABEL (Designing hardware is fun :) )

RedKnight
02-14-2005, 06:51 PM
Um...they're two different languages.

Because I love the old c style of coding.

Jack Norton
02-14-2005, 11:22 PM
C64 Basic (making text adventures) -> AMOS on Amiga (great language it was!)->Borland Pascal on 386->Blitz3d (argh... luckily I don't need it anymore!)->C+PTK (not C++ just C).

Nemesis
02-15-2005, 01:50 AM
I had AMOS too.. it was probably the most instructive piece of software I ever owned! I remember having some friends in the UK sending over the software package becausue AMOS wasn't available for sale where I live.

I even had a game published with a friend on Amiga Format in 1992 :)

halodrake
02-15-2005, 04:11 AM
Um...they're two different languages.


Not really. Here's how it goes- if you program in C, you just say "I code in C", if you program in C++ you say "I code in C/C++". The reason for this is that C++ is actually a precompiler (macro compiler? I forget the term) that turns C++ code into C before any other compilation step. That, and since you can easily code both in Vanilla C and C++ in a C++ environment, it's plain silly to say just C++.

My experience goes like so->

Tandy Color Basic-> GW Basic -> Qbasic -> 8086 ASM (using MASM) -> Java -> C/C++

After that it stopped being a progression, and I learned (but keeping C/C++ as my favorite, although Lua is coming close to replacing it now...) Visual Basic, PHP, ASP, Javascript, Ruby, Python, Lisp and Lua. For someone just starting out- hmmm. I'm not sure. I would say just learn C++. Or Java. Get used to curley brackets now, in case they become cool again and every language supports them. Or C#. I almost said learn Python, but after coding in Lisp and Lua, it's Tuple structure is very lacking, and could easily teach bad programming skills. As is it's half-assed Object Oriented features. Best stay away from it, or pick up some nasty habits.

monco
02-15-2005, 05:16 AM
I'm just starting out to learn how to program. I would like to ask you veterans what language I should start with so that I learn all the important concepts/ideas of programming without getting bogged down in all the minutiae of C/C++ rules. My ultimate goal is to learn to program Tetris, to study it to death, to grasp what programming is all about, before tackling C/C++. Thanks.

Learn to program with Python:

http://www.python.org

And use PyGame to write Tetris:

http://www.pygame.org

monco
02-15-2005, 05:20 AM
Pascal -> C -> C++

C/C++ is the only langauge I'm going to use for the rest of my life.

You're either on your death bed or blowing hot air. I used to think that as well before I broadened my horizons and learned new languages. Use the right tool for the job.

monco
02-15-2005, 05:25 AM
Not really. Here's how it goes- if you program in C, you just say "I code in C", if you program in C++ you say "I code in C/C++". The reason for this is that C++ is actually a precompiler (macro compiler? I forget the term) that turns C++ code into C before any other compilation step. That, and since you can easily code both in Vanilla C and C++ in a C++ environment, it's plain silly to say just C++.


Baloney. C compilers can't compile C++ code. I don't care how C++ code becomes object code, if you're writing C++ you're writing C++. You *can* mix the two quite easily, but if one learns by using only modern C++ constructs/features, they may struggle with plain old C.

20thCenturyBoy
02-15-2005, 07:20 AM
The reason for this is that C++ is actually a precompiler (macro compiler? I forget the term) that turns C++ code into C before any other compilation step.
C++ is a language not a compiler. The rest of your statement is so incorrect it's not funny!

Nemesis
02-15-2005, 07:38 AM
There is an element of validity in halodrake's statement: Bjarne Stroustrup's (the father of C++, Lord Bjarne to his fans :)) compiler implementation generated plain C as output. His motivation was quite simple: as a one-man-band he couldn't afford to write out a compiler from end-to-end and couldn't be bothered dealing with cross-platform issues.

In practice most compilers write out machine-code more or less directly.

mahlzeit
02-15-2005, 07:39 AM
1) There are some things that you can do in plain old C that are not valid C++ code.
2) The first C++ compiler was actually a front-end that generated C code and used the C compiler to finish the job. I doubt that is how modern C++ compilers work, though.

RedKnight
02-15-2005, 11:02 AM
You're either on your death bed or blowing hot air.

LOL
Nope I don't THINK I need to learn
"Just Another Dumb Down High Level Scripting" language (TradeMark).
I rather spent my time on improving my skills with C/C++ with stl, DirectX, Opengl, and all the other API, then wasting it on a "BRAND NEW" language.

Use the right tool for the job.

I have the right tools allright.
If I wanted to create 3d animated models, I uses Anim8or and Milkshape3d.
If I wanted make a webpage, I uses a MS html editor.
If I wanted some 2d effect, I just use Photoshop.
wanted more tools, search it on download.com
and I can go on and on and on, and most of these Tools doesn't have a thing to do with programming language

Diodor Bitan
02-15-2005, 11:41 AM
Original post by RedKnight
I rather spent my time on improving my skills with C/C++ with stl, DirectX, Opengl, and all the other API, then wasting it on a "BRAND NEW" language.

Learning new exotic languages will help you become a better c++ programmer by giving you new ideas and helping you look at problems from different angles and think in different ways.

Bluecat
02-15-2005, 11:43 AM
LOL
Nope I don't THINK I need to learn
"Just Another Dumb Down High Level Scripting" language (TradeMark).
I rather spent my time on improving my skills with C/C++ with stl, DirectX, Opengl, and all the other API, then wasting it on a "BRAND NEW" language.


Learning a "BRAND NEW" language can sometimes help you better understand features of your primary language. For instance learning a pure object oriented language like Smalltalk might give you an insight that you can use when programming in C++. Learning a new language can teach you to approach a problem from a different angle.

By all means, spend time improving your skills in the language of your choice, especially if you want to get a project out the door, but don't disregard the advantages of learning new things.

=D=
02-15-2005, 02:25 PM
for a start game programming I recomendet:

Python (http://www.python.org)

and addon for python

PyGame (http://www.pygame.org)

those tools however required some programming experience

for completely beginers there are:

Basic4GL (http://www.basic4gl.net)

it's a freeware windows yet tool for easy game developing (3D is possible) with suport opengl 1.1

however it's still in develop and mising some features, bur good enough for learning programming and OpenGL

SDLBasic (http://sdlbasic.sourceforge.net/flatnuke/)

for 2D game developin, based on sdl, there are version's for linux and some other platform so it's cross platform. But like Basic4Gl still in heavy develop so you wont be able to do good game in but it's enough for start learning programming

oddvark
02-15-2005, 05:28 PM
Tetris is an easy game to program, i recall making a QBASIC version only took a hour of planning (designing), few hours to program, and a few hours to debug.

I would argue that VB and Delphi are not good IDE's to learn to program in, the reason being that these modern programming environments are often wrapped in development libraries for the specific Operating System. For example, VB comes with all this Windows specific stuff (windows, buttons, etc) so that 90 percent of the work is not learning how to program in general, but to program "Windows".

What you want is to get a language free from as much of that as possible, so that you can learn the basics without having to deal with windows, messages, etc. Also, the VB and Microsoft blend of Object Oriented programming is a poor model to learn from (well at least the old stuff...C# got it right, but what did it take them, 10 years?!!!).

This may sound like an odd choice, but I would suggest Java then. It is very simple to learn, the Windowing system that its based on actually is represented by a clean object oriented library that would be good to learn from, and its syntactically (sp) close to C++ / C# / C etc, not that syntax will bug you in the end.

Hope this helps.

Mark Currie
02-15-2005, 09:09 PM
For the purposes of making games....

Applesoft Basic -> Turbo Pascal 3.0-5.0 -> Quick C 2.5 -> Turbo C++ 1.0-3.0 -> Watcom C++ 10 -> Visual C++ 6.0-7.1

Cartman
02-16-2005, 09:16 AM
Basic > TI Extended Basic > Apple Basic > Pascal > C > 68000 Assembly > C++ > Visual Basic > SQL > C# > BlitzMax

Mark Sheeky
02-17-2005, 01:29 AM
My path

Microsoft Basic (on a Dragon 32) -> C64 Basic -> 6809 machine code (not assembly!) -> Amiga Basic -> Pascal -> COBOL -> DBase -> 680x0 assembly -> C++ -> Visual Basic (hey, it's the same as the Dragon used!).

I wrote at least one game in each except DBase. The COBOL game was a text adventure. Worst language: Amiga Basic (by Microsoft again).

Mark

Nemesis
02-17-2005, 02:01 AM
This is my learning order:
Amiga Basic -> Amos Basic -> Borland Pascal with Objects -> C++ (take 1) -> VB/Access Basic -> Intel Assembly -> COBOL -> Java -> C++ (take 2) -> C# -> VB.NET

Usage order:
Same as above except that I use Java, C++ and C# interchangably!