Advertisement

commands.....

Started by April 10, 2001 02:47 AM
3 comments, last by wulf 23 years, 10 months ago
Hey, I''ve just started in c++ . Did one of those quick get-the- hang-of-it books. Now I read here that the best game to begin with is tetris. So I did some brainstorming and decided that a couple of pixels have to go down, and that there has to be some input from cursor left and cursor right. Now, if someone could tell me what the commands for pixels, movement and keyboard input are, I would be ever gratefull.... Happy coding
OUCH!
-Pac "The thing I like about friends in my classes is that they can't access my private members directly." "When listening to some one tell about their problem (whether it's code or not), don't listen to what went right or wrong, but what they assumed....."
Advertisement
either search on the web or get another quick get-the-hang-of-it books.

Subjects you should be interested in are:

If you are using windows:
DirectX (DirectInput and Direct3d or DirectDraw)
Windows programming
Windows GDI

If you are using !windows:
Opengl

I recommend DirectX to start with.

Loads of tutorials in the tutorials section...

Happy reading

DeVore

here's the code:

if (movepixel)
pixel.y -= 1;
else
pixel.y -= 0;

if (keyboard.pushleft)
pixel.x += 1;

if (keyboard.pushright)
pixel.x += -1;


no but really do what DeVore suggests. I think you don't have a firm grasp on the sitution yet, so reading some more will help.



Edited by - Pactuul on April 10, 2001 10:35:50 AM
-Pac "The thing I like about friends in my classes is that they can't access my private members directly." "When listening to some one tell about their problem (whether it's code or not), don't listen to what went right or wrong, but what they assumed....."
If you are using win32...
try to draw a bitmap in a window.
use

WM_PAINT
bitblt
createcompatibleDC
loadbitmap
invalidaterect

- you can figure it out...
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~I'm looking for work

This topic is closed to new replies.

Advertisement