Thread: first excitement...then the let down...

  1. #1
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743

    first excitement...then the let down...

    Well, while doing physics for my DBZ game that I am making, I needed to know my frame rate at one point in the mathematics.

    Now, I had never checked the frame rate of my game up to this point, I had never really had time...I was focusing more on getting the algorithms and stuff implemented rather than constantly checking my frame rate.

    So I put in some quick code to check my frame rate, and when I looked at it, it said:

    775 fps

    I was like

    Even in the 320x240 mode that I am using....775 is like WAY over the normal frame rate. I was happy. I was like...I am getting an awesome frame rate....mwahaha...

    Then I realized I coded the frame rate checking code in wrong...

    So then I fixed it....now it says 68....dangt...I liked my 775 fps...

    oh well, 68 is still good...
    My Website

    "Circular logic is good because it is."

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    That's funny. I've done stuff like that before. I wrote a memory moniter once and ran it alongside another program i had written. I kept getting this strange output that every time I ran my program, I was reclaiming 75K of memory! "Wow", I thought, "how is that possible?". Probing further though, I spotted the error in my code: I was losing 75K every time it ran! At least that was an easy one to spot, eh?
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

Popular pages Recent additions subscribe to a feed