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
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.
  • 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
  • SolitarySoldier SolitarySoldier:
    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
    Link
  • SolitarySoldier SolitarySoldier:
    "These changes are not a reflection of the creativity and skill of the talented individuals at these teams or the risks they took to try new things" ... seems to me that's exactly what it is
    Link
  • SolitarySoldier SolitarySoldier:
    why make good games when u can just buy everyone and shut them down lol
    Link
  • XPremiuM XPremiuM:
    I'm gonna say one last time, F*** Microsoft to infinity!
    Link
  • XPremiuM XPremiuM:
    Microsoft deserves all the hate they can get. Seriously i can't explain how much i want to curse them out.
    Link
  • XPremiuM XPremiuM:
    They could've sold the studios instead of closing them, but the nazi bastards just didn't want competition down the road.
    Link
  • Link
  • XPremiuM XPremiuM:
    F*** Microsoft, and F*** their fanboys.
    Link
  • XPremiuM XPremiuM:
    What's the f*** is wrong with them? I mean really? Have they completely lost it? F***ing retards.
    Link
  • XPremiuM XPremiuM:
    So i just found out that f***ing s***bag Microsoft shut down Arkane Studio (makers of the brilliant Dishonored series) and Tango Gameworks (makers of the iconic The Evil Within series), among some other studios. I just want to say a giant F*** Y**! to Microsoft. THEY'VE F***ED UP BIG TIME this time.
    Link
  • Necrokiller Necrokiller:
    MS: Hold my trillion dollars
    Link
  • Necrokiller Necrokiller:
    Sony: We can f**k up a totally good situation.
    Link
  • Link
  • XPremiuM XPremiuM:
    Started Dead Island 2, and i find it pretty lame. The story is shit. The characters are either cringe or bland (all 6 of them), The gameplay isn't fun. Even the goddamn zombies don't behave like proper zombies. They're all fast & intelligent unlike how zombies are supposed to be like. Any fan of "zombie" genre cannot possibly like this shitfest of a game. Dying Light 2 was million times better than this shit.
    Link
  • NaNoW NaNoW:
    so Baldurs Gate 3 is pretty great!"
    Link
  • faraany3k faraany3k:
    So who here is waiting for Senua Hellblade 2. Prequel was a true mind fuck experience.
    Link
  • GloriousChicken GloriousChicken:
    Sad indeed
    Link
  • NaNoW NaNoW:
    what a sad day
    Link
  • faraany3k faraany3k:
    Necrokiller said:
    MS one upping Sony in catching the biggest L in gaming
    tbh gaming industry as a whole is failing much like tech industry. They have buckled down too much to Corporate suites then relying on passionate and innovative people. A corporate only believes in financial growth and shareholders.
    Link
    funky funky: Hello