Sign in to follow this  

Windows game programming in C++

This topic is 4687 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I probably sound like a complete idiot. The idea is, I want to program a game on my computer. (side-scroller with Rpg elements) Now here's the kicker, I want to do it with out DirectX! That's right, I want to do all the graphics processing in pure C++, and control the hardware directly. The main reason for this is preparation for nintendo console programming. Please help, I'm a complete idiot about this. Thanks!

Share this post


Link to post
Share on other sites
In a modern OS you can't directly access the hardware. Only drivers are allowed to do that.

You can't use any modern hardware feature this way because most hardware companies don't give you the necessary specs to access these features.

You can try a bit of VGA-Output in DOS...

Share this post


Link to post
Share on other sites
Unless you are writing a kernel driver, Windows won't let you access hardware directly. Have a look at the Windows DDK on Microsoft's web site.

Even then, you can probably forget about 'modern' graphics cards, which, to the extend of my knowledge, do not provide a documented hardware interface (i.e. you use whatever DX and GL drivers the manufacturer gave you). Though I'm convinced they'll still provide a VGA BIOS interface for you to tinker with.

Share this post


Link to post
Share on other sites
Quote:
How does SDL/OpenGL access the hardware then?


First of all, I don't think SDL does access the hardware. As for OpenGL, graphics card companies release drivers that have OpenGL implemenations built in.

kman

Share this post


Link to post
Share on other sites
Quote:
Original post by kman12
Quote:
How does SDL/OpenGL access the hardware then?



SDL - Through Direct Draw on Windows platforms.

Quote:
Q: What is supported?
A: SDL supports Windows 95/98/NT/ME/2000/XP.

SDL can be built with Visual C++, Borland C++, Cygwin, MinGW, Dev-C++, and Watcom C++.

SDL takes advantage of DirectX hardware acceleration when it is available, but falls back to the standard Win32 services if DirectX is not installed.


From the SDL site.

- Drew

Share this post


Link to post
Share on other sites



You want to code games by directly talking to the hardware.
You want to do this cuz it will help you with nintendo console programming.
I dont think using openGL or directX will make you any less competent to program any nintendo console. This is just my opinion.
someone correct me if i'm wrong but im thinking its a stretch to go hardware coding just for that reason.

0.02$

Share this post


Link to post
Share on other sites
1. dont get exiced about graphics yet

2. go to www.cprogrammming.com and learn c++, you wont be doing graphics for while

3. after you learn c++ (takes 7-10 months), go to cone3d.gamedev.net to use graphics

4. when you can make a good game go to nehe.gamedev.net and learn opengl, that is what game programmers use for games outside of windows (they use directx for windows games).

a reality I came to 3 weeks into c++ was that c++ cant be learned overnight and with the time it takes it is not easy. it took me 3 weeks with sdl till I could make a pong game with no sound or text. 3d graphics take advanced math and years of knowledge, to do a 3d game you will have to know physics, calc and math like that. also if you want to be hired by a company you will need a bs or ms in computer science.

Share this post


Link to post
Share on other sites
Quote:
Original post by Gameteen
Now here's the kicker, I want to do it with out DirectX! That's right, I want to do all the graphics processing in pure C++, and control the hardware directly. The main reason for this is preparation for nintendo console programming.
Get a console emulator and program that directly. Cut out the middleman (ie, Windows). GBAdev has resources on programming the GBA, for instance, and even eventually transferring your games to actual carts that can be played on the physical machine.

Happy hacking!

Share this post


Link to post
Share on other sites

Thanks for all the help, guys. I do know a little bit about gba development, but I can't figure out the Gamecube. Again, thanks.

Didn't think I'd get so much in one day. Time to get started.

Share this post


Link to post
Share on other sites
Quote:
Original post by Gameteen


Oops, forgot to say that I think what I mean is using the VGA-output in Dos. Thanks again.


Google for "mode 13h" to see how direct hardware access was done on DOS machines. Allegro started off as a mode 13h library, there historical versions of it on the site.

I've thought that origional playstation dev could be a good step into the gamedev industry;

1. games still come out for it
2. you can access the 3d hardware, no problem
3. you can use a c/c++ compiler or learn the svelt mips assembly

Share this post


Link to post
Share on other sites
Please don't flame me for this, but I will never develop for the play station.

I hate it.
Thanks, but sorry.

Now if you have any Gamecube sources, I'd love to hear about them.

Thanks again.

Share this post


Link to post
Share on other sites
Quote:
Original post by Gameteen
Now if you have any Gamecube sources, I'd love to hear about them.


I don't believe that there are any free development setups for Gamecube, as there are for the PS2. Professional developers create games for the gamecube by registering with Nintendo and buying a development kit for a few thousand dollars. Nintendo will only give out those development kits to proven developers (same for all the current gen hardware out there). The PS2 is the only major console for which there exists a free option (it involves mucking around with your own linux box). The current thinking amongst the console developers is something along the lines of: "bad games make my console look bad". So they don't make it easy for indy developers to create games for the platform. One could argue that bad games get made anyway, but I guess it's really just about control of the platform.

The only way i've known people to get experience with console development is to get a job with a game development company and to learn it from them. Knowing how to develop for a console is not a necessary pre-requisite for getting a job at a professional developer; being willing to develop for the PS2, however, is.

-me

Share this post


Link to post
Share on other sites
Other than the PS2, you can only readily develop for any system that has been successfully emulated on the PC. Compilers/assemblers have been reverse engineered and are downloadable for free for every console that has been emulated (from any Atari incarnation up to the N64 and Playstation 1). These are good starts.

Programming mode 13h won't get you any closer to being capable at programming for the Gamecube. In fact, I'd guess it's probably quite the step in the wrong direction. It's rather likely that the Gamecube is programmed in C using an API similar to OpenGL or DirectX. Messing with screen memory directly is great if you plan to program for the NES, SNES, Sega Genesis or the like, but most everything more recent has at least a C compiler and a graphics API that mimics already existing 3D APIs.

Being against the PS2 is fine. And nobody's saying you have to buy and play games for it. But if you want to code directly for the current/last-gen home console market, there is no way to do it legally unless you use a PS2.

-Auron

Share this post


Link to post
Share on other sites

This topic is 4687 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this