Page 2 of 3
Re: Where do you guys start?
Posted: Thu Sep 24, 2009 6:21 am
by programmerinprogress
Am I going to say it? yes, I always ended saying it.
"C++: A Beginners Guide - herbert schildt", this books is an amazing introduction to C++ and programming, I swear by this book, so much that I even have the Java counterpart of this series.
Listen to me, listen to me, i'm not crazy I tells' ya!
*men in white coats take PiP away and make him read Teach Yourself C++ in 24 hours... again*
Re: Where do you guys start?
Posted: Fri Sep 25, 2009 9:50 am
by Pennywise
I'm learning a premade game engine called 'Game Maker' so I can learn the concept of making games, and when I get better at that, then I will get into a language. What do you guys think of that idea?
Re: Where do you guys start?
Posted: Fri Sep 25, 2009 9:55 am
by programmerinprogress
Pennywise wrote:I'm learning a premade game engine called 'Game Maker' so I can learn the concept of making games, and when I get better at that, then I will get into a language. What do you guys think of that idea?
it wouldnt be the way I would go about it, I found these premade things frustrating and limited, and that's why I decided to program, i'm a complete sadist, so I actually wanted to learn how to program before how to program games, that came later
Re: Where do you guys start?
Posted: Fri Sep 25, 2009 11:57 am
by captjack
While I can't share PiP's enthusiasm for Schildt's work, I'll agree that a good beginner's book would be the ticket. One's definition of "beginner" varies considerably. Don't judge a book by its thickness. Some really good intro books have an expanded "second section" that includes more advanced concepts and might be worth the extra heft and expense if you don't want several books cluttering your shelves. Of course, all us old timers have way too many programming books...
Most computer language books follow this model: what's a computer; the various levels and differences between languages, such as assembly and C++; then on to a simple "Hello World" that introduces the basic structure and syntax of the language. From there it moves to simple data types such as integers, characters, and floats. Control statements and branch statements get tossed in (if-else, switch, while, for). One can do a lot of simple programs using just these concepts. If you can write a program that asks for a name and birthday, calculate the person's age, then let that person know if they are a child, teen, adult, middle-aged, or elderly then you can graduate to the harder stuff. The harder stuff (in C/C++) consists of pointers, recursion, arrays (since those are usually discussed alongside pointers). If you're picking up C++ you can pick up classes, templates, and the STL at this point.
Then jump in to game programming. If you don't know the language, writing a game will be painful and will generally piss you off.
Game engines are notoriously hard to write. If you know your language and libraries of choice, try out the book "3D Game Engine Design" or "3D Game Engine Architecture" both by David Eberly. These are hardcore and math heavy, but they come with a complete discussion of 3d game engines and the mathematics behind them. They also come with an open source commercial quality engine called Wild Magic.
There is also a book called "Ultimate 3D Game Engine Design and Architecture" by Allen Sherrod that covers the same topic and concepts, includes the math, but is a do-it-yourself kind of thing building the engine along with the text. I don't have this title, but the reviews are good.
-capt jack
Re: Where do you guys start?
Posted: Fri Sep 25, 2009 5:05 pm
by MarauderIIC
captjack wrote:Control statements and branch statements get tossed in (if-else, switch, while, for). One can do a lot of simple programs using just these concepts. If you can write a program that asks for a name and birthday, calculate the person's age, then let that person know if they are a child, teen, adult, middle-aged, or elderly then you can graduate to the harder stuff.
QFT
Re: Where do you guys start?
Posted: Sat Sep 26, 2009 2:50 pm
by Pennywise
All your advice is great!
I was learning Allegro not so long ago, from loomsoft.net, and found it easier than using Game Maker. I thought it would be smart to use a premade engine like Game Maker, but I will just continue teaching myself C++ instead.
I have a book on C++ called, 'C++ in easy steps' and it's a great book... I'v gotten up to learning arrays and vectors. I will learn a library when I finish the book.
Re: Where do you guys start?
Posted: Sat Sep 26, 2009 6:05 pm
by Pickzell
Pennywise wrote:All your advice is great!
I was learning Allegro not so long ago, from loomsoft.net, and found it easier than using Game Maker.
You're an odd, odd child.
Re: Where do you guys start?
Posted: Sun Sep 27, 2009 4:03 am
by Pennywise
I find Allegro easier than Game Maker because you don't have to figure out all that drag and drop crap and I find it easier to just write down all the actions on notepad. The compiler don't work on my computer so I just compile it on my school computer.
Re: Where do you guys start?
Posted: Sun Sep 27, 2009 4:16 am
by K-Bal
Pennywise wrote:The compiler don't work on my computer so I just compile it on my school computer.
Which Compiler? Have you tried MinGW?
Re: Where do you guys start?
Posted: Sun Sep 27, 2009 4:54 am
by Pennywise
I had Dev-C++ and Code Blocks that both did not compile any programs I made.
Re: Where do you guys start?
Posted: Sun Sep 27, 2009 9:25 am
by Pickzell
Pennywise wrote:I had Dev-C++ and Code Blocks that both did not compile any programs I made.
That happened to me. I use visual studio now.
Plus, you do know that you can just straight up code for Game Maker right? You don't need to learn d&d.
Re: Where do you guys start?
Posted: Mon Sep 28, 2009 10:09 am
by Pennywise
Yep I know. I don't like using Game Maker langauge because I'd rather just use a more powerful languge like C++. I'm just using Game Maker temporarily till I can make an OK game on it. Then I'll give it a go on C++.
Re: Where do you guys start?
Posted: Mon Sep 28, 2009 10:24 am
by Moosader
Pennywise wrote:I had Dev-C++ and Code Blocks that both did not compile any programs I made.
What were you trying to compile? Stuff with libraries, or without?
I've had absolutely no trouble with either of them (except DevC++ crashes a lot).
Re: Where do you guys start?
Posted: Mon Sep 28, 2009 11:22 am
by Pennywise
Actually they worked fine when I don't use Allegro, but when I do use Allegro a window pops up that says:
Project.exe has stopped working
A problem caused the program to stop working correctly.
Windows will close the program and notify you if a solution is available.
Here is my code for Allegro:
#include <allegro.h>
int main()
{
allegro_init();
install_keyboard();
set_color_depth(16);
set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0);
BITMAP *my_pic = NULL;
my_pic = load_bitmap("picture.bmp", NULL);
blit(my_pic, screen, 0,0,0,0,480,360);
readkey();
destroy_bitmap(my_pic);
return 0;
}
END_OF_MAIN()
Also I did inlcude -lalleg in the linker thanks to you and your tutorials. ^^
Re: Where do you guys start?
Posted: Mon Sep 28, 2009 1:58 pm
by Moosader
The code works just fine, no problems.
1 - use the code ez-code html thingies in your forum posts
2 - Do you have alleg42.dll in your .exe's directory?
3 - is picture.bmp is your .exe's directory?
4 - did you set up your library right? Try doing it without the graphical stuff, does it still give you an error?