Some questions on languages from a new guy (...beginners)

Apprentice
Posts: 6
Joined: 2007.01
Post: #16
@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.
Quote this message in a reply
Moderator
Posts: 3,577
Joined: 2003.06
Post: #17
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!
Quote this message in a reply
Member
Posts: 90
Joined: 2006.11
Post: #18
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.
Quote this message in a reply
Apprentice
Posts: 6
Joined: 2007.01
Post: #19
@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.
Quote this message in a reply
Moderator
Posts: 3,577
Joined: 2003.06
Post: #20
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.
Quote this message in a reply
Member
Posts: 90
Joined: 2006.11
Post: #21
Quote:@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.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Processing tutorial for beginners stevejohnson 5 6,232 Jul 11, 2008 09:29 PM
Last Post: stevejohnson
  High and Low Level Languages FlamingHairball 22 10,693 Jan 8, 2008 10:23 PM
Last Post: PowerMacX
  What languages do you need for a MMORPG? Lost22 12 6,126 Nov 20, 2007 01:07 AM
Last Post: Lost22
  Re-introduction of low level languages? Duane 4 3,357 Oct 30, 2007 03:10 AM
Last Post: OneSadCookie
  Pros and Cons of Different Languages Blacktiger 40 15,388 Aug 2, 2007 09:36 PM
Last Post: richard