PDA

View Full Version : ALT: Step 1: I Am a Noob


keithrolf
2004.01.10, 08:21 PM
I am a complete noob to programming. Game or otherwise.

I want to design and program games one day. I know nothing whatsoever about mac programming.

Where is the best place for me to start learning?

Remember, I am a noob, so throwing code libraries etc. isn't going to help. I'm thinking more along the lines of a very simple tutorial on where to find dev tools how they work and maybe writing a "hello world" app.

Thx!

keithrolf
2004.01.10, 08:31 PM
Also, any suggestions for the "best" beginning programmers book (for Cocoa I guess) would be helpful.

Thx!

Josh
2004.01.10, 08:33 PM
Your best bet probably is to first learn METAL Basic and/or TNT Basic. (anyone have some linkage?) They allow you to get into programming games without needing to know the stupid nitty-gritty. Feel free to post any questions you may have!

Justin Brimm
2004.01.10, 09:40 PM
Unfortunately, both METAL and TNT Basic amount to jack in the long run, but if you really know absolutely nothing, they might be a good place to start. I suggest learning Obj-C and Cocoa.

igame3d
2004.01.10, 09:58 PM
If you just bought a mac the dev tools should be on your hard drive ready to install. If you just bought Panther, it should be on those CD's.
Else the older Project Builder dev tools will be with your Mac OS cd's.

go htpp://developer.apple.com and sign up for the free online ADC.
At least to join up...their site alone is a maze of confusion for newb, but at least you will have the sign up part out of the way and you can occasionally browse their files and source samples for inspiring things to boggle the mind. Project builder makes a nice text editor when you don't know how to program at least

Somewhere in that mess at apple is a cocoa tutorial for building some crap apps(currency converter, and ..some other trash). Why they don't have pong or something fun like even hangman is beyond me.

As for books..related to game dev, I've not come across one that takes you from nothing to something that isn't for Windows.

Hopefully the Inkubator project will get rolling again soon and perhaps even I can learn this programming stuff with an actual game project starting at line one instead of "here's 10,000 lines of code, get it on!"

While you mess around with Metal and finding your way through the ADC why not give a try to some tastey iGame3D, before C/C++/Obj-C sour your senses.
the Mac download is here
(http://www.igame3d.com/beta/iGame3d_01_07_03.sit) and extra 13 megs of content are here
(http://www.igame3d.com/beta/iGame3D_121403content.sit)

Whatever you take to, its going to take some time, so be patient.

Good Luck!

Mazilurik
2004.01.10, 10:00 PM
METAL and TNT are good if you want to jump in and start making games, but if you're willing to be patient and invest time in learning a more advanced language before starting to make actual games, you might be better served by learning C and getting some programming experience, then reading Cocoa Programming for Mac OS X (http://www.amazon.com/exec/obidos/tg/detail/-/0201726831/) by Aaron Hillegass when you're ready to move on to Cocoa. This is more work, but it would give you a better foundation for serious programming than METAL or TNT would.

Mark Levin
2004.01.11, 02:22 AM
I'd say that the Basics are a good place to start. No, they aren't good for "serious" programming, but this person seemingly wants to start absolutely from scratch, with no prior programming knowledge. A very simple but limited language like TNT or Logo is perfect for learning concepts like variables and types, subroutines, common constructs (if/while/etc) without trying to simultaneously learn the system library and learn how to use a "real" IDE. It will give you a grounding in how programming in general works, and *then* you can take on C.

Skorche
2004.01.11, 04:09 AM
Just a further refinement of what's already been said:
1: Basic languages are a really good place to start to learn programing. Both Metal and TNT have easy to use graphics and sound commands. Use these if you want an easy start.

2: Learning C-anything has a steep learning curve, you really have to learn it all at once. There are a lot of things that C simply won't stop you from doing that will confuse you when they go wrong. Basic is a little more forgiving.

3: Using any library like Cocoa, SDL, allegro, Carbon, OpenGL, ect. really requires you to know how to use the C language fairly well. Trying to jumpstart into them while learning C will probably leave you feeling very frustrated. Take it slow, learn one thing at a time. This really turned me off for a few years, I wanted to learn how to graphics libraries before I knew how to use C.

Taxxodium
2004.01.11, 05:23 AM
I started programming by writing some simple AppleScripts. It's very easy to learn that language and there is a free pdf book about AppleScript at Apple's developer site.

After that I learnt C/C++ since that's what the probably what most programmers use most.
Once I learned that I learnt about the Mac Toolbox, but since that doesn't exist you have 2 options:

- Learn Carbon, it uses the C syntax and should be easy to understand
- Learn Cocoa, it looks familiar to the C syntax, but isn't quite the same. Learning Cocoa requires you to learn Objective-C. A good book for this is "Learning Cocoa" from O'Reilly.

For games I highly recommend Mac Game Programming by Szymczyk. I uses Carbon but the code should be easily portable to ther languages.

XxtraLarGe
2004.01.11, 05:30 AM
I am a complete noob to programming. Game or otherwise.

I want to design and program games one day. I know nothing whatsoever about mac programming.

Where is the best place for me to start learning?

Remember, I am a noob, so throwing code libraries etc. isn't going to help. I'm thinking more along the lines of a very simple tutorial on where to find dev tools how they work and maybe writing a "hello world" app.

Thx!

I'd say start with the tutorials at MacDevCenter.com in the Cocoa section. They have tutorials on C + Cocoa. Start with the top 5 tutorials on the page ("C is for Cocoa" through "The Double Life of Variables"), then work your way up from the bottom ("Digging deeper into Mac OS X"). The C tutorials aren't the best, but they are o.k., and they are free so you can't beat the price. There are other sites which offer free tutorials. Here is a page of links: http://cocoa.mamasam.com/links.html

If you want to spend money, I'd say get "Learning Cocoa with Objective-C (2nd Ed.)," which is a much better beginner's book than "Cocoa Programming for Mac OS X" by Aaron Hillegass. Then get the Hillegass book, which is better overall. Read them in that order, and you'll get a lot more out of the second one.

While you're reading any of this stuff, think of a game you want to create, and how you might be able to use what you are learning to make your game. A lot of things you'll learn at first won't help you make a game, but they will lead to things that will. Don't get discouraged, keep on trying.

That's my advice. Best of luck to you!

Fenris
2004.01.11, 05:50 AM
If you want to get into game programming rather quick, I suppose PyGame is a viable way to go.

http://pygame.org/

DoG
2004.01.11, 11:43 AM
Just a quick clarification: Carbon and Cocoa are APIs, while C, C++, and Objective C are programming languages. Carbon is a C/C++ API, Cocoa is an Objective C API to MacOS X and the MacOS X application framework AppKit.

TNT/METAL Basic are a language coupled to an API and application framework.

Bachus
2004.01.11, 02:29 PM
If you truly have no programming knowledge whatsoever, then a very good place to start is by taking a class in school. The organized environment gives you direction and a good basis of general programming topics. Once you have that basis it's quite a bit easier to strike out on your own with occasional support (like say from this forum).

keithrolf
2004.01.11, 07:19 PM
Thanks to everyone for the advice, support etc.!

Sounds like getting my feet wet with something simple is the way to go. I'm not looking to dive nose-first into game programming specifically. Just getting to be able to understand code and how to write a few very very simple apps that aren't necessarily useful, but practice, is where I'm looking to start.

Metal, TNT etc. sound like the way to begin. I know they aren't really something to get use to in the long run (from what many of you've said). But I think they'll give me a basic idea about what the heck programming entails. That way when I'm ready to move on to libraries like Cocoa, Carbon etc. then at least I'll have some reference point to begin from.

Taking a class in school sounds like a very positive beginning as well, it was definitely good back in HighSchool, but as with alot of knowledge from my HS days, it's gone now.

Also, many thanks for all your Book suggestions, I've filed them away for the future and will definitely heed your advice and approach with patience.

I may not get to games anytime soon, but one day when I know what I'm doing, I want to be able to contribute to the Mac Gaming community.

I look forward to conversing with you all on the forums, hopefully I can get to a point where I contribute something worthwhile. Thanks!

*** Also as a side note, I have been in Graphic design for over 7 years now, design, typography, web, print, illustration etc. I'm not the best in the business, but I think I hold my own. If anyone is looking for graphics work on their games let me know. I'm pretty pro-bono oriented, which never hurts! :) ***

igame3d
2004.01.11, 08:19 PM
After browsing about 500 programming books for PC at the Barnes & Nobles (http://www.bn.com) I found that B&N now publish some of their own books.. the "in easy steps" series. They are only $9.99 compared to all the other books which are no less than $30.

I picked up the C++ in easy steps, its a 192 pages long and a very easy read. In the first 14 pages I found out how to fool with gcc in terminal, and he explains hello world on half a single 14pt type page.

This looks like it will at least be a handy reference that I can go back to every time I forget how this stuff works, as opposed to the 800 page volumes.

suhbataar
2004.01.12, 05:46 PM
Metal, TNT etc. sound like the way to begin. I know they aren't really something to get use to in the long run (from what many of you've said). But I think they'll give me a basic idea about what the heck programming entails. That way when I'm ready to move on to libraries like Cocoa, Carbon etc. then at least I'll have some reference point to begin from.v

I would personally recommend Metal, since I have some experience with it myself. I tried TNT, but could never really get it worked out. Of course, you should look at both and decide which seems easier. Either of them will let you learn your basic control flow, variables and all that.

When you do go on to learning Cocoa, I suggest you start by reading the tutorials by Mike Beam here (http://www.macdevcenter.com/pub/ct/37). I've spent today going through quite a few of them, and they help you get into using the libraries and Interface Builder very quickly.

Good luck to you!

blobbo
2004.01.12, 11:13 PM
ok, so i'm a bit surprised nobody's mentioned *gasp* java.

It's object-oriented, and it builds logically. you don't have to worry about memory management or pointers, so you can concentrate on understanding objects. it teaches inheritance, interfaces, etc.

best idea: take a course. you'll learn enough that you can apply to basically any language. just careful with the syntax.

i took a few courses on java (i had programmed in c and basic before), and learning objC+Cocoa afterwards was much easier. the concepts involved in object-oriented programming are convoluted - learning a language that takes care of the background garbage (hooray for the garbage collector!) is sometimes much easier.

plus it's superduper-well documented. http://java.sun.com/

DoG
2004.01.13, 12:31 PM
Programming in Java is like walking through a minefield, blindfolded. C/C++/ObjC are much more mature and less buggy. Not to mention it is slow. Yes, it can be optimized to be in the same ballpark as C/C++, but getting there is a pain. And the logic is sometimes completely gone missing, too. 'nuff said.

blobbo
2004.01.13, 02:54 PM
Programming in Java is like walking through a minefield, blindfolded. C/C++/ObjC are much more mature and less buggy. Not to mention it is slow. Yes, it can be optimized to be in the same ballpark as C/C++, but getting there is a pain. And the logic is sometimes completely gone missing, too. 'nuff said.

but you neglect to mention that it is easy to learn. it's pretty straight-forward... what you lack in speed you can gain in other languages using the concepts you learnt through java. i think it's a good learning language.

Fenris
2004.01.13, 05:53 PM
First and foremost - don't be afraid. Don't put off diving into new stuff because you think you can't do it. High self esteem is your best friend here (next to the caffeine addiction and angelic patience). Whenever you find something you want to learn, try it out in a small 20-line program, just to get the feel for it.

Then come weep to us on the forum. ;)

Carlos Camacho
2004.01.13, 06:56 PM
Keep lurking here because sooner or latter I will post my 3/4 completed "METAL for Dummies" tutorial. ie, from zero to hero guide.

About the advice you get. It is like being at the North Pole and asking 20 people which way is the best way to go to the South Pole. Some ways will be harder, some ways you will get there sooner, but one thing is for sure, everyone will have their own directions, since they have already made the journey. And most likely they will tell you to take the route they did.

As for me, I think nothing hurts in the grand scheme of things. Syntax (the commands) may be different, but overall, the logic tends to be the same (in general terms.) So, if you learn to ride a bike, you should be able to jump to another bike and be OK when you want to go faster. True, some languages may ask you to re-think bad past habbits. But if you have the brain for it, then it shouldn't be hard to learn the new restrictions or benefits of a new tool/language.

To me, the most important factor is to get results early and understand what those results mean. I do feel that BASIC in many ways allows for that. Cocoa is a great thing, and if you go that route, take it with Aaron's book (see my book recommendations here). But I feel C/C++/Objective may not be ideal for someone who is starting at zero, and needs to get that feeling of "hey, I did something!" To me, that is vital because it encourages you to experiment and keep moving. METAL, because of a lack of a built-in GUI tool, is about as easy as you can get. TNT Basic though, which is supported, and can go a bit further IMHO (especially on Mac OS X), would be better. And if you have the budget, look to FutureBasic, which gives the ease of BASIC, but the power and speed of C. REALbasic is nice, and a good way to learn some concepts if you want to move to C++/Objective C, but because of its handy GUI-builder, it kind actually be tough for a complete newbie IMHO. Though the RB Def Guide could help alot in that respect.

PyGame might indeed be a way to go. Other scripting-based systems available. A few years ago, I was helping to translate a cool little scripting language for making arcade games. Kind of like METAL. Alas it was based on QuickDraw and hasn't made it over to Mac OS X.

Too often I think in our zest to recommend what "pros" use, or what the industry uses, etc., we forget that a person starting at zero may end up getting fustrated with what we recommeneded and give up on their dreams -- and then we all lose.

Of course on the otherhand, if you end up like <fill in his name>, take our advice, try every tool and give up after 4 minutes, then this might not be the field for you. ;) In which case, you can still be a part of what is going on with your graphic skills.

You should do some searched here because many people have asked the same question before.

Before I go. Many of you suggested various languages/tools. I want to challenge you all to work on a Hello Tutorial for your respected suggestions. Let's see you all put your compiler where your mouth is, and pen a tutorial.

Looking forward to your contributions.

Cheers,

blobbo
2004.01.13, 07:24 PM
heh, hello world?

boy i wish it was pong instead ;)

we'll see. if i have time i'll do a quick java swing "hello world" tutorial.

DoG
2004.01.13, 07:32 PM
but you neglect to mention that it is easy to learn. it's pretty straight-forward... what you lack in speed you can gain in other languages using the concepts you learnt through java. i think it's a good learning language.
Never thought of it that way, since I consider SMALLTALK and the likes a good learning language for object orientation. Java is just another industrial (as opposed to academic) language with too many compromises to be really good.

Java has just never really impressed me, maybe because I knew C++ before it came out.

keithrolf
2004.01.14, 04:46 PM
Wow, thanks again to everyone. I do realize that many suggestions from different perspectives can get confusing, but often time one can see an "trend" in terms of what one may be looking for.

QBasic was what I leanred ten some years ago and I did get the point of making a "game". Though it never worked quite right. :)

Anyway, Zero is definitely where I want to start from and it sounds like METAL might be what I go with first. Then, if TNT can take me a bit further I'll try to see how "transitioning" goes for me and get into that and try to adapt the basics that I learned with METAL.

From there, we'll see. I'll probably start a new thread "Step 2: I'm a Novice" ;) to see what your suggestions would be from there. For now, I'm just gonna focus on "Hello World" and such and then go from there.

Sounds like a Zero to Hero (Cammacho) apporach will be a very interesting read. Plus I think I'll keep notes as I go along and basically write a "Noobs Guide to Programming" from a noob's perspective.

That way as I progress, my "mindset" will match that of the people who might one day read it. Noobs will hear a fellow "noob" talking about the beginning stages. And then Novices will read from a "novice perspective" as I/they get to that point etc.

I dunno, sounds valuable or do you think it'd just be ultimately more confusing that anything?

Eitherway, I apprecaite all the input and help so far. As before, I'd love to get to the point when I can return the favor! Thanks!

keithrolf
2004.01.16, 09:22 PM
Sorry, I'll shut my yap soon. I just wanted to thank everyone once again for their help, suggestions etc.

I started using METAL and it definitely is a good place for me to start I think. It is very close to Qbasic, and getting into it is sparking my memory for how programming works etc.

I'm still taking it slow but already can see how simple games can be made with it.

Wish me luck and patience! Thanks!

Josh
2004.01.16, 09:45 PM
Good luck! Feel free to post any questions you may have in our METAL forum. Also, keep your eye out for the much anticipated METAL 2.0.

keithrolf
2004.01.17, 02:54 AM
Okay, yeah, wow. I'm not gonna be able to keep my yap shut it seems.

I went over the basics: if, then, arrays, for next, input, and graphics on the nuclearnova website which, to be honest, isn't exactly noob-centric after the first two tutorials (I eagerly await your tutorial Cammacho). :)

Anyway after much mesing around I made my own game! It's simple as all get out and can only barely be classified as a game, but it feels so cool to get to that one step.

I can control a rectangle around my screen and make it eat things and add points to my score! Woot! :)

Anyway, super noobish but exciting and a big confidence builder. I know I have a long way to go before I know what true game programming is all about, but for now I am psyched for such a small step that seemed so far away only days ago, heck only hours ago.

Many thanks again folks, I'm on my way! :blink:

keithrolf
2004.01.17, 02:57 AM
Good luck! Feel free to post any questions you may have in our METAL forum. Also, keep your eye out for the much anticipated METAL 2.0.

yep yep, I have posted a bit in the METAl forums already. Expect to see me around there alot as I'm sure I'll get in over my head soon! :blush:

geezusfreeek
2004.01.27, 11:02 AM
If you truly have no programming knowledge whatsoever, then a very good place to start is by taking a class in school. The organized environment gives you direction and a good basis of general programming topics. Once you have that basis it's quite a bit easier to strike out on your own with occasional support (like say from this forum).

If you are still in high school, this is a bad idea. High school programming courses stink. There are always too many stupid people or people that never intended to be in that class for anything good to be covered. It could still be good if you want to get your feet wet, but if you already know even a little about programming, it isn't worth it. You can learn faster on your own and with forums like these to communicate with other developers.

And that is the key... use the forums to their maximum potential. The best help you can get doesn't come from books and tutorials. It comes from a question and answer atmosphere like this.

Pheonix
2004.06.25, 06:40 PM
I started learning with TNT, and it was the perfect bridge for me to get to learning C. (getting tutored by me old man).

Leisure Suit Lurie
2004.06.25, 07:07 PM
...Also, keep your eye out for the much anticipated METAL 2.0.

Um... maybe you want to just try TNT instead.

Pheonix
2004.06.25, 07:18 PM
Um... maybe you want to just try TNT instead.

TNT doesn't have windowed mode, is much slower, and costs $25 more.

igame3d
2004.06.25, 07:46 PM
Metal 2.0 is 12 months late, or is it 18 months, I lost count.

Najdorf
2004.06.25, 08:43 PM
TNT is not slower with sprites. It is slower drawing circles and lines, but since you won't use them it's not a problem. It's quite fast actually with rotations, scaling, transparencies and scrolling. If you don't want more than 640*480 it's perfect. I think it is overall better (there is no doubt higher quality games are made in TNT than metal, for some reason.)

Moreover it is more friendly and still easier, and has a nice IDE.

It costs 25$, but you can use it unlimitedly for free (you just can't make "builds"): when (in about 1-2 months) you'll have finished your first game and want to put it on the net, then you'll want to register.


By the way the main problem with starting game programming IMO is that programming "per se" is boring, so if you can't make something move on the screen right the first day it's hard to find motivation (at least, I don't find it).


In TNT to make something move up and down with the keys takes 10 lines of code.

In C and Allegro (a game programming library) about 30 lines.

In Cocoa and OpenGl, I don't know, I never managed, but I guess around 100 ;-P

Off topic:
And you'll have to grasp somewhere what "linking a library" is, since nobody will tell you, and you will think "ok, so I copy and paste this code in a file and then compile it it should work... and it doesnt!!! Because you have to go into the secret options of the editor and write something it in a secret place for it to work! Man it took me two days (24h*2) to get that... In the C manuals they just tell you : to include a library simply #include it in the code... argh!!

Leisure Suit Lurie
2004.06.25, 09:50 PM
I think it is overall better (there is no doubt higher quality games are made in TNT than metal, for some reason.)

I beg to differ, Matteo. With the exception of your game and Danlab's early ones, I have seen very few releases done in TNT. Whereas I could name a couple dozen in Metal.


Moreover it is more friendly and still easier, and has a nice IDE.


No argument there. Metal can barely be considered an IDE.



In TNT to make something move up and down with the keys takes 10 lines of code.

In C and Allegro (a game programming library) about 30 lines.


How is Allegro, BTW?

EvolPenguin
2004.06.25, 10:07 PM
In Cocoa and OpenGl, I don't know, I never managed, but I guess around 100 ;-P


ha! more like.... hmm, 5. I've done it. Almost as easy as TNT once you know how. And i've done both

Alex

Najdorf
2004.06.25, 10:21 PM
Allegro is nice. I used it a bit this year to start learning C. I had fun making vector demos like fireworks and gravity between particles and a snooker/biliards demo (managed to write a good physic system!). Anyway I used it on a PC, but there also is the Mac Port by Angelo Mottola, it *should* work.

It is obviously faster than TNT in calculations and drawing lines and circles, though not SOO much for scrolling and sprites. It also takes about 2-3 times the code to do anything.

The only thing that puzzled me is that I could not find games that looked better than the best TNT ones... most are done in low res (320*240...) and 256 colors and look amateurial... and seeing 640*480 is a bit an exception. This is convincing me that "power is nothing without control".

By the way some guys use both allegro and opengl :"AllegroGL", where you can use allegro for things such as timers and input, while opengl for 3D graphics.

BTW, which do you think is the best Metal game? The only good one (graphically) I've seen is Marin's Shootem'up (not that I searched much). Which is the most "complete"?

PowerMacX
2004.06.26, 11:57 AM
I think it [TNT] is overall better (there is no doubt higher quality games are made in TNT than metal, for some reason.)

Since Metal is free, every gamemaker wanna-be seems to make their first game with it. That's why when I see that ugly "console window with green text :blink:" ) at the begining of a game I think "Oh... noooooooooo!!!!!! There should be a warning: Made with Metal!!!!!!"

No, not every game made in Metal is bad and not every game made on TNT is good, but as somebody pointed out, you can use TNT to develop your game and if you think your game is worth it, pay the registration price to build a binary. That seems to act as some sort of "filter"...

That being said, nothing beats the performance of OpenGL accelerated sprites & a C variant.

Using SDL is pretty easy to get a basic game up and running in a short time. If you already know C, you can get something moving on the screen (and responding to keyboard/mouse control) in 2 min.

Also, about the "library" issue, SDL automatically installs project templates, so you don't need to tweak weird options in Xcode to get it to work.

And... it's free ;) !

igame3d
2004.06.26, 12:34 PM
"Oh... noooooooooo!!!!!! There should be a warning: Made with Metal!!!!!!"

Here! Here!
Contact your congressman, warning labels are a must!
What if a kid accidentaly overdoses on Metal?!?

oh, the humanity!

That being said, nothing beats the performance of OpenGL accelerated sprites & a C variant.

Yes!

And... it's free ;) !

Likewise!

Leisure Suit Lurie
2004.06.26, 12:49 PM
The only thing that puzzled me is that I could not find games that looked better than the best TNT ones... most are done in low res (320*240...) and 256 colors and look amateurial... and seeing 640*480 is a bit an exception. This is convincing me that "power is nothing without control".

They must be very old examples. Back in the early DOS days EVERY game was 320x240.

BTW, which do you think is the best Metal game? The only good one (graphically) I've seen is Marin's Shootem'up (not that I searched much). Which is the most "complete"?

Back in the day, Gadget Pong impressed me. Also, later versions of Chaos3D were pretty cool.