java 2d + image rendering

G

gangdv

I was just wondering if anyone can help me with a little hobby project
I have. I am trying to basically simulate conway's game of life,
except that I allow the creatures to move without the need of a grid
(making quite complicated). But since I want this to seem pretty cool,
I was wondering if anyone can help me with my main problem, which is
using images to represent the creatures. I know enough java 2d code to
create a basic blank window and change the background color, and also
how to draw various shapes. I also know a little about translations,
but I was just wondering if anyone could give some code that does
something basic with an image, such as loading it and rotating it?
Thanks!

-gangdv
 
K

Knute Johnson

I was just wondering if anyone can help me with a little hobby project
I have. I am trying to basically simulate conway's game of life,
except that I allow the creatures to move without the need of a grid
(making quite complicated). But since I want this to seem pretty cool,
I was wondering if anyone can help me with my main problem, which is
using images to represent the creatures. I know enough java 2d code to
create a basic blank window and change the background color, and also
how to draw various shapes. I also know a little about translations,
but I was just wondering if anyone could give some code that does
something basic with an image, such as loading it and rotating it?
Thanks!

-gangdv

Look at ImageIO.read() for loading images from file or URL and use
Graphics2D.rotate() to draw your images rotated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,816
Latest member
nipsseyhussle

Latest Threads

Top