# marltoro

Member

22

141 Neutral

• Rank
Member
1. ## Are there any college courses for creating physics engines?

I recently learned OpenGL and tried programming my own collision algorithms but am having too much trouble trying to figure it out on my own. I could get 2D circular collision detection working easily but I had too much trouble programming an organized structure that included sweep testing. Are there any online college courses that would teach you how to write your own physics/collision algorithms for games/applications? -Thanks
2. ## Would you give up your body to live inside a computer?

I would never do that. I always imagine getting infected by some computer virus if my mind was transferred into a computer.
3. ## Geometric Collision Book?

I'll check it out, thanks. By the way, would you know what kind of math prerequisites are needed for this book?
4. ## Geometric Collision Book?

Hey, I was wanting to buy a book to learn more about collision, but I'm not sure which one I should get. Any recommendations? I was looking at Computational Geometry: Algorithms and Applications but I wasn't sure if it would go over the things I needed. [url="http://www.amazon.com/Computational-Geometry-Applications-Mark-Berg/dp/3642096816/ref=sr_1_1?ie=UTF8&qid=1327205434&sr=8-1"]http://www.amazon.co...27205434&sr=8-1[/url]
5. ## Recommended Ai Books And Sites

Would [color=#1C2837][size=2]Programming Game AI by Example work with any object oriented programming language like Java?[/size][/color]
6. ## PNG or DDS?

I am creating a game with DirectX 9 and I was wondering if I should use .png or .dds for the texture format. I have a background texture that is 0.5 mb in .png format and about 8.5 mb in .dds format.
7. ## File iostream question

[quote] Have you considered using ofstream and ifstream? I used to use iostream, but I have found reinterpret_cast<char *> of my data struct makes for really slick saving and loading of game data, I could post some code on how I do it if your interested. [/quote] That would be great
8. ## File iostream question

I am creating a program that will load data from a .dat file to multiple vectors inside the program. But my question is, when I'm reading from a file, what would be the easiest way for me to skip lines or go to the previous line? I tried looking on Google but I couldn't get anything from there to work.
9. ## Movement speed

Alright thanks for the help guys. I'll be able to try out the code later tonight and if it works I'll tell you.
10. ## Movement speed

I created a program in Direct3D 9 that moves a cube across the screen. It works perfectly fine except when I lower the frame rate it moves much slower. Which makes perfect sense because it's moving 2 units per a frame. How could I make the cube move smoothly based on time? I tried using the timeGetTime(); function but it was still moving slower when the frame rate was slower. [code] if(LookRight == true) { // Movement timing // Moving is false by default if(Moving == false) { startTimeMovement = timeGetTime(); finishTimeMovement = startTimeMovement + 1; Moving = true; } currentTimeMovement = timeGetTime(); if(Moving == true) { if(currentTimeMovement > finishTimeMovement) { // Move xPos = xPos + 2.0f; // Set up for next movement Moving = false; } } } [/code]
11. ## Texture Alpha

For anyone else who has this problem, you have to use this code before you render the scene // Alpha blending D3D9Dev->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); // turn on the color blending D3D9Dev->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); // set source factor D3D9Dev->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); // set dest factor D3D9Dev->SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_ADD); // set the operation
12. ## Texture Alpha

Alright then, thanks for the help
13. ## Texture Alpha

Ok I found a D3DXCreateTextureFromFileEx function but It will only change the 255 Red, 0 Green and 255 Blue to black. How do I make it a transparent color instead? D3DXCreateTextureFromFileEx(D3D9Dev, InactiveSprite, 512, 256, 0, 0, D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, D3DCOLOR_XRGB(255, 0, 255), NULL, NULL, &Inactive_Sprite);

DirectX 9
15. ## Texture Alpha

How would I make a certain color in my texture invisible? For example, if I wanted the color 255 Red 0 Green and 255 Blue to be invisible in my program, how would I do that?