doing a small project to get back into programming

it's written in Java and transpiled with TeaVM because I wanted to use JBox2D

the usage of svg means there's no rotation artifacts and everything is infinitely scalable

it looks really nice

i'm a little concerned about the performance

it runs fine on my system in firefox, but yeah this is not exactly efficient

those use elements create an entire shadow dom each

i specifically wanted to not use webgl or canvas so it can be used in locked-down browser configs

the project is called "welon" because i was saying that as short for watermelon when talking about making a suika game clone and i thought it was cute

all the art and the engine is in place, i now need to add user-controlled fruit dropping and more set dressing

just fixed my main performance bottleneck: building the actual css string for the transform

all the time spent now is inside of firefox's css parser which is unfortunate but unsolvable due to the fact these apis are bad

in terms of rendering, firefox is spending a lot of time building new display lists despite the reused geometry

i suppose it's missing heuristics for svg use elements, which isn't really surprising

but it's not that bad

anyway while i was profiling this the rng made two welons

I haven't implemented losing yet so the rng just keeps spawning fruits infinitely

Kaito / Katie Sinclaire @KS

@unascribed out of curiosity what do two watermelon combine into

· Web · 0 · 0

@KS they mutually annihilate, freeing up playfield space so you can get a high score

@unascribed cool, cool, I know that's what suika game does too but just wanted to check since it's not common knowledge

@KS you dare suggest i wouldn't do adequate research before cloning a game???? :P

the fruit sizes are also based on painstakingly measuring screenshots of the free online clone most people talk about and the switch game

the welon is actually smaller than the melon in the online one, which is strange