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

Report as inappropriate.

solokeh
solokeh presents ...

2012/11/17

Parallax

a simple optical illusion effect, It has some very simple code, which you may use, I have found this very handy, I used paint.net to make the star textures, and I would advise you to get it or another texture making program, they are essential to making your own games.

3804 views / 973 in the last 7 days

2 votes | 0 in the last 7 days

Tags: science, parallax, space, 3d, illusion, star, vacuum, optical, stars, black,

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

2012/11/17

yes, if you are speaking of the "hold space to boost" thing. if you wish to look at the code, simply open it in Greenfoot.
solokehsolokeh

2012/11/17

I also used a random respawn algorithm to give the illusion of seeing unique stars every cycle.
solokehsolokeh

2012/11/17

they respawn 100 pixels offscreen to the right.
solokehsolokeh

2012/11/17

I 'm a complete N00b, as you probably have already deduced, so if what I say sounds like N00b-speak, it is.
SpilliSpilli

2012/11/17

I just has a quick look in the code. Why are you initializing each and every star in a new line when you could just use a simple loop?
solokehsolokeh

2012/11/17

I just started coding a few months ago, so I don't know what a simple loop is, should I?
SpilliSpilli

2012/11/17

I'll quickly re-make this and I'll add the code just for you so you can learn from it :)
solokehsolokeh

2012/11/17

Ok.
solokehsolokeh

2012/11/17

Thanks.
SpilliSpilli

2012/11/17

http://www.greenfoot.org/scenarios/6700 Best of luck, feel free to ask ANY questions.

See all comments

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

Who likes this?

Poli Game/maniac