Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (495)
Games in Android Showcase (114)
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  Game Development / Game Mechanics / how is a collision event thrown with ode ? on: 2006-12-03 21: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 !!
2  Java Game APIs & Engines / OpenGL Development / Re: draw image in 2d context on: 2006-11-18 12:07:43
I started to render thanks to Slick in my java2d game, i will publy steps i followed to do it so newbies like me won't waste time to figure out how it works  Wink
3  Java Game APIs & Engines / OpenGL Development / Re: draw image in 2d context on: 2006-11-18 09:28:15
Oh my god ! Exactly what i need  Shocked !
Yeah and guys give WS demo of Virium a try !
It will be shown "Slick powered" on the main page of my game  Grin
Thank you very much Matzon !
4  Java Game APIs & Engines / OpenGL Development / draw image in 2d context on: 2006-11-17 22:01:36
Hi guys,
I wonder if it's hard to display an image thanks to lwjgl for a 2d game.
In fact i only need that.
What would be great :  drawImage(Awt.Image myImage,float x,float y,int alpha)
Please  Embarrassed
5  Java Game APIs & Engines / Java 2D / Re: Graphics2D.drawPolygon bug ? on: 2006-11-15 18:11:32
Quote
shitty ati opengl drivers aren't for sun to fix
LOL Grin
Yeah i meant that Sun may have pushed ATI to fix their latest drivers.
6  Java Game APIs & Engines / Java 2D / Re: Graphics2D.drawPolygon bug ? on: 2006-11-14 19:11:23
ok tx Linuxhippy, but i can't find the jre6  Undecided.
@CommanderKeith : even if i don't use any AffineTransform it behaves weirdly  Huh.

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  Roll Eyes).
7  Java Game APIs & Engines / Java 2D / Re: Graphics2D.drawPolygon bug ? on: 2006-11-13 19:39:27
Chris Campbell Himself  Tongue !
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  Embarrassed )
8  Java Game APIs & Engines / Java 2D / Re: Graphics2D.drawPolygon bug ? on: 2006-11-12 14:42:42
... Well, i found the guilty thing ===> the openGL is responsible of these bugs.

Seems i need to leave that buggy thing alone now (what a shame it speeds up consequently my game).

 Undecided
9  Java Game APIs & Engines / Java 2D / Re: Updated Java2D Tutorial on: 2006-11-12 00:48:50
Advanced Text Display  yay
10  Java Game APIs & Engines / Java 2D / Re: Graphics2D.drawPolygon bug ? on: 2006-11-12 00:37:59
Tx to reply Dmitri.
I tryed drawRect and i get the same result  Shocked.
Do you know what operation can lead to this ?  Cry
11  Java Game APIs & Engines / Java 2D / Re: Java 2D FAQ on: 2006-11-11 21:04:41
http://www.cs.umd.edu/hcil/agile2d/     Shocked
12  Java Game APIs & Engines / Java 2D / Graphics2D.drawPolygon bug ? on: 2006-11-11 13:32:56
Hi guys !
I face an unexpected problem  Shocked . 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  
//35X35 image
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  Huh
13  Java Game APIs & Engines / Java 2D / Re: OpenGL on Windows with a ATI Card on: 2006-09-09 21:27:30
with more feedbacks about that problem ati will do something about that  Huh
14  Java Game APIs & Engines / Java 2D / Re: OpenGL on Windows with a ATI Card on: 2006-08-21 21: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  Sad
15  Java Game APIs & Engines / Java 2D / openGL pipeline under linux on: 2006-08-21 08: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 16:49:35
 Roll Eyes nice answer !
I will give up this idea and make no clip  Undecided . (no time enough to try volatileImage now  Roll Eyes)
Anyway i think it will work not so bad without clipping.

edit :  is there an efficient solution to clip images ?

Thanx for replying ! Cool
17  Java Game APIs & Engines / Java 2D / Re: rectclip problems on: 2006-06-12 17: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();
       /////////////////////////////////////THIS IS THE FLICKERING REPAINTING OUTSIDE CLIPREGION////////////////////////////
       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);
         
         //TilesEntities moves
       
         //Background
        drawBackground(g);

         // collisions
       
         //Entities moves
        tank.move(delta);
         
         // drawing
       
         Entity entity = (Entity) entities.get(0);  
         entity.draw(g);
         lastFps=hud.displayFps(g,delta,lastFps,fpsCounter);
         // remove any entity that has been marked for clear up
       
         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()
   {
      // Determine if page flipping is supported
      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 15: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  Undecided

anyway thank you for your help.
19  Java Game APIs & Engines / Java 2D / Re: rectclip problems on: 2006-06-11 09:49:03
I guess my topic is stupid again  Huh
20  Java Game APIs & Engines / Java 2D / rectclip problems on: 2006-06-10 21: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  Tongue
21  Java Game APIs & Engines / JOGL Development / Re: updated source for Space Invaders? on: 2006-06-10 09:22:14
yeah, same here,...I sent him an email : waiting for an answer.
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.

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

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

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

Tekkerue (37 views)
2014-09-09 02:24:56

mitcheeb (57 views)
2014-09-08 06:06:29

BurntPizza (43 views)
2014-09-07 01:13:42

Longarmx (27 views)
2014-09-07 01:12:14

Longarmx (34 views)
2014-09-07 01:11:22

Longarmx (34 views)
2014-09-07 01:10:19

mitcheeb (40 views)
2014-09-04 23:08:59
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!