i need a working code in C++ (windows platform). It should be able to move a ball on the screen.
a nicely commented code will be aprecitated.
thxs
i need a working code in C++ (windows platform). It should be able to move a ball on the screen.
a nicely commented code will be aprecitated.
thxs
Hehe
Btw, is this a troll or something?2. Don't ask people to do all your work for you
Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling
Usually, people don't like "Do this code for me" posts, but... anyway, I'll give this general idea to you:
Code:while(GameIsOn) { Ball.X += Ball.dX; Ball.Y += Ball.dY; if(Ball.X < LEFT_SIDE_OF_SCREEN) { Ball.X = LEFT_SIDE_OF_SCREEN; Ball.dX = -Ball.dX; } if(Ball.X > RIGHT_SIDE_OF_SCREEN) { Ball.X = RIGHT_SIDE_OF_SCREEN; Ball.dX = -Ball.dX; } if(Ball.Y < TOP_SIDE_OF_SCREEN) { Ball.Y = TOP_SIDE_OF_SCREEN; Ball.dY = -Ball.dY; } if(Ball.Y > BOTTOM_SIDE_OF_SCREEN) { Ball.Y = BOTTOM_SIDE_OF_SCREEN; Ball.dY = -Ball.dY; } }
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
Please post the code (nicely commented) for a state of the art First Person Shooter. It should have 20 levels, and 30 player models as well as pre compiled resources. It should work in both DX and GL depending on the users settings. Thanks.
c++->visualc++->directx->opengl->c++;
(it should be realized my posts are all in a light hearted manner. And should not be taken offense to.)
Haha, yeah ok, you made your point by now.Originally posted by dbgt goten
Please post the code (nicely commented) for a state of the art First Person Shooter. It should have 20 levels, and 30 player models as well as pre compiled resources. It should work in both DX and GL depending on the users settings. Thanks.
Indeed it smells alot like homework. So go look around for
yourself first.
A place to start
Also, it must know what i want so that it can program itsself, for when it comes to doing code myself i become quite confused. Please use my name in given credits, as i will tell all my l337 friends that i haxx0r'd the code myself, being how l337 i am.Originally posted by dbgt goten
Please post the code (nicely commented) for a state of the art First Person Shooter. It should have 20 levels, and 30 player models as well as pre compiled resources. It should work in both DX and GL depending on the users settings. Thanks.
HAHAH! You're wonderfull, i'l bet he has a trauma by nowOriginally posted by RoD
Also, it must know what i want so that it can program itsself, for when it comes to doing code myself i become quite confused. Please use my name in given credits, as i will tell all my l337 friends that i haxx0r'd the code myself, being how l337 i am.
screw it i'll do it:Originally posted by dayknight
i need a working code in C++ (windows platform). It should be able to move a ball on the screen.
a nicely commented code will be aprecitated.
thxs
Code:int CreateBall(I_WANT_YOU_TO_MAKE_A_BALL) { NOW_DO_IT = TRUE; RETURN MY_BALL_JERK; }
HAHAHA!
// Something was here but i laughed so hard i coulnd't finish it
I had to do that for my Java final (it was in a basic class but my teacher decided to give me and a friend an "advanced" final). I had to be able to set up a variable sized grid (2x3, 4x20, etc), and make a ball start in the upper left and bounce at a 45 degree angle until it hits a corner. Then, I had to output how many times it bounced. I was trying not to laugh when he told me what to do cause I still remember all the code from when I programmed my breakout clone :P My friend had a collision check for each of the 4 directions (NE,NW,SE,SW) on each of the 4 walls, so he had 8 collision detections :P I told him it was much simpler to check if the ball was touching a wall and then just reverse the trajectory of the according axis, but he didn't have that either :P Ah...well...maybe you had to be there...
//napKIN
"The best way to get answers is to just keep working the problem, recognizing when you are stalled, and directing the search pattern.....Don’t just wait for The Right Thing to strike you – try everything you think might even be in the right direction, so you can collect clues about the nature of the problem."
-John Carmack
what header files do i need?
It's all in thereOriginally posted by Travis Dane
A place to start