Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (535)
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 22: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];
           try
           {
                 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:

11001
00100
11011
11010

thx in advance !
2  Game Development / Newbie & Debugging Questions / 100% cpu usage on: 2004-12-26 00: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 18: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 23: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 23:36:14
hi,

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]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

E.R. Fleming (19 views)
2014-07-29 03:07:13

E.R. Fleming (7 views)
2014-07-29 03:06:25

pw (39 views)
2014-07-24 01:59:36

Riven (39 views)
2014-07-23 21:16:32

Riven (26 views)
2014-07-23 21:07:15

Riven (28 views)
2014-07-23 20:56:16

ctomni231 (59 views)
2014-07-18 06:55:21

Zero Volt (50 views)
2014-07-17 23:47:54

danieldean (42 views)
2014-07-17 23:41:23

MustardPeter (44 views)
2014-07-16 23:30:00
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org 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‑gaming.org
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!