gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > Wanting to get into game development Is GBA?

#19475 - madgamer - Tue Apr 20, 2004 6:43 pm

Hey everyone let me introduce myself. My name is Wes and I love videogames. My passion to play them but I would also like to create them. I am not a programmer but am interested in getting started.

I just need advice on where to start. Is GBA a good choice or should I start on PC, I prefer 2d games.

I've read here that GBA uses C or C++. which is better? What software package should I purchase? I cannot afford Visual Studio it's around a $1000. I'm sure I should start with the language buy I need an afordable and easy way to do so. Thanks for any help you guys can give.
_________________
I will create a game if it the last thing I do

#19477 - CyberSlag5k - Tue Apr 20, 2004 7:04 pm

Quote:
just need advice on where to start. Is GBA a good choice or should I start on PC, I prefer 2d games.


You should definitely start on the PC. 2D games are a great way of learning the basics. Even creating a simple one like a pong or a tetris clone will teach you a valuable lesson as to the game development process. An important thing to remember is, start off simple and build at a rate in which you thuroughly understand everything. Don't rush into things. Don't expect to create a highly complex game with great looking graphics right away. This stuff takes time, patience, and committment. It can be frustrating at times, but try to keep your head and stick with it. I often find I will spend an hour on a problem, get no where, and go to bed. Then the next day, I tackle the problem with a new perspective and usually see what I was missing before. Patience is paramount.

Quote:
I've read here that GBA uses C or C++. which is better?


Usually asking a question like this will get you flamed. The "which is better" questions are just asking for it. C and C++ both have their merrits. I like C++, myself, and would recomend it as it can be a little simplier early on in my oppinion as input/output are real easy (but C's input/output can do cooler stuff). C++ is also a little more popular. All in all it doesn't really matter which you choose. They are incredible similar and once you are proficient in one, you can do the other as long as you have a few resource materials on hand (IE a book and google).

I would recommend you find yourself some C/C++ tutorials and read them. Then create a few small applications that utilize the different things you learn. It's also a good idea to grab a book or two. I hear the "Learn C++ in 21 days" books are good but I've never read one myself. After you feel you're at least an "intermediate" level, you can begin to think about writing simple games. Start to learn a graphics API, openGL or directX (do NOT ask which is better as someone WILL bite your head off). The thing to know about them is that openGL is portable to just about any kind of environment, directX was created by Microsoft and thus will only work in windows. Anyway, once you've decided upon one, just do some more simple stuff. Draw a triangle, then a square, then see if you can do a circle (using dreaded trigonometry). Then move on to a box, and if you're really good you'll do a cylinder or a sphere. Just play around and learn different things. Read EVERYTHING you can. Once you've mastered the basics, crap will start to form in your head that will amaze you. You'll be able to pull things together that will astound you and your friends. It's really quite cool once you get rolling. Then, once you've got a good grasp on the fundamentals of game development and computer graphics, you can move over to developing for the gba.

Perhaps the single greatest source when it comes to learning game development is the covetted www.gamedev.net. This terrific site boasta tons of articles (about 1700, i believe), book reviews, a forum with over 1 million posts (ask a question and you'll get an answer within 20 minutes usually, but PLEASE read the forum faq first as there are some rules and etiquette to follow that will make everyone happier. and before you post, search both the forum and google because chances are someone has already asked your question already). The gamedev community is nothing less than amazing. Hundreds of incredibly smart people read the forums every hour and are more than willing to help anyone out. And one day, after you've gone through and made a few games yourself, you can contribute as well.

One last thing, as far as compilers go, you can find free ones. GCC is free and so is Dev-C++ (I think) so just search around on google for C/C++ compilers, I'm sure youll find one (I think there's even a link or two here on gbadev.org for a free compiler...take a look).

Anyway, I hope you're still awake and that I've answered your question. Feel free to ask anything else you'd like to know either here or on gamedev.net. I patrol both boards pretty religiously and if I can't answer your question, I garauntee someone else on these baords can.

Good luck!

#19479 - madgamer - Tue Apr 20, 2004 8:04 pm

Thanks for your input CyberSlag5k. I'm gonna order some c++ books off of amazon now. I may be back sometime if I have anymore questions. You've been helpful.

Thanks
_________________
I will create a game if it the last thing I do

#19482 - sajiimori - Tue Apr 20, 2004 8:17 pm

Keep in mind that C++ is a superset of C. It has everything C has, plus a whole lot more.

Which one you should use largely depends on your response to those statements. That is, do you think, "Why would I use a language that has less features when I can get the real deal?" Or do you think, "I want to really understand things from top to bottom, so extra features will just get in my way until I've learned the core of things."

I agree with everything else CyberSlag5k said, but I would also mention that there are simpler APIs than DirectX and OpenGL, specifically SDL and Allegro which are both great.

#19486 - CyberSlag5k - Tue Apr 20, 2004 8:37 pm

Quote:

I agree with everything else CyberSlag5k said, but I would also mention that there are simpler APIs than DirectX and OpenGL, specifically SDL and Allegro which are both great.


Quite true, although I don't think GL or DX are that bad. I'm a GL man myself and found it quite easy to pick up. Which reminds me, if you do decide to pursue openGL, nehe.gamedev.net is an invaluable set of tutorials.
_________________
When you find yourself in the company of a halfling and an ill-tempered Dragon, remember, you do not have to outrun the Dragon...

#19777 - sgeos - Sun Apr 25, 2004 3:22 pm

sajiimori wrote:
Keep in mind that C++ is a superset of C. It has everything C has, plus a whole lot more.

Thats not entirely true. If C++ were indeed a superset of C, all valid C code could always be compiled as C++ code. This is not the case. There are a few things that operate differently in C++. enum is not compatible with int. C++ does not do some of the automatic type casts that C does.

IIRC C++ had trouble casting or just did not allow me to cast a struct to a flavor of pointer to int. (Perhaps it was the compiler?) C++ certainly did not cast my returned void pointer to a pointer to function for me. That was an error where there had not even been a warning when I compiled it as C code. (The upshot is that I learned how to manually cast to pointer to function.)

I'm sure that there are other small differences. I'll admit that one who is first starting on either language need not worry these types of details.

-Brendan

#19789 - sajiimori - Sun Apr 25, 2004 6:24 pm

I agree -- there's no reason a beginner would care about such technicalities.
Quote:

That was an error where there had not even been a warning when I compiled it as C code.

If you use GCC, I'd suggest using the -Wall flag when compiling C to get those sorts of warnings.
Quote:

IIRC C++ had trouble casting or just did not allow me to cast a struct to a flavor of pointer to int.

That's because they're totally different entities -- you shouldn't expect it to work in C either. Structs are not primitives, and you can't cast them unless you write custom conversion methods. Of course, you could always cast a struct pointer to int or int*, if you use reinterpret_cast or C-style cast.
Quote:

I'm sure that there are other small differences.

Most importantly, main() has to return int, and there is no implicit function declaration.

#19816 - sgeos - Mon Apr 26, 2004 2:12 am

sajiimori wrote:
If you use GCC, I'd suggest using the -Wall flag when compiling C to get those sorts of warnings.


I always compile with -Wall. No warning was issued. I did recompile with -Wall -ansi -pedantic and got gcc to spit out:
"warning: ISO C forbids assignment between function pointer and `void *'"

My only problem with -ansi -pedantic is that the C++ // comments are disallowed. gcc, at least my version of it, still conforms to the old standard.

Quote:
Quote:
IIRC C++ had trouble casting or just did not allow me to cast a struct to a flavor of pointer to int.

That's because they're totally different entities -- you shouldn't expect it to work in C either.


I agree. Passing a struct as an array of int is broken way of doing. I was actually horrified when I saw example code that passed a struct as a parameter to a funtion documented as accepting pointer to int. My C++ is poor. It's possible that I misread the code.

Quote:
Structs are not primitives, and you can't cast them unless you write custom conversion methods. Of course, you could always cast a struct pointer to int or int*, if you use reinterpret_cast or C-style cast.


The C style cast worked for me.

Quote:
Most importantly, main() has to return int, and there is no implicit function declaration.


Is there no implicit function declaration in C++? I didn't know that.

-Brendan