I've laid the foundation for my simple Board/strategy game and was going to build some simple frames for the board, dices and news. But then, I read somewhere that one should not use swing for this?I don't know why - so I have to ask my fellow gamemakers about their opinions?

If you're writing a complex fast-paced first person shooter with lots of graphical stuff and high frame-per-second requirement then you should consider something else than swing. Swing is well suited for turn-based stuff. It sounds like Swing would be fine for your purposes.

I agree with Ask_Hjorth_larsen. Swing is perfectly fine for turn based/board games. I used it 100% for my game and didn't have any performance issues. The cool thing with swing is, you can define your own look and feel, which makes coding much faster!!!

The *only* issue for swing for these kidsn of games, is that if you want to graduate evetually to action games you will have to relearn how to write code.

I'm not sure that's 100% correct. Java uses the same Java2D system for Swing and games, so the experience can transfer. For example, if you're doing chess it makes sense to create a custom chessboard component rather than try to line up 64 labels on the screen. Especially since the labels are bound to interfere with the placement of pieces on the chessboard. In writing that component, you're forced to work with the Java2D APIs to get the results you need. Ergo, experience that can translate.

Same with events. You need to learn how to handle mouse and keyboard events so that you can properly handle piece dragging and quick shortcuts. Again, more experience.

When the time comes, all you really need to do is learn the full screen and BufferStrategy APIs. From there, the rest is a cakewalk. (With a few gotchas scattered along the way.) Beats the heck out of the MemoryImageSource nonsense that we used to do.

The *only* issue for swing for these kidsn of games, is that if you want to graduate evetually to action games you will have to relearn how to write code.

I'm not sure that's 100% correct. Java uses the same Java2D system for Swing and games, so the experience can transfer.

True but unline Swing you wont be doing it on repaints, you will be doign it in a game loop.

Quote

Same with events. You need to learn how to handle mouse and keyboard events so that you can properly handle piece dragging and quick shortcuts. Again, more experience.

Unless you do it the way most games do and just poll the mouse in the game loop and do all the behavior yourself. This is typical. Triying to mix AWT events with a game loop is much less so. I knwo some pople with rpevious Swing experience go this route but it seems to add all kidsn of needless compelxity.

Quote

When the time comes, all you really need to do is learn the full screen and BufferStrategy APIs. From there, the rest is a cakewalk.\

I really really really disagree. A fast action game is near real-time type codin g. This is **totally** different from event driven programming and programmers who have learned to program event driven IME need to amjorly rework their neurons to get it.

Got a question about Java and game programming? Just new to the Java Game Development Community? Try my FAQ. Its likely you'll learn something!

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