#10866 - abbasakhtar - Thu Sep 18, 2003 6:45 pm
if i develop using c++, (i am new to c++ and hav had years of programin experience in vb, object pascal, basic) but i wunt to know, if i do create a game, must i use opengl ? directx ? or wot ?
wot r the exact guidlines ?
is there a special compiler with special classes i must use for developing rpgs for the gba ? and how would i convert them from exe?? to .gba?
am i makin ne sense ?
#10868 - sajiimori - Thu Sep 18, 2003 6:53 pm
Just out of curiosity, do you have difficulty with English (which is perfectly OK), or are you just trying to sound cool? No offense, either way.
C++ is a general-purpose language, with compilers available on most platforms. Different platforms have different graphical and audio APIs available, such as OpenGL and DirectX. Sometimes you don't even need to use an API because you can program straight to the hardware, like most developers did in DOS and most do on GBA.
Devkit Advance is a compiler suite for GBA that supports C++, but you don't have to use any special classes. The compiler doesn't generate .exe files, because those are for DOS/Windows. It generates ELF binaries that can be stripped to raw binaries to be executed on emulators or hardware.
#10871 - niltsair - Thu Sep 18, 2003 7:41 pm
When programming for the Gba, the compiler doesn't come with any particular librairies to help you with Graphics, sounds, etc... Everything must be done by hand, or use some code/librairies some other people did. Since there's is no Os on the Gameboy, there's is no API calls either.
Basicly, you get your hands dirty with low level programming and not much in-between layers to 'help you' achieve to do things. This is a lot of fun ;-)
Example :
You want to display a circle, on a Pc, you could use OpenGl, first initialising the library, then calling a function that plot it based on diameter, position and color.
On the gba, you plot the pixels directly on the screen, based on calculation you did yielding where to put each pixel to form the circle
_________________
-Inside every large program is a small program struggling to get out. (Hoare's Law of Large Programs)
-The man who can smile when things go wrong has thought of someone he can blame it on. (Nixon's Theorem)
#10882 - KashinKoji - Fri Sep 19, 2003 5:42 am
A great way to get started for beginners is the HAM kit. It includes a library (HAMlib) with functions you can call to get things rolling, much like you would with openGL or directX, except geared toward the sprite and background functionality of the gameboy. It also sets up the compiler chain with amazing ease, so you can cross compile for the ARM/THUMB on your pc. (I say that in response to your question about going from .exe to .gba) I'd check it out, it is a great way for beginners to wet their beaks in gba development.
#10891 - abbasakhtar - Fri Sep 19, 2003 3:04 pm
hi and thanks for ur replies guys,
yes i can speak english perfectly fine, i was born and brought up in scotland, actually leicster england then moved to scotland,
anyway, im going to carry on programming basic stuff with c++ and move on slowly, then ill "try" gameboy advance developmnet when i have had some experience with opengl or directx, because i do wunt to design games for the pc 2,
i no i no, this will be a hard task, but im going to design very simlpe game engines and add to them, that way ill get a better understanding of how these game engines work, etc.
i hate windows api :-(
#10903 - sajiimori - Fri Sep 19, 2003 5:12 pm
I'm not a big fan of Windows programming, either. Use SDL to avoid it altogether.
#10905 - KashinKoji - Fri Sep 19, 2003 6:48 pm
No need to use windows at all. For openGL, last time I checked there was a great library called GLUT which you can use on just about any platform, and it only took me a few days to get a window up with polygons in it under linux/X windows. And the same goes for DevKitAdv or HAM, they work brilliantly under linux.
#10914 - sajiimori - Sat Sep 20, 2003 12:30 am
GLUT is oriented toward event-based programming (like for graphical tools), whereas SDL is more for realtime interactive applications (like games). The difference is pretty significant.
In a typical GLUT application, you set up "callbacks" for every event you want to handle (such as mouse clicks and key presses), then pass control over to glutMainLoop(). Then, every time one of those events occurs, GLUT uses your callback to handle the event. The application is "idle" when no events are happening.
In a typical SDL application, you do some basic initialization, then enter your main loop. The main loop usually goes something like: Get input, Update world, Wait for vsync, Draw screen, Loop. The application is "active" all the time.
The best choice pretty much depends on whether a lot of things happen without user interaction. For instance, MS Word should definitely be event-based because hardly anything happens unless the user does something to cause it. Quake should definitely not be event-based because the world should keep going whether the player presses something or not.
Edit: forgot to mention that SDL supports OpenGL (otherwise this post would be sorta pointless)
#10918 - KashinKoji - Sat Sep 20, 2003 10:45 am
Thanks for the info, sajiimori. I only barely got into openGL and GLUT, enough to make a simple application. I'd be very interested in learning more about SDL. My search came up with a million different links... Any page you'd recommend for a good first step into learning the library?
Thx.
#10920 - tepples - Sat Sep 20, 2003 12:13 pm
The Allegro library serves a similar purpose to SDL, and Allegro may be easier to get up and running on MinGW (the lightweight win32 version of GCC). TOD was initially prototyped using Allegro.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#10925 - sajiimori - Sat Sep 20, 2003 5:25 pm
I used to use Allegro when I was developing for DOS. Not sure why I switched when I went to Win32...maybe I wanted simplicity. SDL does have a binary distribution for MinGW, so there shouldn't be any trouble getting it to work.
www.libsdl.org is the official page. It has reference material, tutorials, libraries, demos, and games.
#12344 - MumblyJoe - Sat Nov 08, 2003 2:09 pm
Hahahaha. I see you have no problem with english, and "i no" you will do well at c++.
Sorry, I'm not picking on you man, just laughing with you...
_________________
www.hungrydeveloper.com
Version 2.0 now up - guaranteed at least 100% more pleasing!
#12348 - yaustar - Sat Nov 08, 2003 4:07 pm
If you know how to code in basic then perhaps Dragon Basic may be more suited to you?
_________________
[Blog] [Portfolio]