Jump to content

graphics in c++

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
6 replies to this topic

#1
thapchi

thapchi

    Newbie

  • Members
  • Pip
  • 8 posts
I have a one more simple question?

is there anything like graphics in c++ i am not talking about the higher graphics like open gl and direct X I am talking about simple graphics

like say if i want to make a pacman game or more simpler snake game.

can i make it with simple graphics in c++

i dont know anything about graphics in c++

if there are any graphics in c++ please do tell me where to learn it

#2
SolidState

SolidState

    Learning Programmer

  • Members
  • PipPipPip
  • 38 posts
Yeah for basic 2D type of stuff you can use SDL, Simple DirectMedia Layer , it has functions for loading and manipulating graphics, as well as stuff for running sounds and things. There are also plenty of tutorials available that should have you making interesting games in little time.

#3
outsid3r

outsid3r

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 623 posts
Maybe allegro library.

Allegro - A game programming library

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
C++ is platform agnostic, so does not include ANY GUI libraries. That said, you can use the API of your OS, wxWidgets, gtkmm, Ultimate++, or any of the many, many other GUI libraries available.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#5
thapchi

thapchi

    Newbie

  • Members
  • Pip
  • 8 posts
Well thank you so much

but say if i want to make a snake game is there nothing in c++ to make a line and turn it

or c++ is only a logic language i.e. it only tells the game when up is press what to do and when down is what to do like that

but the graphics in games are to be brought from some other program like open Gl or others?

Is it like this?

If it is like this where can i learn basic stuff of these so i can program atleast a snake game

#6
genux

genux

    Learning Programmer

  • Members
  • PipPipPip
  • 80 posts
Um. c++ is like most languages, you extend from the base language (c++ in this instance) and include different "libraries" to accomplish different things (the libraries can be self written as well) which would be the openGL etc for the graphics.

So the think that the main question is, what language do you want to do X in (make sure that it has graphics libraries of course because Office scripts may not!! lol) and then learn the language and the library that you want to talk to to do the functions that you want.

So yeah.. it is like this?

int coffeePerDay = 10; // need to cut down!!!

Codingfriends

#7
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
You can do most anything you want in C++, but you will probably need an appropriate library to do it in. Most any of the libraries I mentioned will let you do what you want.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog