A simple 3D starfield with title and fog in 256 bytes of Javascript
There is also a plain version in 209 bytes
Source code
<body id=B text=snow bgColor=0><script>O=setInterval("m='p01 256b Starfield';c=Math.cos;for(o=0;o<65;)m+='<p style=position:absolute;top:'+(50+(z=399/(73-(++o+O++&63)))*c(o*.9))+'%;left:'+(50+z*c(o))+(z>>4?'%>.':'%;color:#456>.');B.innerHTML=m",9)</script>
256 bytes for the polished version above with title, colors and fog and 209 bytes for the plain version below
<body id=B text=tan bgColor=0><script>setInterval("m='';c=Math.cos;for(u=65;u;)m+='<p style=position:absolute;top:'+(50+(z=399/(9+(--U+u--&63)))*c(u*9))+'%;left:'+(50+z*c(u))+'%>�';B.innerHTML=m",U=9)</script>
The cool tricks were the TOTORO smiley ++o+O++
that increases the zoom ratio and the index of the stars, and the use of Math.cos
with fixed angles per star to give their direction.
Feedback
The feedback for Starfield on pouet was rather nice.
Other recent experiments
There are many experiments and projects like STARFIELD to discover other here.
- FRONTFEST MOSCOW It was an honour to be invited to Fronfest Moscow 2017 with the little family to give my first workshop; implementing a Twin-stick shooter using ES6 and Canvas, and to continue my CODE🎙ART series of talks + live coding aiming to inspire new web developer artists. on November 18th, 2017
- VOLTRA VOLTRA: Grinding the Universe, a gritty JavaScript demo, winner of the 1024 bytes demo competition at the Assembly 2017. on August 6th, 2017
- BREATHING EARTH Another take on Nadieh Bremer mesmerizing Breathing Earth visualisation, running at 60fps on a 2D Canvas without libraries or frameworks. on June 26th, 2017
- 10 PRINT THEREMIN AT WEB REBELS A lighting talk about labyrinth generation and theremin instrument using the Web Audio API in 219 bytes presented at Web Rebels 2016. on June 2nd, 2016
- OOMA 2 Rotozoom with tilt and experimental music in a valid 480bytes Atari bootsector. on May 13th, 2007
- ASAHIKAWA Flyby the city of Asahikawa in 64 bytes. on January 21st, 2007
- OOMA The winning bootsector of Outline 2005, featuring two images zooming with experimental music in a valid 480bytes Atari bootsector. on March 30th, 2005
- COPTER CRUISE A simple Commanche-like that won the 20lines 'Terrain' contest at the OzoneAsylum in July 2004 on July 29th, 2004
Let's talk
Don't be shy; get in touch by mail, twitter, github, linkedin or pouet if you have any questions, feedback, speaking, workshop or performance opportunity.