One option is to store the frameCounter as a decimal number instead. Each frame you increase it in the lines of:
frameCounter += (xVelocity * xVelocity + yVelocity * yVelocity) * fTime *...
Type: Posts; User: The Wazaa
One option is to store the frameCounter as a decimal number instead. Each frame you increase it in the lines of:
frameCounter += (xVelocity * xVelocity + yVelocity * yVelocity) * fTime *...
Ah, that was exactly was I was looking for - thanks.
I changed the declaration to this:
__declspec(align(16)) int mulConst[4] = {0x0F98A402, 0x50A89EC7, 0x8362A7DE, 0xEF83C901};...
Thanks for pointing it out, I don't really know what I was thinking about when I wrote -17.
It also seemed to fix the problem. :)
I also changed the code a bit to use aligned data instead, I...
I have a problem where my code behaves quite strangely in release mode. I'm practicing how to use intrinsics by writing a simple hash function and I'm getting a crash when I load in data to a xmm...
I'm pretty sure you can simulate gravity by simply accelerating the players velocity towards the ground.
Acceleration is added to velocity by using:
velocity = velocity0 + acceleration * delta...
The sin and cos functions are simply mathematical functions, belonging to trigonometry. There are some pretty good information on how those operations behave on wikipedia.
Do you mean something like D3DXCreateTextureFromFile?
Are you building your code in debug mode? I often get the issues you describe if I try to use the debugger in release mode.
When I wrote a game state manager some time ago I had a similar problem; I didn't want to return a direct index to the game state as I would need something to keep track of all those indicies and I...
Actually, the release on the device should only be called at the end of WinMain (or once when the application closes). You don't want to release your device at every message you receive so what you...
I guess the reason that you need a linked list is because of this:
Am I right? And are you allowed to use the STL, and hence the std::list class (IIRC it's a linked list)?
If you really do want...
I did it in about 116 seconds, but I too used copy and paste :)
Now that I've answered the standing question, I feel like writing something meanful.
To thread creator: check this awesome page out:...
I'm writing a kind of text based game right now. However, its not fully text based (got a graphical combat) and its a MMORPG, and the client will (is being) be written in flash.
The design can be...
Problem resolved!
Quite embarassing but:
I forgot to allocate the Game instance ;)
m_pGame = new Game(); fixed it.
I have a STL list which I know is empty, but I still do as always and...
http://msdn2.microsoft.com/en-us/library/aa366899.aspx
I'll let you figure out how to use this lovely function yourself (and my code using it is gone anyway), good luck :)
A for loop works like this:
for (*called when initialized*; *condition to be true*; *called after each loop*)
{
}
//Example:
for (int i = 0; i < 5; i++)
{
I have been thinking about it, and thought it was a good idea. But then I read this article and the author liked the mark-sweep method more. But now that you mention it, I'm not sure if this manager...
The purpose of this manager is to keep it automated, and avoid memory leaks. I have tried to write a "fast" manager before, but it ended up being 2x slower than new/delete. So this one isn't targeted...
That was good reading but I'm afraid I didn't find what I was looking for (maybe I haven't been looking hard enough), and after reading my first post again I realized it was a bit... fuzzy. Here's is...
Hi
I'm writing a memory manager and I wonder if it possible to call the destructor of an object (assuming I know it has one) from the memory manager?
The memory manager allocates a big chunk of...
Hi
I've written a class called ByteStream that will support encryption, decryption, compression and decompression. But I've ran into a problem with the decryption.
Here is the code (feel free...
Using Direct3D for the graphics, haven't tried any higher level libraries yet.
Just noticed a new version is out :O
Warp tiles and kill tiles are awesome.
But you should really reduce the number of warp tiles greatly and make them travel you a bit shorter. I just got 47...
Check the link I posted, it tells you how to configure VS 2005 Express with the platform SDK and how to enabling the windows applications. I also think you need to configure the directories, I don't...
The pause button is very nice, but I have some suggestions about improvements:
-Remove the spinning bricks. They just make the whole thing very random, not so much skill anymore - at least not in...