Results 1 to 10 of 23

Thread: PGDmC: Knight Fever

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #19
    The game is practically ready for upload, I just need to get all the art finished and into the game. Here's the main menu and a pic of you ingame.





    The gameplay is very simple, two buttons for attacking, three buttons for movement, goblins spawn progressively faster as time goes on, and anytime a goblin dies without you killing it (such as in a lava pit) you lose points. Will have the game up ASAP

    EDIT: Also, it suffers from a crippling bug that closes the game due to accessing a bad part of memory. I can't replicate this bug, and even with a try except statement and other stuff, it still SIGSEGVs.

    Code:
    function grabCollisionArrayPixel(xz,yz:integer;xx,yy:integer) : byte;
    begin
      if ((yz mod 512) = 0) then inc(yz);
      if ((xz mod 512) = 0) then inc(xz);
      if(yy < 1) then yy := 1;
      if(xx < 1) then xx := 1;
      try
        result := arrayCollisionPixels[yy,xx]^[ (512 * (yz mod 512)) + (xz mod 512) ];
      except
        raise exception.create('Bad memory access');
        writeln('SIGSEGV noted');
        result := 255;
      end;
    end;
    If anybody could help me with stopping this from crashing I would majorly appreciate it. It's certainly not xx and yy being out of bound, and the second value can range from 0 to 262144. By my calculations, (512 * (yz mod 512)) + (xz mod 512) should never be larget than 262143, even if yz and xz are both 511. So any ideas?
    Last edited by Winwardo; 16-07-2011 at 02:59 PM.

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
  •