Results 1 to 4 of 4

Thread: Stupid bugs and strange code

  1. #1

    Stupid bugs and strange code

    I looked several pages back and haven't found any topic like this, so why not make one? Generally, this could be a place to talk about some stupid bugs that took forever to find, but eventually made us facepalm over how stupid of a mistake they were. Or to talk about some strange code we have seen.

    I'll start with a short one from the days I developed Alexland 1: somehow I managed to mistake sin and cos, but since they were calculated basing on Hero Position and Mouse Position, and I was consistent in making the same mistake when calculating bullet movement, this was not a problem. Actually I only realised this when I added a weapon to the game that would calculate bullet sin+cos from angles and not two points. The whole story resulted in the following code:
    Code:
    With Bullet[BulNum] do begin
       (...)
       Sinx:=Cos( ... );
       Cosx:=Sin( ... );
    end;

  2. #2
    Quote Originally Posted by Super Vegeta View Post
    I looked several pages back and haven't found any topic like this, so why not make one?
    There is one similar topic but it is located in different sectiomn of the forum Actually it has been started recently by Will (nearly the same time as 2nd PGD mini competition). You can find it here: http://www.pascalgamedevelopment.com...-we-used-to-do
    As you will see there were several posts from various pepole, even me, about our coding mistakes or simply usage of unnecessary or wrong approaches.

  3. #3
    Quote Originally Posted by SilverWarior View Post
    There is one similar topic but it is located in different sectiomn of the forum Actually it has been started recently by Will (nearly the same time as 2nd PGD mini competition). You can find it here: http://www.pascalgamedevelopment.com...-we-used-to-do
    As you will see there were several posts from various pepole, even me, about our coding mistakes or simply usage of unnecessary or wrong approaches.
    I think the post from Will is more focused on stupid things we did, instead on stupid bugs. You know, a persistent bug eventually becomes a feature!

  4. #4
    Quote Originally Posted by pitfiend View Post
    I think the post from Will is more focused on stupid things we did, instead on stupid bugs. You know, a persistent bug eventually becomes a feature!
    Stupid bugs are results of strange code and silly things we used to do atleast until we realized that and fixed it as it should be. So I belive both topics cover roughly the same area.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
http://flippulseimages.com/Computer/herbie-goes-to-monte-carlo.html