Results 1 to 8 of 8
  1. #1
    xsimsyx is offline Member
    Join Date
    Mar 2010
    Posts
    6
    Rep Power
    0

    Default Double buffering basics for 2d game images

    Hi,Im currently working on a best seller,storyboards awesome and simple to program 2d game.Ive posted the code which with a little imagination could lead to some decent games.
    I have a scrolling 2d image background around a 2d image with a 2d border.
    The problem is the flicker.I have tried the tutorials for 48 hours solid which revolve around a rectangle and draw object, not a image which has led me to forum advice.The size of the background could slow the game down but I can break that into smaller pieces when I have the correct solution for removing the flicker.
    Attached Thumbnails Attached Thumbnails Double buffering basics for 2d game images-bg1t1t4.jpg   Double buffering basics for 2d game images-player1color10.png   Double buffering basics for 2d game images-border2.png  
    Last edited by xsimsyx; 10-08-2011 at 03:53 PM. Reason: Monopoly

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: Double buffering basics for 2d game images

    Do this in Swing instead of AWT and you can take advantage of Swing's default double buffering. To do this, do your drawing in a JPanel's paintComponent method, and then display the JPanel in a JApplet's contentPane. Also, you'll not want to use an update method and use a Swing Timer for your animation. There are examples of this sort of thing in this forum if you search it.

  3. #3
    xsimsyx is offline Member
    Join Date
    Mar 2010
    Posts
    6
    Rep Power
    0

    Default Re: Double buffering basics for 2d game images

    Hi,Ive been looking through the swing tutorials as you mentioned and there seems to be a general problem,only a handful of varieties can understand the swing process.The discussion board is for new Java developers,why would the mods point new Java developers to the swing code when the Applet process is much simpler than the JApplet.If the Java developers have become corrupt like the C developers then be kind enough to say so and not point real games programmers down the toilet of whatever the Swing code is.Why not face the corruption instead of bowing to it and improve the applet games programming process.

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,369
    Blog Entries
    7
    Rep Power
    20

    Default Re: Double buffering basics for 2d game images

    Sorry, this is the 'cursing and abuse' section; if you want the 'argument' section, that's down the hall, third door on your left, thank you.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    xsimsyx is offline Member
    Join Date
    Mar 2010
    Posts
    6
    Rep Power
    0

    Default Re: Double buffering basics for 2d game images

    Some would call it honesty,being the best policy,unlike your bartholomew rd vid and ur slide enjoyment.Was it the word corrupt that made you become aggressive...yawn..still stuck in the 80`s huh...whatever happened to the good old days of the spectrum!

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,369
    Blog Entries
    7
    Rep Power
    20

    Default Re: Double buffering basics for 2d game images

    Quote Originally Posted by xsimsyx View Post
    Some would call it honesty,being the best policy,unlike your bartholomew rd vid and ur slide enjoyment.Was it the word corrupt that made you become aggressive...yawn..still stuck in the 80`s huh...whatever happened to the good old days of the spectrum!
    Fubarable gave you solid and sound advice and you shouldn't ignore it. You are on my ignore list and if you aren't careful your attitude causes you to be banned; permanently.

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  7. #7
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: Double buffering basics for 2d game images

    Quote Originally Posted by xsimsyx View Post
    ...there seems to be a general problem,only a handful of varieties can understand the swing process.
    Please clarify because I don't understand your statement above.


    The discussion board is for new Java developers,why would the mods point new Java developers to the swing code when the Applet process is much simpler than the JApplet.
    Applet code uses the AWT or Abstract Window Toolkit library, a library written in 1995 as part of Java 1.1. This was largely superceded by Swing in Java 1.2, a library that is much more robust, flexible and powerful, that allows separation of model from view which allows for much better scalability and code reuse.

    If the Java developers have become corrupt like the C developers then be kind enough to say so and not point real games programmers down the toilet of whatever the Swing code is.Why not face the corruption instead of bowing to it and improve the applet games programming process.
    Rather than provide useless and pointless rants, please point out specifically how and why you think Swing is deficient, and we can have perhaps an intelligent discussion.

  8. #8
    jammas615 is offline Senior Member
    Join Date
    Jul 2011
    Location
    Melbourne, Victoria, Australia
    Posts
    155
    Rep Power
    4

Similar Threads

  1. Double Buffering
    By Macpwnage in forum Java 2D
    Replies: 8
    Last Post: 07-18-2011, 09:17 PM
  2. Help with double Buffering
    By Kyle227 in forum AWT / Swing
    Replies: 1
    Last Post: 10-26-2010, 09:08 PM
  3. Double Buffering an Application?
    By Moncleared in forum New To Java
    Replies: 8
    Last Post: 09-14-2009, 04:45 AM
  4. Double Buffering
    By dunff2k in forum SWT / JFace
    Replies: 1
    Last Post: 11-14-2008, 03:26 PM
  5. Double Buffering problem
    By aprenz in forum Java Applets
    Replies: 0
    Last Post: 05-28-2008, 04:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •