My problems with the sphere continue.
Well, last time the code was rather incomplete. Here's the complete thing.
I have added Normals for the calculation of the texture cordinates, as
suggested....
Type: Posts; User: CodeJerk
My problems with the sphere continue.
Well, last time the code was rather incomplete. Here's the complete thing.
I have added Normals for the calculation of the texture cordinates, as
suggested....
I have used this code to put a texture on my sphere, but it doesn't work.
float z = r * cosf (seg * fDeltaSegAngle);
float x = r * sinf (seg * fDeltaSegAngle);
float z1 = r1 *...
yes, it occasionally doesn't display the gameOver message. I was having some problems with that.
I plan to change that to a dialog box, and also work on a menu system, thanks for the feedback.
Now the game won't quit no matter how many times you hit Alt. After a certain degree, the snake cannot accelerate more.
Don't keep ALt pressed, hit it just once. Or hit Cntrl to slow things down. Thanks anyway
Hi folks.
This is my first game, Snake. Please try it. Its a 2D game that used DDRAW.
Movement :-
The snakes movements are controlled by the arrowkeys. Alt speeds up the snake, and Cntrl...
Hi there!
In my Notepad program, to determine char widths I use the following code.
pDC->GetTextMetrics (&textmetrics);
Size = pDC->GetTextExtent(pDoc->m_text);
HideCaret();...
I got it. Thanks all of you. Its different in .NET, but then it seems to be good too.
Hi folks.
I was writing a program that would need to open files. Now on that, I would like to have display like explorer (in the form of a hierarchial tree). Could some one please guide me to a good...
I used the following code in my Paint program
switch (flag)
{
case 1:
//drawing freehand
CPen *penBlack,*newpen; // Construct it, then initialize
if(...
Following is the code for the ON_WM_MOUSEMOVE in my paint program.
void CPainterView::OnMouseMove(UINT nFlags, CPoint point)
{
CClientDC *pDC = new CClientDC (this);
switch (flag)
{...
the classwizard usually comes up with Cntrl-W, but that doesn't work in MS VC++ .NET. Any idea how this is done in the .NET version.
I don't find a corresponding entry in the View menu also. If its...
Well, I was trying to add a CheckBox to one of my programs. The following Message Handler was added.
void CCheck2Dlg::OnBnClickedCheck1()
{
// TODO: Add your control notification handler code...
I am writing a Calculator program in Visual C++. I am using a Dialog-Based Template for the purpose. My problem is I am unable to trap the WM_CHAR message in the program. So my Calc cannot use the...
I used a .rc file, and with the following code,
#include <windows.h>
#include "d:\Rscript.rc"
bool MainDialogProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
return false;
}
I was writing my first windows program (as a WIN32 Console Application) , trying out this tutorial http://sunlightd.virtualave.net/Windows/GUI/DialogBoxes.html;. It says that I include a Resource...
I know you already have four choices, but there is another good (and relatively inexpensive) book that I think could be added to your list .
Game Programming All in One
by Bruno Miguel de Sousa.
...
Bah!!!!!
Hey Hammer....you could do well by reading the entire thread before posting. That way, you could have known what book I was referring to.:D :D :D :p :p :p
Why don't you go to some simpler book like the one by Herbert Schildt ?. That would (probably ;) ) give you a better (and easier!!!)learning experience.
r = random (100);
I think the problem with your code is that the result of the randomize() should be stored in a float. Try the following code -
float r,u;
r = randomize(100);
u = r/99.0;
printf("%f",u);
I am trying out GAME PROGRAMMING All in One by Bruna Miguel Teixeira de Sousa. Am I on the right path ? Has anyone out there already tried this book out?
I was recommended a book called Tricks of...
I want a little help in the randomization process, that is, the process that generates cars randomly. How do i generate the poisson distribution.
And yes, this is my OOP semester project.
Thankx
I am doing a computer simulation, where I have to simulate cars coming into a car wash. 1 car comes in 4 minutes on an average. On a given day not more that 150 cars come into the wash. How do I...
Thanks for the link