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.
  • NaNoW NaNoW:
    oh
    Link
  • StrikerX StrikerX:
    Still not available back on Steam though
    Link
  • C chamir44:
    My withdraw
    Link
  • Necrokiller Necrokiller:
    Reminds me of the time MS tried to charge PC gamers for online play
    Link
  • Necrokiller Necrokiller:
    When will console companies realize this sh*t doesn't work on PC
    Link
  • SolitarySoldier SolitarySoldier:
    doesn't change the fact that sony is extra chu this gen
    Link
  • Link
  • StrikerX StrikerX:
    Mofos sharpened a spear and shoved it up theirs and Arrowhead's ass
    Link
  • StrikerX StrikerX:
    Sony <3
    Link
  • Necrokiller Necrokiller:
    Jeez, throwing all those sales away for the sake of PsN accounts. What a mess.
    Link
  • Link
  • Chandoo Chandoo:
    faraany3k said:
    I have heard that it is now unplayable in countries which do not support handful of third world countries not recognized by Sony like Pakistan. Steam is a true global platform.Then they cry that console gaming is dying.
    170 + countries where Steam sells but PSN doesn't will lose access unless they use VPN
    Link
  • Chandoo Chandoo:
    It has a worst rating on Steam than last years MW3 now. Jeese Sony, how can you fuck it up THIS BAD
    Link
  • faraany3k faraany3k:
    I have heard that it is now unplayable in countries which do not support handful of third world countries not recognized by Sony like Pakistan. Steam is a true global platform.Then they cry that console gaming is dying.
    Link
  • Chandoo Chandoo:
    How to ruin a perfectly good thing for dummies - by Sony
    Link
  • Link
  • Chandoo Chandoo:
    Helldivers 2 is now trending worse stream user reviews than SUICIDE SQUAD
    Link
  • Necrokiller Necrokiller:
    Good guy Gaben refunding the game way past what the policy allows 👍
    Link
  • Necrokiller Necrokiller:
    Poor Arrowhead getting screwed by Sony 😞
    Link
  • Necrokiller Necrokiller:
    Gaben ki reach hai, PSN ki nahi hai. Gaben ain't stressing over publishers who rush to his store in the first place 😂
    Link
  • Chandoo Chandoo:
    Gaben ki reach nah hai :(
    Link
  • Chandoo Chandoo:
    saeen I don't think the PSN teams are stressing over needing to offer hundreds of thousands of refunds lol
    Link
  • Necrokiller Necrokiller:
    fuckin' lol
    Link
  • Necrokiller Necrokiller:
    Saeen literally glossed over the fact that PSN isn't available in those 177 countries
    Link
  • Chandoo Chandoo:
    fuckin' lol
    Link
    NaNoW NaNoW: oh