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 (534)
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  Java Game APIs & Engines / OpenGL Development / Re: 2D Tile problems, any ideas? on: 2005-10-18 15:10:20

Enable vsync? Hmm, is that possible in windowed mode? And how do I do it? (Sorry for the stupid questions, but im learning.)
2  Java Game APIs & Engines / OpenGL Development / Re: 2D Tile problems, any ideas? on: 2005-10-18 02:05:47
 First problem solved! Gah, spent 3 hours on the web looking for it, posted here, 10 minutes later, found solution.

Solution: load the textures as this:
GL11.glTexParameteri(target, GL11.GL_TEXTURE_MIN_FILTER,GL11.GL_NEAR);
GL11.glTexParameteri(target, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAR);

However  the second problem is still there!
This "flikering" when the player sprite is moving sideways, and the game is scrolling fast.
3  Java Game APIs & Engines / OpenGL Development / 2D Tile problems, any ideas? on: 2005-10-18 00:59:38
I have a 2D engine (ortho mode and frustrum, does not matter) which tiles the screen with 32x32tiles, stored  in 256x256 tileMap.
When the tiles are drawn, (this is a fast side scroller) the gap betwen the tiles can be seen,  (fugly). The background is bright, tiles dark.

Also, the view is centred on the character, and when the character moves fast in one or other direction, (same sprite) I get this wierd
vertical scanline effect, depending on the speed of the charecter, the "scanlines" can be describes as fast moving highlighting lines. Or flicker.
Any ideas why this happens?

Every sprite is a quad. 
THis is the  GL init:
//Go into orthographic projection mode
            GLU.gluOrtho2D(0.0f, (float)GAMEWIDTH, 0.0f, (float)GAMEHEIGHT);
            GL11.glViewport(0, 0, GAMEWIDTH,GAMEHEIGHT);
            //enable textures since we're going to use these for our sprites
            //disable the OpenGL depth test since we're rendering 2D graphics
            //Enable blending for OpenGL
            GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);

4  Java Game APIs & Engines / Java 2D / Re: Best possible FPS achieved? on: 2005-10-11 13:13:59
Thanks for the fast reply.   Smiley
5  Java Game APIs & Engines / Java 2D / Re: Best possible FPS achieved? on: 2005-10-11 11:21:49
So it all comes down to Using LWJGL ...   Undecided
But then I loose Applets. Hmm, its a hard descision.

How portable is LWJGL in practise?
6  Java Game APIs & Engines / Java 2D / Best possible FPS achieved? on: 2005-10-11 01:32:16
Im quite new to JavaGaming, but I made a demo to test the performance om my p4, 3GHz, radeon card machine.

I get around 60 FPS in 800x600 fullscreen and window modes.
With 1000 blits from the same BufferImage. (32x32 pixels Bitmask).
With 750 blits, I get 80 FPS.

My question is this the best I can expect from Java2D or is there something else I forgot?
I use BufferStrategy, 2 buffers for window and 3 for the fullscreen mode.

And a second question, what is the best way to implement a simple particle engine for
game explosions and smoke. Small sprites or colored pixels? And can I use transparency with
colored pixels and still retain the hardware acceleration?

Thanks in advance.

I use this code to load images:
URL url = getClass().getResource("../../"+fileName);
BufferedImage tempImage =;
BufferedImage image = GameFrame.gc.createCompatibleImage(tempImage.getHeight(),tempImage.getWidth(),BufferedImage.BITMASK);
Graphics g = image.getGraphics();

This is the output of  "-Dsun.java2d.trace=count"
677 calls to"Integer RGB DirectDraw", SrcNoEa, "Integer RGB DirectDraw")
1 call to$DelegateBlitBgLoop::BlitBg(Any, SrcNoEa, "Integer RGB DirectDraw with 1 bit transp")
1 call to sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
1 call to sun.java2d.loops.OpaqueCopyAnyToArgb::Blit(Any, SrcNoEa, IntArgb)
1015840 calls to"Integer RGB DirectDraw with 1 bit transp", SrcOverNoEa, "Integer RGB DirectDraw")
680 calls to DDFillRect
1 call to sun.java2d.loops.MaskBlit::MaskBlit(IntArgb, AnyAlpha, IntArgbBm)
1 call to sun.java2d.loops.MaskBlit$General::MaskBlit(Any, SrcOverNoEa, IntArgbBm)
1 call to sun.java2d.loops.Blit$GeneralMaskBlit::Blit(Any, SrcOverNoEa, IntArgbBm)
1 call to sun.java2d.loops.SetFillRectANY::FillRect(AnyColor, SrcNoEa, Any)
2 calls to sun.java2d.loops.Blit::Blit(IntArgbBm, SrcOverNoEa, IntRgb)
2034 calls to sun.java2d.loops.DrawGlyphList::DrawGlyphList(OpaqueColor, SrcNoEa, AnyInt)
1019240 total calls to 12 different primitives
7  Java Game APIs & Engines / Java 2D / Re: Best way for particles? on: 2004-11-12 05:59:10
Awsome code!
And I was killing my self how to create a list
for particles that does reuse objects. =)

Ill add an "active" static member to so I know which particles to draw.
8  Java Game APIs & Engines / Java 2D / Best way for particles? on: 2004-11-11 20:30:29
Im implementing an experimental verson of CRobots in java, my own style (yes i know there is a JRobots  Roll Eyes ) Well I need a particle engine, in working in Java2D 1.5. Is the best way to use small images? or pixels? How do
I avoid creating new objects on the heap?
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.

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

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

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

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

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

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

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

MustardPeter (43 views)
2014-07-16 23:30:00

Cero (59 views)
2014-07-16 00:42:17

Riven (56 views)
2014-07-14 18:02:53
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 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!