distance.. seemingly stupid

This is a discussion on distance.. seemingly stupid within the Game Programming forums, part of the General Programming Boards category; what would be the best way to program the concept of position/location into a game? would use an array and ...

  1. #1
    lemon-heads
    Guest

    Post distance.. seemingly stupid

    what would be the best way to program the concept of position/location into a game?

    would use an array and position the character on the array?

    if not - how would i make the character move? and how would i represent his position on a map or on the screen?

  2. #2
    Programming is fun, mkay?
    Join Date
    Oct 2001
    Posts
    490

    Post Well, one thing...

    I am not sure what most of what you were trying to say meant, but to move a character, you use glTranslatef();


    GLfloat x;
    GLfloat y;
    GLfloat z;

    glTranslatef(x, y, z);

    x+=0.5f;
    Website(s): http://www16.brinkster.com/trifaze/

    E-mail: trifaze_mattu@lycos.com

    ---------------------------------
    C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
    DirectX Version: 9.0b
    DX SDK: DirectX 8.1 SDK

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Segfaulting Distance Program
    By radiohead in forum C Programming
    Replies: 2
    Last Post: 01-09-2006, 07:48 PM
  2. Distance Formula in my program..... I need help fast!!!
    By Mackology101 in forum C Programming
    Replies: 3
    Last Post: 09-23-2004, 10:10 PM
  3. shortest path problems
    By talz13 in forum C++ Programming
    Replies: 7
    Last Post: 05-08-2004, 06:13 AM
  4. Distance Formula Implecations: Urgent!
    By KneeLess in forum C Programming
    Replies: 6
    Last Post: 03-20-2004, 09:52 PM
  5. Fuzzy Logic
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 10-13-2002, 04:58 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21