Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Controling graphics with C

Status
Not open for further replies.

zappaxtron

Newbie level 3
Joined
Feb 22, 2008
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,303
I already know the basics and have made simple programas, like calculators.

I want to start making little games for pc, something were I can start displaying images on the screen and stuff like that, but I realy dont know how to do it.

Can someone help me please?
 

Hi zappaxtron,
You can use the graphics module (EGA/VGA.bgi) in DOS mode to write some PC games using C graphics. You just need to include "graphics.h" and the graphics library. A lot of APIs are available already such as drawing a circle, rectangle, filling colours, etc. An extensive help and set of examples are also provided in any of the DOS 'C' compilers.
You can use these to start off your PC game programming.

Regards,
Vhn
 

I can remember playing around with VGA commands that worked just like BIOS calls. You set certain registers and made called the service routine to set the VGA mode and stuff. Then you would write into the video memory to create lines and circles and other shapes. And thousands of hours later and a million lines of code later I might have had something worthy of a game engine. I did manage to make a one level crappy PACMAN that ate up the energy pills and that was about it because I didn't make any of the munchy bad guys to chase him around and make an actual game of it. Anyway, bite the bullet, and learn either OpenGL or DirectX. Don't mess around with DOS, I don't even know if DOS GFX api's would work under XP or Vista. And why take your 64 or 128 or 256 Meg super high res video card with 256 bit bandwidth and turn it into a crappy retarded VGA card? There are lots of downloadable books on OpenGL and DirectX. There is even one for VB .NET (and others using C#) using managed DirectX. I'd start there.
If you are into C++ you might try using WildMagic, a heavy duty and free game/modelling engine with 3d collision handling, a physics engine, advanced linear algebra and ODE solver routines and tons more. You could not write this stuff in 10 years, even if you had PhDs in math and physics. And there are a few books written for it that you can download. If I was into graphics that is probably where I would go.
 

    zappaxtron

    Points: 2
    Helpful Answer Positive Rating
I decided to go for OpenGL, but theres a problem, Im using Dev-c++ and after I download glut.h (and the others) and put them on theyr directories I try to compile and I get a "[Linker Error]" message, it as never happened before, can you tell me what this is?
 

Make sure you have included all of the relevant libraries in the library path setting. That is the usual error for a linker error.
 

Thanks for the help again, I found out what the problem was, I forgot to change an option projects tab :p
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top