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

Report as inappropriate.

sp33dy
sp33dy presents ...

2012/1/24

3D Starfield

A simple demonstration of a 3d starfield in the world background image. Will improve the demo with improved visuals. CODE to be provided in the next few days.

Press 'Up' to accelerate
Press 'Down' to decellerate
Press 'F' to toggle between flashing and white stars

Simple demo, will annotate code soon (if required). This is the start of some simple 3d styled games/demos.

Please note this is generating a pseudo 3d environment, i.e. the calculations to plot the stars is not using matrix's, to keep it simple and to reduce processing requirements. This code could be significantly improved on too, but I've tried to make the code readable for people to learn from.

8633 views / 8 in the last 7 days

9 votes | 0 in the last 7 days

Tags: demo with-source animation 3d starfield background stars perspective

open in greenfoot
Your browser does not support the canvas tag.
MeezyMeezy

2012/1/25

not bad at all :p
A new version of this scenario was uploaded on Wed Jan 25 10:18:17 UTC 2012 I've just spaced this out a little more to make it look cleaner. Before issuing code, I'm going to add 'controls' to the flight. I'll also have an option for changing the star objects through a few different effects.
edseds

2012/1/25

Reminds me of an ancient screen-saver. Still cool though :))
A new version of this scenario was uploaded on Thu Jan 26 09:43:43 UTC 2012 Updated to include foward (Up) and backward (Down) velocity. I've also added a warp effect for when Velocity is over 1.5 units. I've not annotated the code yet, but felt happy to share the code. As always, please shout if you would like me to do something extra with this. Do also let me know if you reuse (more than welcome to)..
A new version of this scenario was uploaded on Thu Jan 26 09:57:42 UTC 2012
A new version of this scenario was uploaded on Thu Jan 26 21:06:58 UTC 2012
HermanHerman

2012/1/27

Once I was triggered by the Windows-95-starfield-screen-saver to make my own. However your 3D Starfield beats mine. I like it :--)))
A new version of this scenario was uploaded on Sun Oct 07 19:31:24 UTC 2012 Thought I'd add a background.
A new version of this scenario was uploaded on Sun Oct 07 19:31:59 UTC 2012

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

Who likes this?

solokeh Game/maniac thegreencoolerman EBREEZE Busch2207 stufnum Akuhano Herman eds