Thread: I present to cprogramming.com: Prongject X

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    great game :] you should post it in the 'post your games thread', i've got one that looks like this in there

    it uses glfont2 http://students.cs.byu.edu/~bfish/glfont2.php -- it works alright but it is many years old there might be better solutions now
    Last edited by Tonto; 04-02-2009 at 08:10 PM.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    The new code is better.

    But you are still repeating the a_min and a_max calculation twice. The only time it's not going to be done is if ball.velocity.x == 0 [not sure if that's valid at all! - if it isn't, perhaps you should add a debug assert to ensure it doesn't happen].

    Also, you still have the constants 75 and -75 in the code. It should be "field_size" or some such, I think.

    Is the 70 in "paddle_collision" also related to the 75? If so, you probably should have that as a calculation from the named constant.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. cprogramming.com IRC channel
    By codec in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 05-06-2004, 10:31 AM
  2. #cprogramming.com
    By Eibro in forum Contests Board
    Replies: 5
    Last Post: 03-25-2003, 08:06 PM
  3. My birthday present to myself
    By Liger86 in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 01-25-2003, 09:49 PM
  4. Changes at CProgramming.com
    By kermi3 in forum C++ Programming
    Replies: 0
    Last Post: 01-04-2002, 10:58 AM
  5. Talk about cprogramming.com
    By zahid in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 01-02-2002, 11:07 AM