Search found 721 matches

by MrGodin
January 13th, 2014, 2:42 am
Forum: Everything
Topic: IDirect3DDevice9
Replies: 8
Views: 3197

Re: IDirect3DDevice9

here is my engine, i thinks its all good All i did in Graphics class was make the Device pointer public; class Engine { private: TPlayer* Player; TEnemy* CurrEnemy; TMap* Map; LPDEVICE9 pd3dDevice; LPSPRITE pDrawSprite; ID3DXLine* pDrawLine; TEnemyList* pEnemyList; kbd keyboard; bool IsCtrlKeyDown; ...
by MrGodin
January 13th, 2014, 2:00 am
Forum: Everything
Topic: IDirect3DDevice9
Replies: 8
Views: 3197

IDirect3DDevice9

Hmm, So I had made the (IDirect3DDevice9) pDevice pointer public in the Graphics class but when i pass it to my Engine to create objects with, it doesn't create any objects. I have called the Engine inside of the Game class then pass the now public data gfx.pDevice to the Engine constructor which se...
by MrGodin
January 9th, 2014, 12:49 am
Forum: Everything
Topic: 3D Objects' Rotation: Help Needed[Solved]
Replies: 11
Views: 4583

Re: 3D Objects' Rotation: Help Needed

LOl ya sorry bout that. I created an struct to use with this which isn't shown, but this is how i get the plane of the terrain face the object is on GAME_OBJECT_MOVEMENT_DATA TTerrain::GetPlane(VEC3 inPos) { GAME_OBJECT_MOVEMENT_DATA data; data.Intersected = false; data.Pitch = data.Roll = data.Yaw ...
by MrGodin
January 8th, 2014, 9:46 pm
Forum: Everything
Topic: 3D Objects' Rotation: Help Needed[Solved]
Replies: 11
Views: 4583

Re: 3D Objects' Rotation: Help Needed

I get that, but you'd still need to find the angle between the two Vectors. I find my functions just does all this in radians, so all is well. I have a question though, maybe you can help. Hmm to explain this lol. For terrain following I do a ray pick into the terrain directly under the object, get ...
by MrGodin
January 8th, 2014, 8:12 pm
Forum: Everything
Topic: 3D Objects' Rotation: Help Needed[Solved]
Replies: 11
Views: 4583

Re: 3D Objects' Rotation: Help Needed

You need to get Yaw and Pitch ect in Radians, here are a couple functions i created to get yaw and Pitch, roll is a little harder .. hope this helps with your rotations .. static float GetPitchAToB(D3DXVECTOR3 inFrom,D3DXVECTOR3 inTo) { D3DXVECTOR3 v; v.x = inFrom.x - inTo.x; v.y = inFrom.y - inTo.y...
by MrGodin
January 5th, 2014, 6:15 pm
Forum: Everything
Topic: Clean code
Replies: 7
Views: 3370

Re: Clean code

programs basically boil down to " is it, or is it not", so you need to write functions or conditions to test this. There really is no other way. Just as binary is either 0 or 1.. it's on or its off. Unless you can come up with some crafty way of determining this, you're stuck with if's or switches e...
by MrGodin
January 3rd, 2014, 3:11 am
Forum: Everything
Topic: A little error with .wav files
Replies: 2
Views: 1410

Re: A little error with .wav files

This may help, the .exe and the wav files must be in the same folder when you run the game outside of the IDE. I think this is what you are experiencing ?
by MrGodin
December 31st, 2013, 10:11 pm
Forum: Everything
Topic: Chili's Funtime Physics Simulation
Replies: 14
Views: 6478

Re: Chili's Funtime Physics Simulation

Wicked !. Think i might play with that and see what i can come up with. Am a bit in awe of this. hmm wonder if ya can put textures (surfaces) on the squares. I might try that.
by MrGodin
December 17th, 2013, 6:42 pm
Forum: Everything
Topic: DirectX Vertices
Replies: 8
Views: 3443

Re: DirectX Vertices

You can use Vectors in 2D. You can have a D3DVECTOR2 which is x and y. You can do neat things with vectors such as eg: D3DVECTOR2 pos = D3DVECTOR2(10.0f,10.0f) then you can get a Velocity Vectors such as D3DVECTOR2 vel = D3DVECTOR2(-0.5f,0.0f). You can then go, pos += vel *speed and it will move alo...
by MrGodin
December 17th, 2013, 5:36 am
Forum: Everything
Topic: Linked Lists, thanks
Replies: 3
Views: 2017

Re: Linked Lists, thanks

Hi there GreatJake, I appreciate you find it a useful tool , thanks. I made this application with Borland C++ Builder. I use Visual C++ for my Direct3D work.