Jump to content

Recommended Posts

Posted
Im with weird, why is it that this tuturials take so long so we can start working with graphics!? I want to make a game out of sprites already!

oh

 

well if you wanna do that I suggest you take a physics class or something cause there is physics involved in games

 

a lot

  • Replies 61
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Well, Drake, I don't think you can use graphics on console applications on visual. It's a middle stage between dos programing and windows programing.

If you want to use graphics, advance to windows applications, or go back to Turbo C++. Turbo C++ is much simpler.

Posted
Just give up axl, you're too dumb for something of this magnitude.

Hey, I like your honesty. :lol:

Posted

Well, my teacher aint going toward window's applications any soon, I guess I'll look for site that teach me how to use C++ on making programs desighned for Win32 instead of cmd prompt...

Posted
Well, my teacher aint going toward window's applications any soon, I guess I'll look for site that teach me how to use C++ on making programs desighned for Win32 instead of cmd prompt...

IMO, I think it's better to learn the command line stuff, cause making resources is just putting a bunch of pictures and crap like that

Posted
Well, my teacher aint going toward window's applications any soon, I guess I'll look for site that teach me how to use C++ on making programs desighned for Win32 instead of cmd prompt...

First things first. Make sure you are at ease with writing algorithms in whatever language you are using before starting graphical programming.

Posted
Well, my teacher aint going toward window's applications any soon, I guess I'll look for site that teach me how to use C++ on making programs desighned for Win32 instead of cmd prompt...

First things first. Make sure you are at ease with writing algorithms in whatever language you are using before starting graphical programming.

That is the problem with Drake's case... He wants to get into making graphics (or rather, something that can be called a graphical game) way too early. Jesus Christ man, learn the basics extremely well before even dreaming about doing graphics.

Posted

This is a nice quote by John Carmack about programming:

"Like most things, it is difficult to come up with a single weighted sum of the value of a programmer. I prefer to evaluate multiple axis independently. Programming is really just the mundane aspect of expressing a solution to a problem. There are talents that are specifically related to actually coding, but the real issue is being able to grasp problems and devise solutions that are detailed enough to actually be coded. Being able to clearly keep a lot of aspects of a complex system visualized is valuable. Having a good feel for time and storage that is flexible enough to work over a range of ten orders of magnitude is valuable. Experience is valuable. Knowing the literature is valuable. Being able to integrate methods and knowledge from different fields is valuable. Being consistent is valuable. Being creative is valuable. Focus is extremely important. Being able to maintain focus for the length of a project gets harder and harder as schedules grow longer, but it is critical to doing great work."
Posted

Whats the problem with me going into graphics? I know the basics...sorta, and the reason we ain't getting into graphics soon is because my teacher is doing graphics next year in programing 3 with JAVA instead of C++, im also taking programin 1 , Visual Basic, wich isn't required, but since im getting 8 classes instead of 6 next year I can take it now

Posted
Whats the problem with me going into graphics? I know the basics...sorta,

The "sorta" is precisely the problem. If you really want to try, you can begin with a library like SDL.

But the real problem is that if you were really serious about that you would find the info yourself, and already be at work.

And Visual Basic isn't gonna do you any good.

Learn all you can from your lessons and from other people, but you'll always have to find the most part of the info yourself. Lessons are made to get you started, to show you important points and to make you avoid the most common mistakes, but that's all.

 

Gryph, that's a nice quote :P

Posted

Win32 programing with C++ is H A R D.

I tried to learn it, but it's way to complex. You need to remember T O N S of code. here is the code for a simple empty window:

#include <windows.h>

const char g_szClassName[] = "myWindowClass";

LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
   switch(msg)
   {
       case WM_CLOSE:
           DestroyWindow(hwnd);
       break;
       case WM_DESTROY:
           PostQuitMessage(0);
       break;
       default:
           return DefWindowProc(hwnd, msg, wParam, lParam);
   }
   return 0;
}

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
   LPSTR lpCmdLine, int nCmdShow)
{
   WNDCLASSEX wc;
   HWND hwnd;
   MSG Msg;

   wc.cbSize        = sizeof(WNDCLASSEX);
   wc.style         = 0;
   wc.lpfnWndProc   = WndProc;
   wc.cbClsExtra    = 0;
   wc.cbWndExtra    = 0;
   wc.hInstance     = hInstance;
   wc.hIcon         = LoadIcon(NULL, IDI_APPLICATION);
   wc.hCursor       = LoadCursor(NULL, IDC_ARROW);
   wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
   wc.lpszMenuName  = NULL;
   wc.lpszClassName = g_szClassName;
   wc.hIconSm       = LoadIcon(NULL, IDI_APPLICATION);

   if(!RegisterClassEx(&wc))
   {
       MessageBox(NULL, "Window Registration Failed!", "Error!",
           MB_ICONEXCLAMATION | MB_OK);
       return 0;
   }

   hwnd = CreateWindowEx(
       WS_EX_CLIENTEDGE,
       g_szClassName,
       "The title of my window",
       WS_OVERLAPPEDWINDOW,
       CW_USEDEFAULT, CW_USEDEFAULT, 240, 120,
       NULL, NULL, hInstance, NULL);

   if(hwnd == NULL)
   {
       MessageBox(NULL, "Window Creation Failed!", "Error!",
           MB_ICONEXCLAMATION | MB_OK);
       return 0;
   }

   ShowWindow(hwnd, nCmdShow);
   UpdateWindow(hwnd);

   while(GetMessage(&Msg, NULL, 0, 0) > 0)
   {
       TranslateMessage(&Msg);
       DispatchMessage(&Msg);
   }
   return Msg.wParam;
}

Posted

And don't think that everything else is just adding a few pieces of code to this program. You will need to write a lot for every thing you do.

 

However, you can have your graphics now if you will use Turbo C++. You can download the program from my tutorial. There are graphics functions in "graphics.h", and you can get keyboard input with kbhit() and getch(). Press F1 or the right mouse button for the great help provided with this compilers.

 

The functions in "graphics.h", kbhit and getch are not very good, but I am working on an header of my own. I will send it evryone who want it when I'm done.

Posted (edited)

Yeah....*pulls out C++ class book teacher lend me*...I looked up the page on graphics...there's like 5 chapters on this and thats just the basics of it....so yeah, now I know what ya'll mean, but my teacher said that if the class does good he might end the year with 9 weeks of graphics...but idk if he was playing around

 

Edit:Somebody...I thought it was easier to use IF statments instead of using switch...whats up with that?

Edited by Drake
Posted

Switch is way easier the if, if you have a lot of options. I belive it's faster too.

You just need to remember to put "break;" in the end of each case.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...