How do I make something with graphics in C?

Started by
14 comments, last by doynax 19 years, 3 months ago
Allright, I've done some programming in C and I feel comfortable with structures, pointers and the like, and I've just started learning classes. So far I've managed to make a simple DOS game. The only problem is that it's 'graphics' are all ASCII. I wanted to rewrite the game to include sprites instead of ASCII characters, so I've read some tutorials and downloaded some source code. The problem is, none of it works with my compiler (Bloodshed Dev-cpp)! So, should I get a new compiler (free one, I can't afford buying Visual C++), or can I go to 0x13 mode in my current compiler? Do I need to download additional libraries (download links would be appreciated)? And how do I implement sprites once I get into graphics mode?
Advertisement
my friend my friend. though i am an advocate of Allegro ( www.allegro.cc ) i suggest you looking at cone3d.gamedev.net and all will be answered.

-good day [smile]

Beginner in Game Development?  Read here. And read here.

 

Allright, I've done some programming in C and I feel comfortable with structures, pointers and the like, and I've just started learning classes.

There are no classes in C. . .
Well, I want to get into C++. Do I need it for making games (I don't have 3d games ambitions)?
Quote:Original post by ImperfectFreak
Allright, I've done some programming in C and I feel comfortable with structures, pointers and the like, and I've just started learning classes.

There are no classes in C. . .

who cares. He asked something but he didn't ask you to start complaining :P

Now on to the answer. Alpha_Progdes is right the thing is that using the things on cone3d won't allow your game to run in dos and since you said it's a dos game I guess you mean console game :)
http://sourceforge.net/projects/pingux/ <-- you know you wanna see my 2D Engine which supports DirectX and OpenGL or insert your renderer here :)
Quote:Original post by DJ14IVI3
Well, I want to get into C++. Do I need it for making games?
No, you don't need it.

Mode 13h (0x13) is not directly supported under Windows, if that's your target environment. You can emulate it, of course, by essentially undersampling your resultant pixels. But that's all getting ahead of ourselves...

Your central problem appears to be outdated tutorials (if they're talking about mode 13h!). Cone3d is good place to start, and there are dozens more tutorials on the net.
I use mode 0x13 in Windows XP using C and it works perfectly.
AFAIK, 640x640x4 is the lowest supported Win32 resolution. Anything lower is being simulated, perhaps by DirectX.
This should work in any windows environment and this is a 13h 3d render.

http://rel.betterwebber.com/junk.php?id=24

For 13h you should use Djgpp or TurboC++



Hi.
For mode 13h best use DJGPP from www.delorie.com/djgpp/

Or You can use the Borland Free Compiler from http://www.borland.com.With Borland's Compiler use bcc -m source.cpp to compile mode 13h programs


Brackeen's VGA Tutorials are a very good resource for mode 13h programming

And there's always GOOGLE

Helps?

[Edited by - FireNet on January 7, 2005 3:37:24 AM]
______________________________________________________________________________________________________
[AirBash.com]

This topic is closed to new replies.

Advertisement