Need help regarding graphics in C language....

Solid Link

Walk the path of the walky...
Supervisor
Dec 13, 2008
1,554
165
69
Under a rock
www.pakgamers.com
Hey every1.... i wanted to ask a few questions regarding how you go about making graphics and such in C language...
basically m learning C right now and we'v covered all the basics like looping , pointers arrays and stuff... but what i wanted to know is that how to implement graphics in C and not C++, is there a way..? If so then please tell me the details like what libraries should i go for and how to start and what knowledge and background stuff that i need to know in order to start it out like that and if thats not possible on C then please do let me know how should i go about making it on C++, like where to start and all... thankyu..
 

ammarzubair

Perverted Gentleman
Feb 15, 2009
1,690
0
41
Karachi
depends on what you want... i suggest you start with console based graphics...

a simple program
Code:
# include<graphics.h># include<stdio.h>
# include<conio.h>

main()
{
int driver, mode;

driver=DETECT;
mode=DETECT;
initgraph(&driver,&mode,"\\tc\\bgi");
cleardevice();

bar3d(50,100,550,500,50,50);
circle(150,200,100);

circle(300,200,100);

circle(450,200,100);
getch();
closegraph(); [COLOR=#000000][FONT=Courier New]}[/FONT][/COLOR]
 
Last edited:

Solid Link

Walk the path of the walky...
Supervisor
Dec 13, 2008
1,554
165
69
Under a rock
www.pakgamers.com
depends on what you want... i suggest you start with console based graphics...

a simple program
Code:
# include<graphics.h># include<stdio.h>
# include<conio.h>

main()
{
int driver, mode;

driver=DETECT;
mode=DETECT;
initgraph(&driver,&mode,"\\tc\\bgi");
cleardevice();

bar3d(50,100,550,500,50,50);
circle(150,200,100);

circle(300,200,100);

circle(450,200,100);
getch();
closegraph(); [COLOR=#000000][FONT=Courier New]}[/FONT][/COLOR]
well basically speaking m doing cause i wana make a small game as my project for the uni.. so can u tell me if this library will help me in making animating and stuff.? like a 2d sidescroller or something.? thanx for ur reply though..
 

ammarzubair

Perverted Gentleman
Feb 15, 2009
1,690
0
41
Karachi
well basically speaking m doing cause i wana make a small game as my project for the uni.. so can u tell me if this library will help me in making animating and stuff.? like a 2d sidescroller or something.? thanx for ur reply though..
not really... but take it one step at a time... this is just simple 2d graphics
 

Behrox

Seasoned
Nov 9, 2011
2,583
0
41
27
Karachi,Pakistan
well basically speaking m doing cause i wana make a small game as my project for the uni.. so can u tell me if this library will help me in making animating and stuff.? like a 2d sidescroller or something.? thanx for ur reply though..
use Allegro. We made a Pacman game in it for 2nd semester uni project. Plus it has many tutorials online while being easier to learn
 

prohyper

Proficient
Aug 24, 2011
837
0
21
[MENTION=43322]Behrox[/MENTION] [MENTION=9907]ammarzubair[/MENTION] guys the OP is banned [emoji14]

Sent from my Nexus 4
 
General chit-chat
Help Users
We have disabled traderscore and are working on a fix. There was a bug with the plugin | Click for Discord
  • No one is chatting at the moment.
    faraany3k faraany3k: Tears of Kingdom saal pehle shuru ki thee, ab tk pehle area se nai nikla. Life sucks donkey balls.