-
Putting a Pixel
In basic, to put a pixel, we say
PSET(X, Y), COLOR
where X and Y are coordinates and COLOR is the color.
is there a similar function in C/C++ ?
Basically, I want to draw the picture of a jet plane and use it.
If this is not the way peole do it, what is other way ?
-
You need to use a graphics library to do this. Take a look at opengl or directx.
- Sean
-
if you are using windows you probably want to draw into a DIB and BitBlt to the screen. PutPixel for every pixel is a painfully slow way of doing things.
The windows call is SetPixel() if you insist on doing it though.
-
DOS or windows? They have tottally different ways of plotting pixels and displaying images
-
go with the allegro library its easy compared to the rest
-
DOS/Windows
Which is better ? DOS/ Windows games ?
I mean... for a newbie... which is simpler ??
if dos is simpler, how can I plot a pixel in dos?
also, what is OpenGL ? can it be used with bc++ 5.5 ?
-
well dos games are far from simple. There is a need to know about ever stinking driver on the market to get anything decent accomplished. But I do remeber Allegro from a long time ago and that could help.
As for windows and opengl or directx I can't say they are simple but they are far more capable of accomplishing modern games. You should take note that DOS based games really aren't sold anymore.
-
SDL is a really easy windows library, it isn't the fastest library or anything, but it's incredibly easy to learn
-
hmm
thanks for the info...
i dont wanna sell my games. i am just writing programs/games to satisfy myself that i can do something with which i can make others waste some time :)
it makes my life a little more meaningful :D
As for the game, I just want to draw a jetplane and make
it move around the screen... just for the sake of learning.
i know how to do this in QB (i used to love this thing... but i
can't imagine how i used to write code in QB after i saw
the beauty of structured programming in c/c++)
just want to know how i can do that in c ..
-
well, in the tutorial that comes with SDL there is a putpixel funtion...really simple. I used to program in QB and Visual Basic, too, and yeah, after C, there is no going back (:
-
thanks a lot
thanks a lot.
i'll check it out right away! :)