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,684
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,684
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,578
0
41
28
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
IMPORTANT: Please Change Your Passwords to avoid being botted. | Click for Discord
  • No one is chatting at the moment.
  • Aciel Aciel:
    This is the error.
    Link
  • Aciel Aciel:
    Online session is enabled for UBL. I have an active subscription with my NayaPay card (it is already added to Google Payment Methods).
    Link
  • B Baghi:
    did you try setting up Google Payments? For UBL you may have to get it enabled for internet transactions, Naya should work without it!
    Link
  • Aciel Aciel:
    I tried both NayaPay, and UBL, but I keep getting "correct country selected..." error. I already have PK set there 🤦‍♂️
    Link
  • Aciel Aciel:
    Baghi said:
    Link
  • B Baghi:
    Yes
    Link
  • Aciel Aciel:
    Does your VISA Cards work on Google Play Store?
    Link
  • M murtaza12:
    XPremiuM said:
    Why? Was the site hacked or something?
    Yes
    Link
  • XPremiuM XPremiuM:
    GloriousChicken said:
    Everyone, please change your passwords.
    Why? Was the site hacked or something?
    Link
  • GloriousChicken GloriousChicken:
    Everyone, please change your passwords.
    Link
  • Necrokiller Necrokiller:
    The only valid thing from his pov he said in the video is AC dead since Black Flag. According to woke police that game was woke too. Welsh man in West Indies. So atleast he's consistent I guess lol
    Link
  • Link
  • XPremiuM XPremiuM:
    Necrokiller said:
    It's based on an actual real life person so I don't think the woke police have a valid case here.
    Nope. They have a very valid case. The above video explains it all.
    Link
  • Necrokiller Necrokiller:
    It's based on an actual real life person so I don't think the woke police have a valid case here.
    • Like
    Reactions: SolitarySoldier
    Link
  • XPremiuM XPremiuM:
    Meanwhile Ghost of Tsushima PC version is out now. Looks 100 times better than ASS Creed already.
    Link
  • XPremiuM XPremiuM:
    Did y'all see the new Assassin's Creed trailer? They finally made a AC set in Japan & then they put a negro as the male protagonist. Ubisoft is taking cues from Disney, and it isn't gonna end well for them, just like Disney. Go woke, go broke!
    Link
  • Necrokiller Necrokiller:
    First Fallout 4 update and now this 🤡
    Link
  • Necrokiller Necrokiller:
    MS and Bethesda continuing their streak of massive Ls 😬
    Link
  • Link
  • funky funky:
    Hello
    Link
  • NaNoW NaNoW:
    by closing down good studios
    Link
  • NaNoW NaNoW:
    well he is breaking barriers
    • Like
    Reactions: KetchupBiryani
    Link
  • iampasha iampasha:
    SolitarySoldier said:
    Phil keeps talking about breaking barriers to gaming, making it accessible on all platforms yada yada, while killing competition and creativity at the same time. the fact that i actually believed him for a second lol
    guys the biggest yapper in the Industry right now. All he do is yap
    Link
  • Necrokiller Necrokiller:
    Phil should be held responsible for this shitfest too, just like Sarah, but it's highly likely that these decisions are coming from Satya. And this isn't even the end of it. More closures are coming.
    Link
  • SolitarySoldier SolitarySoldier:
    if we are moving towards more and more popular trash across platforms that make billions for companies, I'm happy with all the barriers and exclusivity because at least that brings some pressure to create good stuff.
    Link
    Aciel Aciel: This is the error.