• This repository has been archived on 12/Oct/2024
  • Stars
    star
    440
  • Rank 99,050 (Top 2 %)
  • Language
    Rust
  • License
    MIT License
  • Created about 1 year ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Bad Apple using Windows windows

Bad Apple but it's a Windows virus

A high-performance (I've never seen anything like this run in realtime before) rendition of Bad Apple, using Windows windows as the video surface.

It's not actually a virus, but it is reminiscent of the viruses of old that were more of a nuisance than anything.

Video demonstration:

Flandre Scarlet made out of windows

Why is it so performant?

  • DeferWindowPos - even the most naive of projects can go from 1fps to 15fps by using this wonderful batched API instead of SetWindowPos.
  • WS_EX_TOOLWINDOW to remove the taskbar entry
  • SWP_NOREDRAW when moving/resizing windows
  • Optimised code that only shows/hides/moves windows that need showing/hiding/moving
  • Rust is blazing fast, don't you know?

Could it be faster?

I suspect that choosing which windows to move/resize, such that each is resized as little as possible, can increase performance - currently, the windows are just used from largest to smallest, which can result in some location jitter as they fit into different indexes.

Future work

All of these I have done already in small tests, but they're both difficult to make performant (copy dialogs are particularly slow), and difficult to arrange into a pleasing display.

  • Spawning MessageBoxA windows and taking their handle (thus avoiding the need to replicate the layout of MessageBoxA for each version of Windows you run on)
  • Spawning Vista file copy dialogs using IProgressDialog
  • Arranging windows in rolling sine waves, circles, etc

All of these I have not tried yet, but would be great additions:

  • Water physics using hundreds of scroll bars
  • Basic hard-body physics between windows
  • Error noises synced with the audio (could just pre-render...)
  • Notification bubbles
  • Windows in the taskbar to show text (if the user has large taskbar buttons enabled)
  • A large variety of error messages to delight the user with

Building and such

Should be fine to just cargo build --release.

Look at bad apple.py for the pre-processing to take an input video and turn it into boxes.bin, a space-optimized representation of the window bounds for each frame. The script is jank, don't come complaining.

More Repositories

1

0x40-web

Pretty images and colours
TypeScript
393
star
2

BemaniPatcher

Web based DLL binary patcher
HTML
216
star
3

PocketVoltex

A portable Cherry MX controller for KSM or SDVX
OpenSCAD
151
star
4

ifstools

Extractor for Konmai IFS files
Python
108
star
5

ifs_layeredfs

Live replace any file (including IFS contents) in Konmai games
C++
56
star
6

bigDecrypter

Decrypts Homeworld Remastered .big files into a usable format
C
40
star
7

SyncLoop

Frame perfect audio+animation sync. Like YTMND but better.
JavaScript
40
star
8

Arduino-HID-Lighting

So you don't need to do USB shenanigans
C++
37
star
9

kbinxml

Decoder/encoder for Konami's binary XML format
Python
36
star
10

2dxTools

Small tools to deal with 2dx audio container files
C
31
star
11

chuni_ac_3d_case

3D printed case for Chunithm arcade slider + airs
OpenSCAD
29
star
12

TataconUSB

A small dongle to connect your Wii taiko controller to your computer as a USB keyboard
C
26
star
13

sv3c_decrypt

Decrypt SDVX e-AMUSEMENT CLOUD game files
Python
24
star
14

Arduino-USB-Rename

Programatically rename a USB based Arduino
C++
23
star
15

SDVX-Song-Extractor

Make albums from games
Python
19
star
16

spice-drs-pad

Virtual DANCERUSH pad for Spicetools
JavaScript
17
star
17

s3p_extract

Extract Konmani s3p files
C
14
star
18

infinitas_decrypt

Decrypt IIDX Infinitas game files
Python
9
star
19

MagicBoxCrack

Crack and IO tooling for Magic Box, the Chinese jubeat clone
C++
9
star
20

evoluent_better_pcb

PCBs using better sensor for Evoluent VerticalMouse products
C++
7
star
21

din-time-pebble-hack

Make the DIN Time Pebble watchface use a new weather API
JavaScript
5
star
22

ddr_arc_extract

Extract files from DDRA archives
Python
5
star
23

DirectSound-BufPos-Retimer

Simulate perfect audio playback to fix some Windows XP games
C
3
star
24

avstack.py

avstack.pl ported to Python 3
Python
3
star
25

groove-coaster-genbu-better

Genbu's Groove Coaster ASC, but not terrible
C++
2
star
26

dbc_format

An opinionated DBC formatter
Python
1
star
27

mon.github.io

Github io page
JavaScript
1
star