PDA

View Full Version : Some questions on languages from a new guy (...beginners)


ProfessorApe
2007.01.17, 07:03 PM
I'm new to this board and after searching through the forums and reading quite a bit, I still have a couple questions.

I've been trying to learn programming off and on for several years but since I'm a graphic designer (production only a.t.m.) my work doesn't require any coding. I've read parts of several books and tried a handful of languages, never finding quite the right language/book match. I think it has partly to do with my lack of formal education on the subject and having no programmer peers.
I am trying programming once more, kind of a multi-pronged attack using several languages PHP, BASIC (in some form) and Applescript. I know using multiple languages can complicate learning but I don't have a problem separating the syntactical differences in my mind.

So, in a nutshell, I'm trying to learn how to program. a.t.m., I started with TNT Basic a week ago. I'm interested in making little games like Pong, Breakout, Tetris, and the like, then on to 8bit NES style platformers and shooters, etc. Not too interested in 3D games, maybe later IF I have a solid grip on programming. I'm also interested in learning how to build small apps, which Applescript Studio tutorials are teaching me. Thinking of getting the book "Beginning Applescript" (for cheap on amazon.com). Opinions?

I tinkered with C++ and found it too complex for a noobie. I see C recommended but am afraid it will also be too complicated for a non-programmer to learn alone.
I like what I've seen of Applescript and TNT Basic's syntax(es?) and want to stay with some incarnation of BASIC until I get a better understanding of how to build a complete application, on my own, multiple times.

Questions:
1) What is the best current incarnation of BASIC (preferably free, while I'm learning) ?
I've seen mention of TNT, METAL, FutureBASIC, ExtremeBASIC (dead?) and for $$ RealBASIC.
TNT doesn't seem to have a windowed mode, only fullscreen, unless I haven't discovered it yet.

2) Which has the best support, language references, tutorials, etc?
I noticed each incarnation of BASIC has a different syntax/features. This makes finding independent learning materials and reference more scarce, leaving all teaching tools to the hands of the users and software author. TNT seems to have a good reference but spotty explanation of feature implementations.


Thanks for taking the time to read this and possibly suggest something.

OneSadCookie
2007.01.17, 07:10 PM
BlitzMax is the best "BASIC", though calling any of those products "BASIC" is a bit of a stretch. I wouldn't touch the others with a barge pole.

There's no substitute for asking questions. If you don't understand something, ask. There are people here who use all sorts of languages, you can probably get help... though the more commonly-used your language of choice, the more likely you can get help :)

leRiCl
2007.01.17, 08:46 PM
TNTbasic does have window mode, but you haven't discovered it yet.
Call it like this:
window mode 640,480

ProfessorApe
2007.01.17, 10:59 PM
O.S.C & leRiCl, thanks for your responses. I'll try the window mode in TNT. I knew how to set the resolution and activate it, just not the windowed part.

O.S.C. since your recommending avoiding the BASICs what might be the better language to try learning? Dive straight into C? How much different is C from C++?
I have the book "Beginning Game Programming with C++". It seems decent informationally, well written and handles only console output therefore keeping it simple, stupid. :)
I was uncertain about going the "C++ as my first language" route, so what would be your advice: stick with something simpler till I "get" programming or dump BASIC for C? Hopefully I don't sound like a jerk, I'm just looking for thought out, honest advice for a non-programmer.

Leisure Suit Lurie
2007.01.17, 11:30 PM
TNT and Metal are unlikely to advance further. Blitz is cheaper than REAL, faster, and has a huge community to help when you get stuck.

Future BASIC is actually really good, but not particularly games oriented. Its also hideously expensive IMHO. Its $169 I think whereas REAL is only $99 (for the standard version---which only compiles for Mac.)

ProfessorApe
2007.01.18, 01:19 AM
I am not set on game only programming, I would like to learn a broader understanding, something I can transfer to desktop or web app stuff too. I worked with TNT more tonight, learning how some commands work and how it affected the file I had open.

I looked over the REALbasic site, got the demo and a look the at syntax for version 4.6. It looks similar to Javascript, which I tried and failed learning a while back. If you're unfamiliar, TNT's syntax looks sort of but not exactly, like Applescript:

int number = 2
window mode 640,480
if something=2 then something=something+1
while x<=10
print "still less than 10"
x=x+1
wend

etc...

How complex is REALbasic vs. Applescript or TNT's syntax?
Reading a tutorial from http://www.maui.net/~mauitom/RBTutorialOne.html it reminds me of the Applescript Studio IDE. Comparisons? I imagine trying to write a game with A.S. would require learning OpenGL, which is probably quite a leap from where I am now.

Sorry for running on.. I'm eager to learn and tired of feeling overwhelmed.

Thanks for helping, it's appreciated.

Skorche
2007.01.18, 02:31 AM
My two cents:

1) Pick a language and use it until it feels limiting. Something like TNT or Metal basic, are relatively easy to learn, but you'll probably outgrow it soon. (not that that's necessarily a bad thing)

2) Learn another language. Every language has benefits and draw backs. Some give you a lot of raw power, some are very easy to use, some are very fast, and some have libraries to do anything you could think of.

3) If you are really serious, you should eventually learn C. It's more or less the common denominator of all languages. Most languages in existence are either based on, or implemented in C.

Many people do learn C as beginning programmers, so don't feel discouraged that it's too complicated. On the other hand, many of those same people would not recommend C to beginners. It's a worthwhile experience, but it depends on how eager you are.

maximile
2007.01.18, 03:33 AM
I think it's worth persisting with C for a bit. I spent ages playing with REALbasic and AS Studio and TNT and Metal and PyGame, but eventually it was SDL and C that made me click - it all seemed to make so much sense.

It takes so little code to get some really cool things happening on the screen with SDL, C and OpenGL.

igame3d
2007.01.18, 08:33 AM
Don't waste time with Applescript.

You want a super simple syntax to learn?
Runtime Revolution or Media (http://www.runrev.com)
Try the demo and see if you can't get the hang of it, if I can learn it anyone can.

You can make apps in that pretty quick and if you ever learn C/C++ you
can write extensions for it.

diordna
2007.01.18, 11:11 AM
If you want to make web apps, or general games, get Processing (http://www.processing.org) and ask josephduchesne all your questions. It's fine for games, and a great introduction to Java.

On the other hand, I make my games in BlitzMax, but I find the syntax cumbersome, so occasionally I'll switch to Processing for a while just to refresh myself.

ProfessorApe
2007.01.18, 11:41 AM
Thanks for the suggestions, there's a nice diversity of opinions.

maximile: Out of curiosity, what turned you away from the other more simplified dev packages?

diordna: I have seen Processing before, more recently I came across some guy's site where he has dozens of "pieces" of art that grow once you start the applet. Pretty awesome. I didn't know you could do game stuff with Processing, seemed like it was for fancy, view-only graphics. I'll check that out too.

idgame3d: That Revolution package seems pretty awesome, what are the capabilities/limitations you have encountered personally? Can it do games as well as desktop apps?

I was thinking of reading up on C more closely, maybe it's not as scary as C++. :\
Any books to recommend?

The hardest part is finding the "right" language to learn. Having tried and quit a multitude of languages and really not wanting to do that again, I need to stick with one until feeling limited by it, as Skorche said earlier. So, finding a language with the "right" level of complexity vs. capability will help me stick with it. I don't want to spend too much money initially, in case that product is a dud for me, but I guess education isn't free, whether you're spending money or time or both.

Everyone's comments have been very insightful, keep them coming. It's great advice for me and anyone else out there who's feeling the way I do now.

sealfin
2007.01.18, 12:42 PM
I was thinking of reading up on C more closely, maybe it's not as scary as C++. :\
Any books to recommend?

Learn C on the Mac (http://www.spiderworks.com/books/learncmac.php)

unknown
2007.01.18, 01:06 PM
I would not say there is a right language to learn,
a good post that elaborates on this is here http://weblog.raganwald.com/2006/10/are-we-blub-programmers.html

as long as you dont get stuck thinking about all programming tasks in term of a particular programming language, and you stay willing to learn somthing new incase it better suits your needs, then you should be fine whatever order you learn various programming languages in.

igame3d
2007.01.19, 01:39 AM
idgame3d: That Revolution package seems pretty awesome, what are the capabilities/limitations you have encountered personally? Can it do games as well as desktop apps?

Limitations: price, but like a Mac you pay extra to have all the ugly, or most of the ugly, taken out of the user experience. I started programming this thing only with a sample 3D stack and occasional help in IM's. It might have been a month or two before I looked at the documentation and learned new tricks.

Tiny user base mostly focused on applications and not games.
Since we are the only people making a 3D external for it as well as a game design application with it, there's not too many people to ask questions about how to do the weird things I want to do. Then we get weird requests like 3D spreadsheets and visualization of a million internet connections in 3D...ya
thats why I do this stuff, not.
No 3D out of the box.

Although Arcade Engine has some kind of 3D data manipulation I have not seen a Battlezone or Star Wars arcade clone created with it yet to suggest it can do good games with vectors.

Occasionally the software has bugs that skew twenty minutes of work, save often. The latest release however is fairly stable, unless you write great bugs like me. Still save often.

Its perfectly suitable for desktop applications.
I have yet seen the limits of what it can do gamewise, the cost and obscurity I believe sorely prevents it from catching the interest of the average game dev wannabe. They are trying with Arcade Engine, but they have a long way to go.

Turn your volume down and check some of Scott Rossi's work under MEDIA ([url=http://www.tactilemedia.com/)

and here's a bunch of stacks you can run (http://revolution.widged.com/stacks/)

I say run with the demo until it expires.
The other languages will be waiting, and Apple has a new widget development app in beta at the moment.

diordna
2007.01.19, 10:50 AM
diordna: I have seen Processing before, more recently I came across some guy's site where he has dozens of "pieces" of art that grow once you start the applet. Pretty awesome. I didn't know you could do game stuff with Processing, seemed like it was for fancy, view-only graphics. I'll check that out too.

Actually, josephduchesne and my 3DU entry is written in Processing, and it's a 3D Asteroids clone.

ProfessorApe
2007.01.24, 01:01 AM
@sealfin: I just purchased that "Learn C for the Macintosh" ebook after reading the preview pdf. I liked how the terminlogy was discussed in a non-technical way. I have spent the last few days looking at various other C books, pdfs and tutorials, many of which are grey when it comes to talking about the bits that make up C, what they mean and how to make something useful out of them, and most aren't Mac-oriented. I liked this ebook since it was targeted directly at new wannabe programmers on Macs using Xcode. Makes sense.

Thanks for posting the link. I'm sure I'll have more questions later. Hopefully someday, I'll have answers as well as questions.

AnotherJake
2007.01.24, 04:52 AM
I originally learned C using the first edition of that book back in like 1991, when it shipped with a floppy in the back cover -- on a Mac Classic! I lost the fist edition, but the second edition from 1995 still sits on my shelf. The only other C book you need is "The C Programming Language", by Kernighan and Ritchie, commonly referred to as K&R. That'll be listed in the bibliography of the book you're reading. C is well worth your trouble to learn, but it can be tough at first, so good luck!

leRiCl
2007.01.24, 10:34 AM
if you've become competent with TNTbasic, I seriously recommend Processing for your next step.

my $0.02.

EDIT: didn't see you already bought the C book... oh well. C is good too.

ProfessorApe
2007.01.24, 11:01 AM
@leRiCl: I was having some trouble learning how to use sprites.
Some of TNT's documentation is vague unless you already know what you're doing. Like Procedures. Is it like a function in other languages or something different? I haven't asked on the forum yet, I was mostly modifying the code and referring to the docs. I rebuilt and modified the Splats game, but couldn't figure out how to use a specific sprite instead of TNT defaulting to the first one in the library. Perhaps the Splats example isn't the best one to start with.

@AnotherJake: I liked what I read so far in this C book, I'm hoping for a good experience with it. I looked through the K&R book but it looks like you should have a basic grasp of the language before using that book. I'm sure it will be a good reference later.

AnotherJake
2007.01.24, 01:11 PM
Yeah, some people actually have learned C from K&R. I just use it as a reference myself; mainly the part in the back about the standard library functions. I don't need it very often anymore, but it has been extremely useful over the years.

leRiCl
2007.01.24, 06:10 PM
@leRiCl: I was having some trouble learning how to use sprites.
Some of TNT's documentation is vague unless you already know what you're doing. Like Procedures. Is it like a function in other languages or something different? I haven't asked on the forum yet, I was mostly modifying the code and referring to the docs. I rebuilt and modified the Splats game, but couldn't figure out how to use a specific sprite instead of TNT defaulting to the first one in the library. Perhaps the Splats example isn't the best one to start with.
To use a sprite:
1. Load the image bank that contains its images. eg Load image bank 128. note that you only need to load each image bank once.
2. Pick a sprite number unused, you can use "sprite exists" to help you. But in this case, for quick purposes, we'll pick "2".
3. Assign the sprite's image bank. set image bank 2,128
4. (OPTIONAL) choose a "canvas". canvas 0 is default.
5. Display the sprite. sprite 2,X,Y,0 The Last value is the Nthimage in the image bank. I used 0 because if an image bank has any images, 0 is always the first image.

Yes, Procedures are kind of like functions, except you can't call procedures from other files. I agree, the documentation is kind of vague, I had to go through source code others wrote to get a good understanding, at times I was even the "explorer", because there are times I can't find any relevant source code or documentation. It involves some trial and error.

The good thing about TNTbasic, is that it can teach you variables and arrays very quickly, and this is the most essential concept any programmer must know. So once you understood variables and arrays, it would be a good idea to move to something else, because the idea of "draw once, and forget" and its sprite /sound system is alien in other languages.