Show Posts
|
|
Pages: [1]
|
|
1
|
Game Development / Game Mechanics / how is a collision event thrown with ode ?
|
on: 2006-12-03 22:14:12
|
|
Hey ! I had a quick look at ODE doc and i wonder if it's possible to know when a moving object will collide and where as soon as possible. In other words : is it possible to predict where and when an object is gonna collide with an other object before it really collides ? Plz answer me !! thanks a lot !!
|
|
|
|
|
6
|
Java Game APIs & Engines / Java 2D / Re: Graphics2D.drawPolygon bug ?
|
on: 2006-11-14 20:11:23
|
ok tx Linuxhippy, but i can't find the jre6  . @CommanderKeith : even if i don't use any AffineTransform it behaves weirdly  . Unless JDK6 fixed bugs with ATI cards & openglPipeline, i will give an OGL binding a try (i don't think i takes so long to refactor java2d into lwjgl  ).
|
|
|
|
|
7
|
Java Game APIs & Engines / Java 2D / Re: Graphics2D.drawPolygon bug ?
|
on: 2006-11-13 20:39:27
|
Chris Campbell Himself  ! For information i use a Nvidia GeForce 6800GT, driver version: 8.4.2.1 I use jdk 5 update 9. About the JDK6, i wonder wether its dedicated JRE (JRE6) exists so people can use my program ? (I'm sorry i'm not very used to java  )
|
|
|
|
|
12
|
Java Game APIs & Engines / Java 2D / Graphics2D.drawPolygon bug ?
|
on: 2006-11-11 14:32:56
|
Hi guys ! I face an unexpected problem  . I simply can't draw properly a polygon thanks to the drawPolygon method ..  1 2 3 4 5
| g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.7f)); g2d.setColor(Color.GREEN); int[] xVertex = {1,36,36,1,1}; int[] yVertex = {1,1,36,36,1}; g2d.drawPolygon(new Polygon(xVertex,yVertex,5)); |
1 2
| g2d.drawImage(myImage,1,1,null); |
There is two problems : 1) The green rectangle should be wrapping the image but it doesnt at all. 2) The pixel in the top-right corner isn't drawn ... I really don't understand, please help me 
|
|
|
|
|
14
|
Java Game APIs & Engines / Java 2D / Re: OpenGL on Windows with a ATI Card
|
on: 2006-08-21 23:00:07
|
oh, i thought opengl pipeline causes crashes with radeon series ! I read that on a lot of forums. I have an application which runs with the opengl pipeline enabled, it works fine for me (i have a nvidia card) and it doesn't work for a friend (he has an ati card). So, i don't understand 
|
|
|
|
|
15
|
Java Game APIs & Engines / Java 2D / openGL pipeline under linux
|
on: 2006-08-21 10:34:31
|
|
Hi all, I'm making a game which is accelerated by the openGL pipeline. I work under win xp and all is fine. Now i wonder what version of openGL i need to run it under linux with openGL pipeline actived too. And if possible, is there also a version for solaris ? Thanks a lot ! Orel
|
|
|
|
|
16
|
Java Game APIs & Engines / Java 2D / Re: rectclip problems
|
on: 2006-06-14 18:49:35
|
 nice answer ! I will give up this idea and make no clip  . (no time enough to try volatileImage now  ) Anyway i think it will work not so bad without clipping. edit : is there an efficient solution to clip images ? Thanx for replying ! 
|
|
|
|
|
17
|
Java Game APIs & Engines / Java 2D / Re: rectclip problems
|
on: 2006-06-12 19:16:38
|
Really thanks for your replies ! 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| public void gameLoop() { int lastLoopTime = (int) System.currentTimeMillis(); fpsCounter=0; int lastFps=0; Graphics2D g = (Graphics2D) strategy.getDrawGraphics(); GradientPaint gradient = new GradientPaint(0, 0, Color.BLUE, screenWidth, screenHeight, Color.RED); g.setPaint(gradient); g.fillRect(0,0,screenWidth,screenHeight) setFastRendering(g); while (gameRunning) { int delta = (int)(System.currentTimeMillis() - lastLoopTime); lastLoopTime = (int) System.currentTimeMillis(); fpsCounter++; g = (Graphics2D) strategy.getDrawGraphics(); g.clipRect(10,80,screenWidth-20,screenHeight-90); g.setColor(Color.black); g.fillRect(10,80,screenWidth-20,screenHeight-90); drawBackground(g);
tank.move(delta); Entity entity = (Entity) entities.get(0); entity.draw(g); lastFps=hud.displayFps(g,delta,lastFps,fpsCounter); g.dispose(); try { Thread.sleep(0); } catch (Exception e) {} strategy.show(); tank.setHorizontalMovement(0); scrollEntities(g,delta); } } |
Here is what i double buffer :-o 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| public Game() { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); gd = ge.getDefaultScreenDevice(); GraphicsConfiguration gc = gd.getDefaultConfiguration(); BufferCapabilities bufCap = gc.getBufferCapabilities(); boolean page = bufCap.isPageFlipping(); Frame container = new Frame(gd.getDefaultConfiguration()); win = new Window(container); gd.setFullScreenWindow(win); win.setIgnoreRepaint(true); container.pack(); container.setResizable(false); container.setVisible(true); container.setIgnoreRepaint(true); container.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); container.addKeyListener(new KeyInputHandler()); win.addMouseListener(new MouseInputHandler()); win.createBufferStrategy(2); strategy = win.getBufferStrategy(); container.requestFocus(); hud = new HUD(); cursorChanger = new CursorChanger(); cursorChanger.setCursor("default"); iniBackground(); startGame(); gameLoop(); } |
|
|
|
|
|
18
|
Java Game APIs & Engines / Java 2D / Re: rectclip problems
|
on: 2006-06-11 17:30:18
|
seems you understood. I tryed what u said : when i initiate the whole screen, i draw around the future scrolling area (a gradient) then i set the clip area to the scrolling area. But the surrounding area flickers ! It shouldn't be redrawn :-o ! Dunno wether it's a good idea to give my code cause it's not very short  anyway thank you for your help.
|
|
|
|
|
20
|
Java Game APIs & Engines / Java 2D / rectclip problems
|
on: 2006-06-10 23:53:40
|
Hello, i made a scrolling area for a tile background. That area is included in a certain rectangle. I set that rectangle as a clip region, so when the scrolling area is scrolled, only that rectangle is redrawn. But now i wonder how i could draw something around that clip region. Thanx for help 
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|