I need some suggestions from some of you people.
What would be a good first game using graphics?
I just figured out how to use graphics.h and I need some info on a project that would be simple for a first!
I need some suggestions from some of you people.
What would be a good first game using graphics?
I just figured out how to use graphics.h and I need some info on a project that would be simple for a first!
What is C++?
I just thought of a new game, it could be two player, or one against the AI. There is a runner and a catcher. Both players control circle, the runner circle is smaller that the catcher. If you are the runner, you are suppose to avoid the catcher for a certain time. If you are the catcher you are suppose to catch the runner. By catch, it means touch them. It looks better in my head than it sounds .
gcc -lalleg
http://www.ciusa.net/~jrgrant/
If you want to get some graphics experience without worrying about having to conquer anything too new, I'd say take a game you've already written in console and make a graphical version of it. Like say a graphical tic-tac-toe or hangman.
If you want something totally fresh, then maybe make a side-scrolling shooter or top-down shooter. And of course there's always everyone's (? maybe) first graphical game, Pong.
Chokes and spits out drink when sees pong...
PONG!?!?!
No thank you.. no bounce and angles and crap
I have a problem though... how do I use graphics with arrays?
Is there any good examples of programs
What is C++?
I'm not familiar with the graphics.h file you mentioned but here's a generic example of using arrays with graphics:
Not sure if that's what you're looking for or not. If you could post a generic blit routine that you might you use, I can offer more specific help.Code:CEnemy cdBadGuys[3]; CHero chYou; int i; MainDrawingLoop() { for(i=0;i<3;i++) { if(cdBadGuys[i].IsAlive()) { cdBadGuys[i].DrawBaddy(cdBadGuys[i].MapX(),cdBadGuys[i].MapY); } } chYou.DrawHero(chYou.MapX,chYou.MapY); }
Jason
I really just want to know how to draw.. say a circle and move the circle across the screen.
And is it dificult to use images?
Im not sure how I would make a ship in a shooter?
What is C++?
What compiler are you using? Did graphics.h come with it or is it something you downloaded from somewhere else? This is the first I've heard of it so I'm not sure if it's a stand-alone library or a wrapper for another. If I can find out what API/library it's using then I can look into it and give you a better answer.
Borland C++ 5.02
Its BGI graphics.
cant get any farther...Code:#include <iostream.h> #include <graphics.h> int GraphicsDriver; int GraphicsMode; int gridx [50]; int gridy [50]; int main() { initgraph ( &GraphicsDriver, &GraphicsMode, "c:\\bc5\\bgi" ); setcolor (RED); outtext ("So sue me.. "); setcolor (YELLOW); setfillstyle ( SOLID_FILL, YELLOW ); pieslice ( 100, 100, 30, 330, 15 ); setcolor (WHITE); setfillstyle ( SOLID_FILL, WHITE ); pieslice ( 140, 100, 1, 360, 2 ); pieslice ( 160, 100, 1, 360, 2 ); pieslice ( 180, 100, 1, 360, 5 ); cin.get(); closegraph(); return 0; }
What is C++?
You finally figured that thing out huh? That's some funky old DOS library J Why don't you give tetris a try Vicious? You'd get to learn basic collision among cool stuff.
"The mind, like a parachute, only functions when open."
I would but all I know how to do is put out the graphics...
I cant make it move or get key input and move the pieces or whatever.
What is C++?
oh and if anybody knows this...
How do you make a tetris block?
What is C++?
Whoa... I think you're going to need to learn how to get keyboard input if you're going to make a game there buddy
Tetris blocks? Think about it... every block is made up of four smaller blocks.
You could either code some rectangles, or use bitmaps.
I'm about to start working on a tetris game myself. I've put it off way too long. I just can't decide which library to use. No, I don't think I'll use BGI
"The mind, like a parachute, only functions when open."
Thanx again Lamb.Code:#include <iostream.h> #include <graphics.h> #include <conio.h> int GraphicsDriver; int GraphicsMode; int x = 25; int y = 25; int quit = 0; int mve; int main() { initgraph ( &GraphicsDriver, &GraphicsMode, "c:\\bc5\\bgi" ); while ( !quit ) { gotoxy(1,1); cout << "X: " << x << " Y: " << y; mve = getch(); switch ( mve ) { case 'w': y--; break; case 's': y++; break; case 'd': x++; break; case 'a': x--; break; case 'q': quit=1; break; } cleardevice(); circle ( x, y, 10 ); } closegraph(); return 0; }
Last edited by Vicious; 05-29-2002 at 11:52 PM.
What is C++?
OOOPS!
Forgot to post my question.
How can I make it move faster??
What is C++?
"The mind, like a parachute, only functions when open."