Results 1 to 6 of 6
- 08-07-2011, 04:59 PM #1
Java Different Layers, Need Help For My Game Loaie.
My game is basicly just a giant grid. Wich reminds you of Dwarf Fortress adventure mode. The game will soon go into the Alpha 1.0 & be released. So I need some help to give the characters & mobs in the game a nice transparent background.
So as I said before. The game is basicly just a giant grid. On this grid you can walk around with your character. But in order to see what's behind the character & add mobs (Monsters & Animals) I will need to add a layer over this one.
The game is created with JPanels. Each one of those JPanels is holding a JLabel wich is holding an image.
What I want is another layer, over the first one. Wich is containing exactly the same things as the first layer, except of that the images will have a transparent background.
For an example of how I mean, visit Legends of Yore, and see how the bag works. It's basicly over the grid. Thanks!
Best Regards Alerhau
P.S. The help you guys have been giving me so far on all of my projects is awsome!
- 08-07-2011, 05:14 PM #2Senior Member
- Join Date
- Jul 2009
- Rep Power
I don't know anything about those games, but if you want multiple layers then you can use a JLayeredPane.
See: How to Use Layered Panes (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)
- 08-07-2011, 06:35 PM #3
Any more help?
Last edited by Fubarable; 08-07-2011 at 06:41 PM.
- 08-07-2011, 06:45 PM #5
I need a five row example. (That's all.) Sience I am not very good at understanding that kind of tutorial.
Best of luck.
- By jeata in forum New To JavaReplies: 1Last Post: 08-02-2011, 01:34 PM
- By Warmonger in forum AWT / SwingReplies: 12Last Post: 06-07-2011, 10:56 PM
- By trishtren in forum Java 2DReplies: 1Last Post: 04-07-2011, 08:08 PM
- By dvreed77 in forum AWT / SwingReplies: 1Last Post: 02-17-2011, 04:42 PM
- By Jon_Xel in forum AWT / SwingReplies: 10Last Post: 07-13-2010, 05:37 AM