dwitter.net | metamero (874)

+ 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: #Food
show FPS hide FPS share 1 remix fullscreen

function u(t) {

}//
102/140


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

  • color noise

Please log in (or register) to comment.

show FPS hide FPS share 1 remix fullscreen

function u(t) {

}//
116/140


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

  • color noise

Please log in (or register) to comment.

show FPS hide FPS share 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).

  • two player #pong (Q↑↓A vs L↑↓P) dweet split experiment [3/3] - full code at codegolf.tk/a/363
  • u/metamero
    #game instructions: scroll down and back sometimes to begin. click on canvas and play with keys Q/A for one player and L/P for the other. also works when seeing/executing all the tree parts/dweets d/14017 d/14016 and d/14015 . or just scroll my page up to the last part u/metamero
  • u/metamero
    for the game to work on this window you first have to open/run the other parts d/14017 d/14016

Please log in (or register) to comment.

show FPS hide FPS share 1 remix fullscreen

function u(t) {

}//
66/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) {

}//
21/140


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

  • 21B quinoire

Please log in (or register) to comment.

show FPS hide FPS share 1 remix fullscreen

function u(t) {

}//
24/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.


function u(t) {

}//
25/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 1 remix fullscreen
remix of d/12958 by u/Xen

function u(t) {

}//
32/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 1 remix 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).

  • i'm a newcomer, but codegolf community must decide whether they like to count code size in UTF-16 characters, UTF-16 code units or bytes (or bits, since b and B are different units)
  • Show more comments…
  • u/metamero
    u/f8f82804 unicode chars can be 16 or 32-bit (only). this bug is on front, not on server. or stated other way, this bug is on codegolf community policies.
  • u/metamero
    speaking about bugs, this code actually counts UTF-8 chars (as they are represented in the page/editor). one can see this matter with the symbol (it's 2B long in UTF-16 but 3B in UTF-8). parameter 'utf-16' in TextEncoder is obsolete, see this note here https://developer.mozilla.org/en-US/docs/Web…
  • u/metamero
    d/11906 is my method to count UTF-16 chars
  • u/metamero
    *** this code actually counts bytes of the string encoded with UTF-8 (html context). d/11906 counts bytes of the string encoded with UTF-16 (javascript context). both count Unicode chars (or *code points*) right with Array.from(code).length. this is different from counting *code units* (16-bit unsigned elements).

Please log in (or register) to comment.

show FPS hide FPS share fullscreen

function u(t) {

}//
41/140


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

  • SyntaxError #quine (on firefox)
  • u/metamero
    strange... if you copy to new dweet area both d/11831 and d/11832 works (anyway exceptions still occurs, and it is the quine on each browser)

Please log in (or register) to comment.

Loading...
Next page