3 Attachment(s)
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.
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.
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.
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
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!
Re: Double buffering basics for 2d game images
Quote:
Originally Posted by
xsimsyx
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
Re: Double buffering basics for 2d game images
Quote:
Originally Posted by
xsimsyx
...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.
Quote:
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.
Quote:
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.
Re: Double buffering basics for 2d game images