Order of the Butterfly
Posts: 167 from 2009/11/26
Here is the Eighth example of the next release of PortablE:
Example 8: StarsXY.eThis is the first of several pretty "stars" examples. They are not so much examples of the graphics module as they are examples of general PortablE code, and what can be achieved with a little bit of clever maths.
This example shows stars moving across the screen (in the X/Y plane), with depth parallax, in 87 lines of E code. Although it is fairly well optimised, I have avoided a few obvious optimisations to keep the code clearer.
[ Edited by ChrisH on 2011/3/2 23:43 ]
Author of the
PortablE programming language.
It is pitch black. You are likely to be eaten by a grue...