Skip to main content
gamedev.net
🔒 Locked

[java] Graphic programming in Java

Started by Akujin13 Dec 3, 2002 at 4:08 PM 3 replies 400+ views
Original Post
Akujin13
Akujin13
I''m attempting to create a fire applet, without much luck, and i can''t seem to find any good tutorials online and the local bookstores don''t carry anything that goes over the topic. I have some background in DirectX8 programming, so i understand the basics of the technique, but i don''t understand how to apply it to a Java applet. Can anyone help me out with this, or at least point me to a good tutorial? -Akujin
-Akujin
Kentaro
Kentaro
I''m going to assume you need something a little more advanced than just "how do I make an applet?", so here''s a link to the Java 2D Programmers guide, which documents just about everything about programming graphics in Java. If you can''t find it in here, I don''t know where you''ll find it. =)

http://java.sun.com/products/jdk/1.2/docs/guide/2d/spec/j2d-bookTOC.doc.html

This isn''''t life in the fast lane, it''''s life in the oncoming traffic.
-- Terry Pratchett
Over the centuries, mankind has tried many ways of combating the forces of evil...prayer,fasting, good works and so on. Up until Doom, no one seemed to have thought about thedouble-barrel shotgun. Eat leaden death, demon... -- Terry Pratchett
Akujin13
Akujin13
Indeed, I''m no amature when it comes to Java, so I don''t need to know how to make applets, i just need to know how to apply the special effects techniques for things like 2D water and fire.

I''ll take a look through that guide and see if it gives me what I need. Thanks.

-Akujin
-Akujin
Kentaro
Kentaro
You said in your e-mail you were looking for direct pixel manipulation. Well, there is a class called WritableRaster. It represents a rectangular set of pixels that can be written to. As stated in the Java 2D tutorials I''ve seen, you can create an empty BufferedImage, and it contains a Raster and a ColorModel... from the Raster, there''s a method to create a WritableRaster.......

Perhaps this is what you''ve been looking for?

This isn''''t life in the fast lane, it''''s life in the oncoming traffic.
-- Terry Pratchett
Over the centuries, mankind has tried many ways of combating the forces of evil...prayer,fasting, good works and so on. Up until Doom, no one seemed to have thought about thedouble-barrel shotgun. Eat leaden death, demon... -- Terry Pratchett
Akujin13
Akujin13
I took the time to read through the raster page a while ago actually, and it''s really not what i''m looking for. I simply want to be able to store the data in an array and call from that (rasters don''t provide much support for keeping track of rows of data, which you need for special effects)

I know for fact it can be done without using bufferedimages (besides, i simply want to use a MemoryImageSource to create the image)

-Akujin
-Akujin

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.