Jump to content
  • Advertisement

Venerable Vampire

  • Content Count

  • Joined

  • Last visited

Community Reputation

151 Neutral

About Venerable Vampire

  • Rank
  1. Venerable Vampire

    Projection in the middle of View

    The way you are doing it, which is fairly consistent with the way OpenGL works, has the point at 0,0,0 in 3d space being translated to the center of the screen. What you need is for an object to be shifted out of the screen by a number of units along the z axis so as to make it appear. There is no easy formulaic thing for determining a 'correct' distance because you usually don't want it to be based on that but on user input instead (games, 3d modellers, etc.). Just pick your projection value and fiddle with z values untill it looks right. On another note, your projection distance can be calculated from the screen width and the field of view you want. projection_distance = width/2/tan(field_of_view/2); Note that tan is a trig function, and is usually in radians.
  2. Venerable Vampire

    why won't this work??

    I assue from the private static final thingy you are in Java, so I have two things. 1. private static final int The keyword "final" there indicates that the variable cannot be changed after initialization. So you usually give it a value in the same statement as the declaration, as in your first (working) example. 2. outside of methods variable declarations are permitted, but assignments are not. So: private static final int GAME_STATE_INTRO = 0; is perfectly valid outside of a method. While: GAME_STATE_INTRO = 0; is not, unless you did that in main, but then a conflict might arise over the final keyword, not sure.
  3. Venerable Vampire

    Pong help

    I agree with the people above me, and I must recommand that you do two things, in order: 1. put pong on hold for a little while. If you really are just that new to programming, you don't want to consider graphics yet, much less user interaction or animation! Learn your language. You mentioned C. C is a great language, go find websites about it. Learn all you can about it untill you really think you can do it. I learned Java to quickly and was frustrated for about 6 months where I did little to no coding. Don't do that! 2. Get something like Allegro or SDL. You said simple, but those are about as simple of graphics as you can possibly get. I haven't used Allegro, but I know SDL does everything for you and lets you do graphics, user-interaction, and animation with little to no trouble. Learn how to do some kind of simple demo with each of those first, then try pong. 3. Have fun!
  4. Venerable Vampire

    Engine of Colin McRae Rally

    I also would not like to start a flame war, but how can you even suggest that Micro$oft would even think of PORTING DIRECTX. It's like a staple of windows.
  5. What are you using? GLUT - glutSetCursor(GLUT_CURSOR_NONE); <--- maybe, not sure SDL - SDL_ShowCursor(false);
  6. Venerable Vampire

    moving problems.

    OK in SDL when you press a key the key pressed event that is generated only occurs once, and the released event also only occurs once. You can't just poll the loop to see if the key was held. Suggestion: Make an array of boolean variables, like 256 or 512 in size. When a key is pressed, set the boolean with that key value to true, and released set it to false. So every loop when you need to move something or check a key press, check the array and not the actual event queue.
  7. Venerable Vampire

    Any explanations for this.

    In OpenGL near plane values of less than 1 can cause artifacts. Just use 1 if you can.
  8. Venerable Vampire

    Problem rendering colored spheres on Mac

    java stuff works exactly the same on every platform supported, mac included. The problem is most likely that the Java3D library is not installed, or not installed correctly. I haven't used Java3D much, or recently, but it may be that a special linkage needs to be used. Specifically what kind of problems are you having?
  9. Venerable Vampire

    Java Engine

    Definantly an application. As an applet you can't get total control of the screen or some other stuff that really allows for a fully-imersive demo/game/thingy. If you want to impress your teacher/classmates make a simple 3d game or rotating (fill in cool shape). Or a wave simulation.
  10. Venerable Vampire

    vector versus array - a race

    you're thinking of lists, like linked list in the 'list' class. Those are much more 'dynamic' that just straight arrays, but usually you don't need all that and it is better to use vectors because it's just as fast to access in the middle as it is to increment along it.
  11. Venerable Vampire

    How to deconstruct a game...?

    c compilers can usually give you the assembly source for a particular source file. I think the *nix syntax is somthing along the lines of: gcc myfile.c -S and returns a file myfile.s or something
  • 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!