Background images

Hello. I am currently working on a soccer manager game.

I wonder if there's a way i can put a background image to a

component and then add transparent components on top of this.

is there support for such in the java language ?

also, if u have any suggestions for creating a game engine i'd love

to hear from u. i am working on a engine simulating a match.

this engine has to consider each team's tactical dispositions,

each player's skills, form, etc...

thanks.

[521 byte] By [generalsnusa] at [2007-9-28 9:15:54]
# 1

Hey generalsnus,

I am doing my final year project and decided to do a soccer managemant game. However with a week left I still have no idea on how to create the game engine in order to simulate the matches. I have just come accross your post and was wondering did you figure anything out!?

Or anybody else for that matter? I am in desperate need for help as the deadline is May 4th and im only a newbie to the language. Im in way over my head and could do with a few pointers on the match engine.

Thanking you in advance

hilln22a at 2007-7-11 22:12:54 > top of Java-index,Other Topics,Java Game Development...
# 2

[quote]

I am doing my final year project .... <snip>..... However with a week left I still have no idea on how to create the game engine...<snip>...Im in way over my head...<snip>

[/quote]

Indeed you are, I won't say anything else 'cos im sure it'll depress you still further ^_^

Goodluck anyhow :D

Abusea at 2007-7-11 22:12:54 > top of Java-index,Other Topics,Java Game Development...
# 3
cheers mate,thats made my weekend! :pSeriously, anyone with any tips.....
hilln22a at 2007-7-11 22:12:54 > top of Java-index,Other Topics,Java Game Development...
# 4
heres a tip.you should have started it earlier
ptom98a at 2007-7-11 22:12:54 > top of Java-index,Other Topics,Java Game Development...
# 5
a newbie to the language... final year project. That doesn't make much sense. For a "final" project, shouldn't you use what you've learned, and not something you have no knowledge of?
Malohkana at 2007-7-11 22:12:54 > top of Java-index,Other Topics,Java Game Development...
# 6

Subclass your background component and override its public void paint(Graphics g) method to make it paint the background image. Then, I believe you can setOpaque(false) on the other components, or just try drawing them and see what it looks like. Take a look at http://java.sun.com/docs/books/tutorial/uiswing/14painting/index.html and maybe http://java.sun.com/docs/books/tutorial/2d/index.html for more information.

Mateia at 2007-7-11 22:12:54 > top of Java-index,Other Topics,Java Game Development...
# 7
If the image covers the component's whole area, then it could be an idea to subclass update() and replace it's background color fill with the image rendering. (At least this works in AWT, I don't know if you're supposed to do that with swing components, given their pane structure...)
mj_cgea at 2007-7-11 22:12:54 > top of Java-index,Other Topics,Java Game Development...