Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (711)
Games in Android Showcase (213)
games submitted by our members
Games in WIP (785)
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 / Re: Issue involving drawing on: 2012-08-10 15:05:49
Thank you again Cheesy

This is for you
2  Game Development / Newbie & Debugging Questions / Re: Issue involving drawing on: 2012-08-10 01:22:13
I now receive an error on compile every 10th or so try, the error and code in question is as follows:


Exception in thread "Thread-3" java.lang.IllegalStateException: Buffers have not been created
   at Source)
   at java.awt.Component$FlipBufferStrategy.getBackBuffer(Unknown Source)
   at java.awt.Component$FlipBufferStrategy.updateInternalBuffers(Unknown Source)
   at java.awt.Component$FlipBufferStrategy.revalidate(Unknown Source)
   at java.awt.Component$FlipBufferStrategy.revalidate(Unknown Source)
   at java.awt.Component$FlipBufferStrategy.getDrawGraphics(Unknown Source)

Code part 1:

   public main()


      createBufferStrategy(2);  <--- These two lines are pointed to some times
      bufferStrategy = getBufferStrategy(); <---


Code part 2:
   private void drawGame(float interpolation)
      gamePanel.draw(); <--- Where the offscreen image is set up and drawn to onscreen
      Graphics g = bufferStrategy.getDrawGraphics(); //<-- being pointed to in this error
      g.drawImage(onScreenImage, 0, 0, null);

3  Game Development / Newbie & Debugging Questions / Re: Issue involving drawing on: 2012-08-02 19:50:31
After a few days of messing with it I finally got my double buffering working and you were indeed right, it was jframes double buffering. Thank you again for you help  Grin
4  Game Development / Newbie & Debugging Questions / Re: Issue involving drawing on: 2012-07-24 07:26:13
Very helpful thank you! I am using a JFrame with an attached JPanel which is being drawn on. I had heard they had their own double buffering so I overlooked that a bit. I will give your suggestion a shot and see if it corrects it when I get home from work. Thanks again Cheesy
5  Game Development / Newbie & Debugging Questions / Issue involving drawing on: 2012-07-24 07:02:29

I have been writing my first large scale game from scratch in Java/JSwing. The game I am making is a 2d overhead tile based game. Each land tile is a uniform size of 20x20 pixels and is redrawn every update as of now. Everything works fine except on a rare occasion where several blocks (always touching each other) seem to fail to draw for one draw cycle. The grey outline of the part-row/column appears and then quickly disappears as it is redrawn on the next draw call.

I cannot easily reproduce this however I notice that it only appears when I spam keyboard and mouse input. Usually once per 10/20 seconds of hammering my left/right click and keyboard will seemingly cause it to come up but really I cannot be sure if this is the cause or just something that exadurates an underling problem. I am using a class which extends keyAdapter and my main class implements ActionListener/MouseListener.

Has anyone heard of something causing this or have any ideas at all? I can post whatever code may be helpful if requested, please just specify which parts you wish to see. Thanks for your time!
Pages: [1]
numerical (198 views)
2017-02-21 07:32:16

numerical (198 views)
2017-02-21 07:31:46

theagentd (308 views)
2017-02-18 13:42:33

theagentd (307 views)
2017-02-18 13:35:16

h.pernpeintner (1473 views)
2017-01-24 22:39:11

h.pernpeintner (1460 views)
2017-01-24 22:38:32

Galdo (2025 views)
2017-01-12 13:44:09

Archive (2058 views)
2017-01-02 05:31:41

0AndrewShepherd0 (2595 views)
2016-12-16 03:58:39

0AndrewShepherd0 (2335 views)
2016-12-15 21:50:57
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 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!