Hi everybody, I programmed for the first time a little 3d application.
I just draw the stuff on a bufferedImage and show it on a JPanel…
I use polygons of 4 coordninates.
My result for drawing time is 1ms per 1000 polygons… 58 ms per 50 000 polygons.
What I implemented so far:
-drawing 3d-objects
-sorting the objects so that the objects are going to be drawn in the correct order
-calculating shadow
-hiding polygons which are not showing their front
If you are interested, download the jar file:
http://www.java-gaming.org/user-generated-content/members/243187/citydream.jar
(you can directly execute the jar file when downloaded)
code:
http://www.java-gaming.org/user-generated-content/members/243187/src.jar
(replace jar with zip, unzip, open)
image:
Yes I know that there is very little drawing bug, but it’s barely visible…
What’s your drawing time??