SimpleNewbieQuesitons
I am just learning DirectX programming and using the tutorials on this site I have come a long way, but there are a few things I am having problems with. I have directmusic up and running but I need directsound for waves and I cant find a tutorial on creating buffers and such with, if anyone knows a tutorial it would help alot, 2nD - I have my charater sprite on the screen and he moves around fully animated, but while he is moving the animation gets all fast and isnt smooth like when it is standing still. 3rd and final problem are menus. Not regualr file menus, but popup menus in the game(A black screen that pops up and has a cursor for the player to make selections)...just like old NES DragonWarrior style menus. I know I am asking alot at one time, but if anyone could help me it would be greatly appreciated...thanks
Hey. Maybe this helps.
1. Did u check articles and resources on this site? Try this: http://www.gamedev.net/reference/articles/article710.asp
2. i suggest locking the frame rate.
//Main game loop
int Fpslock=GetTickCount();
//Game loop
//after flip function
while(GetTickCount()-Fpslock<60); //60 is just an arbitrary number.
That should lock the Frame rate for ya. Easy enuf. Dont pound yourself on the head i did the same thing.
3. I dont know exactly what your question is but... object oriented programmin should take care of this. Just use a totally different blt segment...
4. Ever since i figured out D3D 2d programming its been a life saver. Stretching, Rotation and alphablending capabilities are awesome. If ur using direct draw with DirectX 7 i would look into this. Its a bit hard to understand but you will thank me later. here is a tutorial for that:
http://www.gamedev.net/reference/articles/article1434.asp
Hope this helps.
-Jon
1. Did u check articles and resources on this site? Try this: http://www.gamedev.net/reference/articles/article710.asp
2. i suggest locking the frame rate.
//Main game loop
int Fpslock=GetTickCount();
//Game loop
//after flip function
while(GetTickCount()-Fpslock<60); //60 is just an arbitrary number.
That should lock the Frame rate for ya. Easy enuf. Dont pound yourself on the head i did the same thing.
3. I dont know exactly what your question is but... object oriented programmin should take care of this. Just use a totally different blt segment...
4. Ever since i figured out D3D 2d programming its been a life saver. Stretching, Rotation and alphablending capabilities are awesome. If ur using direct draw with DirectX 7 i would look into this. Its a bit hard to understand but you will thank me later. here is a tutorial for that:
http://www.gamedev.net/reference/articles/article1434.asp
Hope this helps.
-Jon
Locking the framerate isn''t generally a good idea. Instead you should measure the time spent drawing/updating a frame and adapt your animations according to it.
Im a newbie myself. But could you explain to me how else you would lock down a speed that all instances of the game would run at? If you are running direct play for example how do make sure both instances of the game are running at the same speed if they have different video cards?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement