Another medieval game for the contest! We have 3, right?
The current graphics looks cool. It reminds me the good old ZX and MSX games.
Another medieval game for the contest! We have 3, right?
The current graphics looks cool. It reminds me the good old ZX and MSX games.
No signature provided yet.
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.
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?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;
Last edited by Winwardo; 16-07-2011 at 02:59 PM.
What about if yz or xz are negative?function grabCollisionArrayPixel(xz,yz:integer;xx,yy:intege r) : 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?
eg
xz = -10;
xz mod 512 gives a result -10 (!!)
Last edited by Jimmy Valavanis; 30-03-2012 at 04:08 PM.
I had never thought of that Jimmy!
I changed it to
if ((yz mod 512) <= 0) then begin inc(yz); writeln('Error #001 caught'); end;
and suddenly partway through I found that being written to my console, went up the the top left corner of the map and there were goblins outside the map! I just need to make it so they'll auto-delete if they try going outside the map, and that should fix the crash!
Thank you so much Jimmy, you've saved the entry from random crashing
EDIT: Nope, seems there are other issues too. But that was one of them. :///
Double Edit: I seem to have trapped all the crashes now and stopped them from happening, so if it does crash when it's entered, I'll be pretty annoyed, heh
Last edited by Winwardo; 16-07-2011 at 08:15 PM.
Finished, just in time!
Uploaded to the FTP, and I've got a Dropbox redirect setup just incase something happens to the FTP and/or people want to try out the game without going to the FTP.
Download it here!
This has been a fun experience getting this game created and finished by the deadline, hope everyone else enjoyed doing this as well ( ignoring the stress of not being finished until fairly late into the contest )
Quick note: One of my playtesters had a bug where the goblins would pile up in a deathzone instead of taking damage. He had Windows 7 32-bit. If anyone else has this problem, please tell me and your specs to see if I can pinpoint the issue!
I just tried you game on Windows (64b) but didn't experience that problem. I did notice a situation in you 'castle' level where all enemies appearing from the right side are stacked on top of each other.
Bookmarks