Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About AvengingRage

  • Rank
  1. AvengingRage

    GL Primitives, texturing, and speed

    Thanks for the reply! Unfortunately the program I have in mind would need to change textures for every quad so looks like strips and fans are out. Oh well, there won't be enough to matter in this case, but its good to know for the future. Thanks again.
  2. Hey guys, this is is more of a theoretical question than anything to do with something I'm currently trying to code, but I will definitely be taking the answer into consideration in the future. OK, first off, how big of a difference is there in drawing time between things like triangles, triangle strips and fans, quads, etc. What I mean is, I know I can draw any quad as a combination of triangles, but is drawing 2 triangles faster than drawing a single quad? I assume the triangle strips and fans are faster than triangle lists as well since it doesn't have to read in as many points into memory. Also, how would one use triangle strips and fans with texturing? Since you have to specify a texture coordinate for each point, using a strip or fan would seem to indicate that you'd need to put in TWO coordinates for each vertex. Also what if you want to use multiple textures within the same strip or fan, is that possible? I hope my questions are clear, if not please ask and I will try to clarify. Thanks!
  3. Hey everyone, I'm working through the DirectX tutorial here: http://www.directxtutorial.com/index.aspx Its fantastic, but I'm running into some problems. I'm trying to use the matrix functions but for some reason when I installed the DirectX SDK, it didn't install the d3dx9.h header file. I did a search of my C drive and found sound d3dx9 dll's but no header file or .lib files. My compiler is complaining about not being able to find "d3dx9.h" and if I knew where it was I could point it in the right direction, but it doesn't seem to be anywhere on my system. Is this header file available only to the pay version of Visual C++? (I'm using the free VC++ 2008 Express Edition) Any help would be really appreciated. Here is the error, in case it helps: fatal error C1083: Cannot open include file: 'd3dx9.h': No such file or directory
  4. AvengingRage

    Performance Problems

    Moonshoe: the game is coded in OpenGL, no directX here. From the responses it sounds like this is a driver issue, not an issue with the code not being portable. Sounds good, I'll ask the testers to update their video drivers and see if that helps. Thanks guys!
  5. AvengingRage

    Performance Problems

    The game was compiled in XP and in one case definitely run in Vista. After I made some changes to try and speed it up a bit, it ran better in Vista. If this is indeed the root of the problem, is there any fix?
  6. AvengingRage

    Performance Problems

    Also, I realize you may want to look at the code, but its rather long so I didn't post it yet. I used the NeHe OpenGL tutorials as my basis so within the main game loop it does a bunch of checks for key input and then displays graphics appropriate to the current gameplay mode/menu mode. My question is more of a general one then about this specifically, though if it would help to look at my specific code, I will certainly post it.
  7. AvengingRage

    Performance Problems

    Hi all, Happy 4th of July to the Americans out there. My question is about performance when trasnferring a program from one computer to another. I wrote a fairly simple Rubik's Cube program and on the main page it has a Cube that rotates until an option is selected (tutorial, game, "low" scores, etc.) The problem is, when I zip up this code and the bmps and stuff and send it to someone to try, they complain of it running really slowly. When I play it on this computer (even if I copy the files and move them from the directory they were compiled in) it runs just fine with no noticeable lag, but when someone does it on their computer they say they have to hold up/down for about a second to get the cursors to move in the main menu. I'm wondering what would cause such a dramatic change in the speed of the program and what I can do to fix it. Thanks!
  8. Hi everyone, I have what should be a quick question. I am currently programming a Rubik's Cube game , and my DrawCub() function draws each quad separately. I've had a few complaints about how slowly the game runs when I send it to other people for testing, and I was thinking of speeding it up by using GL_QUAD_STRIPS instead of drawing a bunch of separate quads for each face, since this will reduce the number of calls to GlVertex3f I make. My problem is, I am texture mapping the quads. Since I have to specify texture coordinates for each vertex, can I use quad strips or does it have to be the way I've already done? Thanks!
  9. AvengingRage

    C++ or C#

    Thanks TerrorFLOP, for addressing some of the issues I was wondering about. I have learned C++ and been using it to code a couple of simple games for my own enjoyment and progress, but recently I've read some thing suggesting C# might not be a bad addition to make. I was wondering just how different the two languages are and how much use C# sees in commercial game development. So again, thanks for keeping me from creating another of these threads!
  10. AvengingRage

    OpenGL and stdin

    Well, I buckled and used windows messaging. I just used a global boolean for whether a new score had been set, and then a global int to be used as a counter for how many initials had been entered. I was hoping there was a simple way to read in some input without having to loop back through my game loop (the part that translates/dispatches messages is at the beginning) but I suppose of that's the way it must be done, that's the way it must be done. Thanks guys!
  11. AvengingRage

    OpenGL and stdin

    I realize that I cannot use the standard input, I simply left the code in there because that was the last thing I tried. I also realized I would have to somehow use the Windows API but I haven't used it that extensively and was looking for a pointer in the right direction. Bad pun aside, my main question is which functions should I be looking for? Doing some searching I find the kbhit() function in the conio.h header file which apparently waits for keyboard input but I can't get this to work properly.
  12. AvengingRage

    Simple data type question

    Someone can undoubtedly give you a better explanation but basically, since each bit's value is independent of the others it is 2^8 (256) not 2*8(16). Anyone else with more depth?
  13. AvengingRage

    OpenGL and stdin

    Hi all, first post here, glad to be a part of GameDev.net Anyway on to the question. I am trying to program a Rubik's Cube game. So far I have everything running. I have a tutorial explaining the controls, a functioning game page, a save/load function, and a "low" score page. The only thing I can't figure out is a problem with taking input from the user. I obviously use the keyboard for controls but this is done through windows messaging and the use of the virtual keyboard. In this small section, however, I need to take the user's initials. I have the game keep track of the number of moves to solve the cube and when it is solved it checks against the current list of low scores and if a new low score has been recorded it inserts it into the list. The list checking works perfectly, it inserts the new score correctly (pushing everything further down the list), but I can't seem to get it to take the user's initials correctly. Here is the code for this section: if(newlowscore == true) { for(int i = 9; i > lowscorepos; i--) { lsnums = lsnums[i-1]; lsnames[i*3] = lsnames[(i-1)*3]; lsnames[i*3+1] = lsnames[(i-1)*3+1]; lsnames[i*3+2] = lsnames[(i-1)*3+2]; if((i-1) == lowscorepos) lsnums[i-1] = movect; } lsnames[(lowscorepos*3)] = 'N'; lsnames[(lowscorepos*3+1)] = 'E'; lsnames[(lowscorepos*3+2)] = 'W'; LowScoresPage(fonts, lsnums, lsnames); glRasterPos2f(0.0f, 0.6f); glPrint(fonts[4], "Enter your initials..."); char initials[3]; cin >> initials[0] >> initials[1] >> initials[2]; lsnames[lowscorepos*3] = initials[0]; lsnames[lowscorepos*3+1] = initials[1]; lsnames[lowscorepos*3+2] = initials[2]; } As you can see, if a new low score has been made, it refills the list, sets the name to "NEW" although this should be temporary, and then is SUPPOSED to take in the user's initials. The cin command there is just one of the long list of failed methods I've tried to use. LowScoresPage is just a routine that draws the list of lowscores based on arrays of names (lsnames) and scores (lsnums). As I said, all of this code works perfectly except for accepting user input. It doesn't seem to take any input at all and sets the initials to " ". Is there someway to force windows to take in 3 characters? I don't want to have to use windows messaging because then I would have to loop back through the game loop. I know there must be a simple way to take 3 characters of input here, but for the life of me can't figure it out. If anyone could help, I'd really appreciate it. If you need any other information about the program, the variables or functions here, just ask! Thanks!
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!