Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (753)
Games in Android Showcase (228)
games submitted by our members
Games in WIP (842)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Newbie & Debugging Questions / numberFormatException on: 2004-12-31 21:34:51
hi, does anybody know y im getting a numberFormatexception at : " int currentValue = Integer.parseInt(tokenizer.nextToken());"
with this code:

String mapValues[][] = new String[20][20];
                 FileReader mapFileReader = new FileReader("map.txt");
                 BufferedReader mapReader = new BufferedReader(mapFileReader);

                 for (int row = 0; row < 20; row++)
                       String line = mapReader.readLine();
                       StringTokenizer tokenizer = new StringTokenizer(line, " ");
                       for (int col = 0; col < 20; col++)
                             int currentValue = Integer.parseInt(tokenizer.nextToken());
                             mapValues[row][col] = line;
           catch (IOException e){ System.out.println("Error: " + e); }

the number format in the files is like this:


thx in advance !
2  Game Development / Newbie & Debugging Questions / 100% cpu usage on: 2004-12-25 23:37:24
hello, just wanted to know if bad coding will result in high cpu usage.

my game so far generates 100% cpu usage and all i have is a 20 by 20 map in a jscrollPane. it lags whenever it has to do sth...

so is it my code thats causing this or is it sth else?

3  Game Development / Newbie & Debugging Questions / Re: scrolling tiled map on: 2004-12-19 17:10:50
thx for the replies, so far i've made an array of images taht will be drawn onto a buffer then its copied to a jPanel which is on a JScrollPane and when i scroll its reallllllly sloooow...

this map is simiar to civilization, there arent any animation at all just images of terrain. i dont understand why its so sloww

is there sth that im doing wrong?
4  Game Development / Newbie & Debugging Questions / scrolling tiled map on: 2004-12-18 22:43:18
for my final project im thinking of making a 2d tiled map game. i plan to have this map scrollable becuase the game map will be very large.

Do you guys think putting this map on a JPanel and then putting it into a JScrollPane would make this map scoll fast enough?

Also with this map is it nessary to use a buffer?
5  Game Development / Newbie & Debugging Questions / jbutton and mouseEvent question on: 2004-12-14 22:36:14

i want to know if its possible to have  a Jbutton wait for a mouse click before executing its code.

i want to draw sth at the position of the mouse click but only after i press this button...
Pages: [1]
nelsongames (19 views)
2018-04-24 18:15:36

nelsongames (17 views)
2018-04-24 18:14:32

ivj94 (608 views)
2018-03-24 14:47:39

ivj94 (53 views)
2018-03-24 14:46:31

ivj94 (401 views)
2018-03-24 14:43:53

Solater (66 views)
2018-03-17 05:04:08

nelsongames (111 views)
2018-03-05 17:56:34

Gornova (176 views)
2018-03-02 22:15:33

buddyBro (747 views)
2018-02-28 16:59:18

buddyBro (94 views)
2018-02-28 16:45:17
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!