Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Weird problems with collision in Super Heli Land

  1. #11
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,108
    Blog Entries
    25
    Quote Originally Posted by SilverWarior View Post
    When I use Evalueate tool it usually shows that object is "nil" which is verry strange as the object gets destroyed only on one place and that code isn't called.
    Other times the Evaluate tool shows that memory at adress "x" cant be acsessed.
    Could also be that it's not being created properly. If we cancel out the debugger issue.

    Quote Originally Posted by SilverWarior View Post
    I'm using Lazarus 1-0.10 with FPC 2.6.2.

    BTW: Does Lazarus have auto-evaluate functionality like Delphi has?
    I've not done a lot in Lazarus lately and I think I only just got into Lazarus 1.x just after it hit the new major version number so I couldn't tell much about it's stability unfortunately. Though I have had problems with the GBD debugger on Mac using Lazarus in the past while it was in 0.9x.

    You mean hovering your mouse over the code to see the values as you step through each line of your code? Yes, but if that's not what you mean, I don't know.

    Guess I'm not much help here.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  2. #12
    Quote Originally Posted by WILL View Post
    You mean hovering your mouse over the code to see the values as you step through each line of your code? Yes, but if that's not what you mean, I don't know.
    Lazarus can't always evaluate class variables, but shouldn't have issues with unit variables and constants, or those that are declared inside procedures. Sometimes i declare such variable just to copy the value from class var into unit var, to be able to see its contents.
    (Lazarus uses GDB, which is not perfectly compatible with FPC or Lazarus. In that sense Delphi's debugger might be way ahead.)

    And sorry about derailing the thread, i only mentioned the nil value quickly, and even told you that i made sure that it's not actually nil. I did also try compile and run the actual project, and couldn't find reason for weird collisions yet.

  3. #13
    SilverWarrior, I'm using Laz 1.0 with FPC 2.6.0. Maybe that's the problem? Dunno.

    @User137, @Will - it's not much of a crash now, as I've eliminated source of it (I call State.Update differently now and threads don't get in the way). It's more collision either being stuck (app doesn't freeze as when I press ESC in Debug State game is returning to main menu) or gets epilepsy.

    I have strong feeling that it may have something to do with how I now update states, but can't pinpoint exact source of a problem (calling too often?). Last night (12/13 august) I've spend debugging issue. Nothing came out of it.

  4. #14
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,108
    Blog Entries
    25
    I'm afraid I'm not very knowledgeable with threading so my advice stops there.

    That would make a great PGD tutorial btw! (How To Use Multithreading In Your Games 101)
    Jason McMillen
    Pascal Game Development
    Co-Founder





  5. #15
    In timer thread only variable is increased, which serves as queue. Actual update now takes place in main loop, but I can't find out why it does bad things to collision (not as bad as previous code which cased crashing, mid you).

  6. #16
    When I tried to port your game to Delphi the other day (which I failed due to allegro.pas not being compatible with Delphi) I noticed that Delphi warned me about overloading several of your functions.
    In Delphi if you have more than one function with the same name you need to mark all of them with "overload" command. I belive FPC should do this automatically. But I remember reading once somewhere that there was some problems with automatic overloading of functions in FPC.

    Another thing that puzles me greatly is the way how you are handling colision detection. I simply don't get it how that could even work and not end up in infinite cycle. Of course since I can't debug your game properly I can't step through your colision detection system to learn how it works properly. Well I could step trough it but since I can't see what information is stored in certain variables it isn't helpfull.

    If you manage to convince Nuno Martines zo make allegro.pas Delphi compatible I would be able to help you more.


    Anywhay until 3rd PGD competition is over don't expect much help since many mebers are participating and therefore working on their own projects now.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Comodo SSL