[Competition] AHK dwitter!

Post your working scripts, libraries and tools
User avatar
tidbit
Posts: 1015
Joined: 29 Sep 2013, 17:15
Location: USA

Re: [Competition] AHK dwitter!

04 Jan 2018, 12:42

need more gifs guys.
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
User avatar
waetherman
Posts: 109
Joined: 05 Feb 2016, 17:00

Re: [Competition] AHK dwitter!

07 Jan 2018, 16:38

Cogs

Code: [Select all] [Download] GeSHi © Codebox Plus

u(j=0,@=1){
f()
while 3>j,i=.5,@*=-1,x=j++*w/2
while 97>i,=ɢ,ʀ=,ɢ=x+s(p:=pi/48*i+t*@)*q:=(i&2?.26:.24)*w,=h/2+c(p)*q
i++>1?dl(ɢ,,,ʀ)
}

Character count: 139 (146 with indenting)

Result:
Image
Image
User avatar
waetherman
Posts: 109
Joined: 05 Feb 2016, 17:00

Re: [Competition] AHK dwitter!

08 Jan 2018, 07:26

Flappy Photon game
Your name is Foton Partikel. Hold W to go up, do nothing to fall. Remain in the wave function or be collapsed.

Code: [Select all] [Download] GeSHi © Codebox Plus

u(i=0) {
f()
while 9>i
dl(x:=i/9*w,y:=h/5+c(i+t+9)*h/3,x,b:=h/2+y)i++==0&&pi>y&&pi<b?k:=1
k?fc(6,pi+=GetKeyState("w")?-t/99:.1,9):pi:=t:=0
}

Character count: 140 (145 with indenting)

Result:
Image
Image
User avatar
RUNIE
Posts: 272
Joined: 03 May 2014, 14:50
GitHub: Run1e

Re: [Competition] AHK dwitter!

09 Jan 2018, 06:37

Wibbly wobbly infinite moving stroby hallway

Code: [Select all] [Download] GeSHi © Codebox Plus

u(s=0){
while 63>++s
a:=w*(s-1)/128,fr(a+s(t*-2+s/7)*32,a+s-128+a/3,w-a*2,w-a*2+128,r(255,255,255,(s(t*-2+s/24)+1.1)/2.2))
}


Character count: 127

You'll have to run it to see, it really doesn't capture well on gifs :D
rommmcek
Posts: 306
Joined: 15 Aug 2014, 15:18

Re: [Competition] AHK dwitter!

09 Jan 2018, 08:46

Awesome... 3D... The best!

P.s.: I think gif is good enough for preview.
Attachments
Wibbly wobbly infinite moving stroby hallway300x301.gif
Wibbly wobbly infinite moving stroby hallway300x301.gif (486.19 KiB) Viewed 402 times
User avatar
RUNIE
Posts: 272
Joined: 03 May 2014, 14:50
GitHub: Run1e

Re: [Competition] AHK dwitter!

09 Jan 2018, 09:17

My attempt at capturing it as a gif didn't go too well... maybe the software (LICEcap) I'm using is trying to compress it too much.
User avatar
waetherman
Posts: 109
Joined: 05 Feb 2016, 17:00

Re: [Competition] AHK dwitter!

12 Jan 2018, 12:32

Bacteria

Code: [Select all] [Download] GeSHi © Codebox Plus

u() {
static x=0,y=9,a=1
q:=x+s(a)*99,e=y+c(a)*99
q>w||e>h||q<0||e<0?a-=1.5:x:=q+0*y:=e
fc(q//8*8,e//8*8,2,r(w,,w,s(t*99)))
}

Character count: 125 (129 with indenting)

Have fun playing with the width and height, as well as with the code.
Spoiler
Image
User avatar
waetherman
Posts: 109
Joined: 05 Feb 2016, 17:00

Re: [Competition] AHK dwitter!

12 Jan 2018, 15:08

Digiballs
My digital balls are amazing

Code: [Select all] [Download] GeSHi © Codebox Plus

u(r=2,i=99) {
while i-->0,c=t-r*d/2,p=Mod(c/6+a(t(i)),1.5)
fc(a(s(p))*w//9*9-r,h-a(c(c+i/9))*h*c(p)**2//9*9-r-9,2+r,h(i/9,1-r*.4))
r?u(0)
}

Character count: 139 (143 with indenting)

Feel free to play with my balls ( ͡° ͜ʖ ͡°)
decrease i for less balls, set r to 1 or 0 for a different effect
Image
User avatar
tidbit
Posts: 1015
Joined: 29 Sep 2013, 17:15
Location: USA

Re: [Competition] AHK dwitter!

12 Jan 2018, 19:02

waetherman: how are you a master at math? I vote you as winner, winner*8.
those balls are amazing.

making random changes, so much fun combos. this simple one makes them start in different spots going both directions:

Code: [Select all] [Download] GeSHi © Codebox Plus

u(r=2,i=80) {
while i-->0,c=t-r*d/2,p=Mod(c/6+a(t(i)),1.5)
fc(a(s(p+i))*w//9*9-r,h-a(c(c+i/9))*h*c(p)**2//9*9-r-9,2+r,h(i/9,1-r*.4))
r?u(0)
}

also, holy crap? collision detection?
and the fact it stays on a 'grid' is lovely
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
User avatar
waetherman
Posts: 109
Joined: 05 Feb 2016, 17:00

Re: [Competition] AHK dwitter!

13 Jan 2018, 04:44

tidbit wrote:waetherman: how are you a master at math?

I’m not, I’m just a very fast typer and abuse infinite monkey theorem.
Image
User avatar
waetherman
Posts: 109
Joined: 05 Feb 2016, 17:00

Re: [Competition] AHK dwitter!

14 Jan 2018, 17:22

Drunk Painter
Painter go home…

Code: [Select all] [Download] GeSHi © Codebox Plus

u(){
static x=0,y=0
fc(x-r:=9+s(t-d)*7,y-r,r,h(t-d,.5))
MouseGetPos a,b
b-=c(t)*9,x=x*.999+a/999,y=y*.998+b/w
fc(x-r:=9+s(t)*7,y-r,r,h(t))
}

Character count: 140

Result:
Image
Image
User avatar
RUNIE
Posts: 272
Joined: 03 May 2014, 14:50
GitHub: Run1e

Re: [Competition] AHK dwitter!

14 Jan 2018, 19:43

Aaaaand the winner is...

Cogs by waetherman!

Image

We'll talk on Discord ;)
User avatar
tidbit
Posts: 1015
Joined: 29 Sep 2013, 17:15
Location: USA

Re: [Competition] AHK dwitter!

14 Jan 2018, 21:17

"wheel talk on Discord"

ftfy
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
wolf_II
Posts: 1640
Joined: 08 Feb 2015, 20:55

Re: [Competition] AHK dwitter!

15 Jan 2018, 04:08

Code: [Select all] [Download] GeSHi © Codebox Plus

u(){
z:=pi*(3-Sqrt(5)),i:=0,r:=Sqrt(w/2*w/2+h/2*h/2)+5,l:=4,k:=l-1,t:=(r*r)/(l*l)
Loop,%t%
i++,r:=l*sqrt(i),a:=i*z,x:=r*c(a),y:=r*s(a),fc(w/2+x,h/2+y,k,h(a))
}
yes, I know: competition is over. 160 chars.

phyllotaxis.png
phyllotaxis.png (212.87 KiB) Viewed 179 times
User avatar
jeeswg
Posts: 3316
Joined: 19 Dec 2016, 01:58
Location: UK

Re: [Competition] AHK dwitter!

15 Jan 2018, 04:22

- The competition is never over. Btw I would love to see spinning letters/numbers if that's possible. I will take a look myself eventually, possibly in some weeks/months.
- Btw ideas:
Fun with GDIPlus (GDI+) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=6071
The hardest problem on the hardest test - YouTube
https://www.youtube.com/watch?v=OkmNXy7er84
[GDI+][Class] Particle System 2.0 - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=26485
- @GeekDude: What happened to the script for this?
Fun with GDIPlus (GDI+) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=6071&p=52691#p52691
- @tidbit: What happened to the script for this? Or some other flame-based image I think it was.
Particle-System/Gif (4).gif at master · acorns/Particle-System · GitHub
https://github.com/acorns/Particle-System/blob/master/Images/Gif%20(4).gif
User avatar
tidbit
Posts: 1015
Joined: 29 Sep 2013, 17:15
Location: USA

Re: [Competition] AHK dwitter!

15 Jan 2018, 13:12

those presets were not bundled with. only for testing / showing off. those used a much older simpler version aswell, pre-gui. people were impressed so I added a lot more. started to get too confusing and useless so i stopped.
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
User avatar
waetherman
Posts: 109
Joined: 05 Feb 2016, 17:00

Re: [Competition] AHK dwitter!

15 Jan 2018, 13:29

I was surprised when I’ve read that I won, as I was sure Geekdude would win, because he had quite clever scripts, some were also very aesthetically pleasing: drawing was neat, cube was great, Mandelbrot was of course amazing as always; I was mostly impressed by the hacky method of kissing up, and in general space efficient storage for similar stuff like the Twitter logo.

I’d like to thank Runie and all participants, as thanks to you I dived into something I always avoided from far: the codegolfing — perhaps because typically it’s about boring, job–interview–like tasks, and here we were free to create anything we want in given constraints. I’ve learned quite a few tricks during this event, some of which maybe I will even be able to use in real projects.

I thought as a winner I should end the competition with one final piece, so here it goes:
Unpredictabline

Code: [Select all] [Download] GeSHi © Codebox Plus

u() {
static x=0,y=9,a=1
q:=x+s(a),e=y+c(a)
q>w||e>h||q<0||e<0?a-=Mod(t,2)+1:x:=q+0*y:=e
fc(q//2*2,e//9*9,4,h(t,s(t)*.5+.5))
}

Character count: 126

Result:
Image[/quote]

wolf_II wrote:

Code: [Select all] [Download] GeSHi © Codebox Plus

u(){
z:=pi*(3-Sqrt(5)),i:=0,r:=Sqrt(w/2*w/2+h/2*h/2)+5,l:=4,k:=l-1,t:=(r*r)/(l*l)
Loop,%t%
i++,r:=l*sqrt(i),a:=i*z,x:=r*c(a),y:=r*s(a),fc(w/2+x,h/2+y,k,h(a))
}
yes, I know: competition is over. 160 chars.

How about the code below?

Code: [Select all] [Download] GeSHi © Codebox Plus

u(i=0){
Loop,12800
fc(w/2+c(a:=++i*2.3999632297)*r:=4*i**.5,h/2+r*s(a),3,h(a))
}

I really like that effect, at first I was confused on how you draw diamonds (squares rotated by 45 degrees), it must be the arrangement of the circles that make such illusion.
Image
User avatar
Xeo786
Posts: 165
Joined: 09 Nov 2015, 02:43
Location: Karachi, Pakistan

Re: [Competition] AHK dwitter!

16 Jan 2018, 02:56

Simple UFO invading ground, use arrow keys to move and and space to attack,

Code: [Select all] [Expand] [Download] (Untitled.ahk)GeSHi © Codebox Plus


But I can't create Game like space invaders coz there is lotz to learn :headwall:
"When there is no gravity, there is absolute vacuum" -Game changer theory
User avatar
waetherman
Posts: 109
Joined: 05 Feb 2016, 17:00

Re: [Competition] AHK dwitter!

16 Jan 2018, 13:11

Xeo786 wrote:But I can't create Game like space invaders

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Image
User avatar
derz00
Posts: 375
Joined: 02 Feb 2016, 17:54

Re: [Competition] AHK dwitter!

16 Jan 2018, 16:42

Only get close to winning by holding the space bar. Speed of left and right increase with time, as well as bullet frequency. lol


This artwork floors me. simply unbelievable unless I had seen it myself.

Return to “Scripts and Functions”

Who is online

Users browsing this forum: JasonDavisFL and 8 guests