Results 21 to 27 of 27
Thread: Help with game
- 01-11-2010, 03:26 PM #21
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,427
- Blog Entries
- 7
- Rep Power
- 17
- 01-12-2010, 10:39 AM #22
Member
- Join Date
- Nov 2009
- Posts
- 32
- Rep Power
- 0
I get an unreachable code:
This is in the isToegankelijk method...Java Code:System.out.println(raster[x/50][y/50]);
- 01-12-2010, 10:56 AM #23
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,427
- Blog Entries
- 7
- Rep Power
- 17
- 01-12-2010, 11:00 AM #24
Member
- Join Date
- Nov 2009
- Posts
- 32
- Rep Power
- 0
Alright, it's working,
I get the whole time '0' in the console.
That isn't good...
EDIT:
IF i go to the upper left corner (pixel 0) my program freezes, and I get an outofBoundsEcxeption. (:16)
The 'killer' of my program is the isToegankelijk method...Last edited by TGH; 01-12-2010 at 11:20 AM.
- 01-12-2010, 02:05 PM #25
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,427
- Blog Entries
- 7
- Rep Power
- 17
Please do try to think a bit: your raster has 16 rows so a valid rowindex has the value 0, 1, 2 ... 15; the error message complains about a row index value of 16; does that ring a bell? Since you divide the x coordinate by 50 you have passed in a value of 800 ... 849
kind regards,
Jos
- 01-12-2010, 02:16 PM #26
Member
- Join Date
- Nov 2009
- Posts
- 32
- Rep Power
- 0
I did fixed the problem, but that doesn't solve the problem that my Pacman can still walk through wall's.:confused:
I just made the frame a little bit smaller...
- 01-12-2010, 02:55 PM #27
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,427
- Blog Entries
- 7
- Rep Power
- 17
Similar Threads
-
Implementing "Game Over" in Minesweeper game based on Gridworld framework.
By JFlash in forum New To JavaReplies: 2Last Post: 08-05-2010, 04:49 AM -
Help! Game.
By MIA6 in forum New To JavaReplies: 4Last Post: 11-08-2009, 12:22 AM -
Help with my game!
By Manikyr in forum New To JavaReplies: 6Last Post: 06-06-2009, 11:09 AM -
2D strategy game or 2D war game
By led1433 in forum Java 2DReplies: 5Last Post: 02-10-2009, 06:00 AM -
game
By amith in forum AWT / SwingReplies: 0Last Post: 05-19-2008, 05:16 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks