This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

Kim2Yul
Kim2Yul presents ...

2012/9/28

3D ROOM (2nd)

-added some objects
-less ambient light, more specular light
-smaller screen
-faster, I think (still slow but)

-source code published

2879 views / 11 in the last 7 days

9 votes | 0 in the last 7 days

Tags: simulation physics demo with-source

Your browser does not support the canvas tag.
Game/maniacGame/maniac

2012/10/14

I can't tell the speed difference it runs just as smoothly as it did on the other one
SPowerSPower

2012/10/15

I've looked in the code, and saw your PI variable where you enter a enormous number of decimals. That is useless, since it can't be stored in a double. If you really feel like needing much decimals, take a look at the BigDecimal class in Java.
DutaDuta

2012/10/15

(First time on Greenfoot in months and months and months!) I haven't looked over the source code, but from what SPower said I'm assuming you're storing a value for pi. You can actually just use Math.PI :) http://docs.oracle.com/javase/6/docs/api/java/lang/Math.html#PI
A new version of this scenario was uploaded on Tue Oct 16 11:18:21 UTC 2012 -deleted all the unnecessaries -added 'Sphere' class -therefore added a yellow ball -not interesting anymore......
Kim2YulKim2Yul

2012/10/16

@SPower Thanks :) but I haven't checked the comments for this time... I should improve more things including pi problem next time!
Kim2YulKim2Yul

2012/10/16

Oh nooooo.... I forgot publishing source code
SPowerSPower

2012/10/16

It runs faster now! And I like it you actually use proper z-buffering checking the distance for each pixel.
SPowerSPower

2012/10/16

And do you wanna put the source back up?
SpilliSpilli

2012/10/25

Wow, considerable speed difference between this and your last. Good job.
SPowerSPower

2012/11/10

To make it even faster, what you could do is what all games of today do: draw on a smaller image and scale that up. Maybe the result is very bad, but you can always try and not post it if it's bad :)

See all comments

Want to leave a comment? You must first log in.

Who likes this?

birdy solokeh Spilli Game/maniac MatheMagician rhddpcks CrazyGamer1122 Chirabupu SPower