dwitter.net | zola (2569)

+ New dweet
function u(t) {
} //
122/140


Please log in (or register) to post a dweet (copy-paste the code somewhere safe to save it meanwhile)


u(t) is called 60 times per second. t: Elapsed time in seconds. S: Shorthand for Math.sin. C: Shorthand for Math.cos. T: Shorthand for Math.tan. R: Function that generates rgba-strings, usage ex.: R(255, 255, 255, 0.5) c: A 1920x1080 canvas. x: A 2D context for that canvas.
Try the new frontend: beta.dwitter.net
Current theme challenge: #ScaryMovies
show FPS hide FPS share fullscreen

function u(t) {

}//
140/140


Please log in (or register) to post as a new dweet (copy-paste code somewhere safe to save it meanwhile).

  • Windy Tree 🌳💨

Please log in (or register) to comment.

show FPS hide FPS share 1 remix fullscreen
remix of d/28051 by u/tomxor

function u(t) {

}//
140/140


Please log in (or register) to post as a new dweet (copy-paste code somewhere safe to save it meanwhile).

  • Pseudo Global Illumination
  • Show more comments…
  • u/cantelope
    wat
  • u/jdspugh
    Stunning
  • u/ugurkilci
    I'm not understand! 𩡯𬠨𭰽𨰮𭱩𩁴𪀦👩🐱𜀳𝠸𞱩𞱔🐨𜠪𦀦𦠩𙐷🀳𙡙𚡙🀲🱒𛑔🱔𚰮𜀵𞡒𚰽𛠰𝐺𤠡👔🱒𙠽𮀮𩡩𫁬𤡥𨱴𚀭𛑩𙑷𛁩🠾𝰬𜐭𝁥𝐯𚁘𚱙𚰱𞀩𚠪𝐬𜐫𭐥𝠯𝠯𤠩𞠨𭐽𦐼𛠳🱙𚡙𧠲𞡙🀮𝠿𝐺𭰫𦀪𞑞𦐪𝑞𦠪𞐬𥀫𛠱𚐩𦀽𪐥𭰯𝠴𚡒𛑔𛁙👩𛰴𩐳𚡒𛑔𛁚👴𚠳𚱔 How? Your have unicode generator?
  • u/majorh5
    You can use https://beta.dwitter.net for compressing your code to get it even smaller.

Please log in (or register) to comment.

show FPS hide FPS share 1 remix fullscreen

function u(t) {

}//
138/140


Please log in (or register) to post as a new dweet (copy-paste code somewhere safe to save it meanwhile).

  • Golfed fire suggestion by u/deobfuscate using a single x.fillStyle instead of separate ones for the black background and colored pixels.

Please log in (or register) to comment.

show FPS hide FPS share fullscreen

function u(t) {

}//
139/140


Please log in (or register) to post as a new dweet (copy-paste code somewhere safe to save it meanwhile).

  • Bipedal Robot Run

Please log in (or register) to comment.

show FPS hide FPS share fullscreen

function u(t) {

}//
140/140


Please log in (or register) to post as a new dweet (copy-paste code somewhere safe to save it meanwhile).

  • Walking Stickman
  • u/zola
    I wish I could have made it higher resolution.

Please log in (or register) to comment.

show FPS hide FPS share fullscreen

function u(t) {

}//
140/140


Please log in (or register) to post as a new dweet (copy-paste code somewhere safe to save it meanwhile).

  • M3DCotGLB
  • u/joeytwiddle
    Minor refinement: Larger resolution so the dots are less noisy; linear index rather than sqrted.
  • u/deobfuscate
    Now its ten times easier to see that its a meditating buddha.
  • u/Odog8
    Holy crap
  • u/Xen
    madness!

Please log in (or register) to comment.

show FPS hide FPS share fullscreen

function u(t) {

}//
140/140


Please log in (or register) to post as a new dweet (copy-paste code somewhere safe to save it meanwhile).

  • u/deobfuscate
    I know this could be improved. Really cool idea and it shouldnt go to waste here!

Please log in (or register) to comment.

show FPS hide FPS share fullscreen

function u(t) {

}//
136/140


Please log in (or register) to post as a new dweet (copy-paste code somewhere safe to save it meanwhile).

Please log in (or register) to comment.

show FPS hide FPS share fullscreen

function u(t) {

}//
132/140


Please log in (or register) to post as a new dweet (copy-paste code somewhere safe to save it meanwhile).

  • u/cantelope
    my new fav game haha. got to lvl 11. bookmarked!
  • u/Joachim
    Thank you! Keep going, you’re nearly there! ;)

Please log in (or register) to comment.

show FPS hide FPS share fullscreen

function u(t) {

}//
132/140


Please log in (or register) to post as a new dweet (copy-paste code somewhere safe to save it meanwhile).

  • Infinite hopscotch
  • u/Odog8
    Thats nuts
  • u/Joachim
    This 3D-like technique is useful for making single-direction ground textures. This is roughly how it works: A rectangle with a height of ~1px is drawn for every row of pixels on the screen. The width of every rectangle depends on how far down it is (their index). The x position of every rectangle is defined by this bit of code: T(z^z/i+t*9). This is then multiplied by their index to achieve a 3D look, as everything gets bigger & faster near the bottom of the screen. Without the animation or colours, the entire thing can get as small as 64 char: for(i=z=c.width=300;i--;)x.fillRect(140+T(z^z/i+t*9)*i,90+i,i,1). Feel free to get it even smaller!
  • u/vain
    @u/Joachim: Thanks a lot for the litte explanation and example. =)
  • u/Joachim
    #d3 #perspective #mist #colors
  • u/lineburgb
    for(i=z=c.width=300;i--;)x.fillRect(140+T(z^z/i+t*9)*i,90+i,i,1)

Please log in (or register) to comment.

Loading...
Next page