Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (115)
games submitted by our members
Games in WIP (563)
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  Discussions / General Discussions / Re: Eclipse vs. Netbeans on: 2011-04-07 19:56:50
Check both of it then choose.

I choosed Netbeans because I loved it much better for the first sight...
2  Game Development / Newbie & Debugging Questions / Re: Is java a good language to make 8-bit games? on: 2011-04-07 19:51:24
Java is ok... Check Minecraft if you want to see some java 8bit games. Smiley
3  Game Development / Newbie & Debugging Questions / Re: What might make Graphics2D.drawImage() slow? on: 2011-04-05 19:48:05
Well thanks a lot, this is usefull.
4  Game Development / Newbie & Debugging Questions / Re: What might make Graphics2D.drawImage() slow? on: 2011-04-05 15:34:29
Thanks for your answer.

I found that if the BufferStrategy's content lost before the first draw, this will happen. I did this to fix it:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
            //If at the first run the mainFrm.getBufferStrategy().contentsLost()
           //returns true then the CPU usage of the program will jump up to 50%
           //this doesn't happens on every PC and it must be a JRE Bug.
           //We just do a lame fix here, but I don't have any other idea.
           if (mainFrm.getBufferStrategy().contentsLost() && isFirstBufferCheck) {
                mainFrm.getBufferStrategy().dispose();
                mainFrm.createBufferStrategy(2);
            }

            if (isFirstBufferCheck) {
                isFirstBufferCheck = false;
            }


This really sucks, but I can't do any better right now.
5  Game Development / Newbie & Debugging Questions / Re: What might make Graphics2D.drawImage() slow? on: 2011-03-31 13:31:21
Hy guys!

I have this problem as well. :S

I try to draw a part of an image using this code:

1  
g.drawImage(Main.getImageCache().getImage("tileset_" + Main.getMapManager().getMapData().getTileset()), xPos, yPos, xPos + 64, yPos + 32, tileXOffset(firstTileImg), tileYOffset(firstTileImg), tileXOffset(firstTileImg) + 64, tileYOffset(firstTileImg) + 32, null);


The image is a VolatileImage. It draws the image good, it's too slow, using 50% CPU all the time while drawing 60-70 images.

EDIT: Sometimes it's using 0-5% CPU, sometimes using 50%. I profiled it when it using 50%, and I figured that the drawn method makes it that bad.

I create the VolatileImage as a TRANSCULENT image.

Anyone can help pls?

(I know I'm begging for help in my first post, but I'll be online. I love this site.)

EDIT2:

Guys I tired to profile again, here is the result:

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.

radar3301 (12 views)
2014-09-21 23:33:17

BurntPizza (29 views)
2014-09-21 02:42:18

BurntPizza (19 views)
2014-09-21 01:30:30

moogie (20 views)
2014-09-21 00:26:15

UprightPath (27 views)
2014-09-20 20:14:06

BurntPizza (31 views)
2014-09-19 03:14:18

Dwinin (48 views)
2014-09-12 09:08:26

Norakomi (74 views)
2014-09-10 13:57:51

TehJavaDev (102 views)
2014-09-10 06:39:09

Tekkerue (50 views)
2014-09-09 02:24:56
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!