I like this, except I'm really not a fan of needing to rapidly tap a key to move repeatedly in one direction. I don't know how many shortcuts were needed to get to 256 bytes, but I think the game would benefit from significantly shorter key repeat.
The repeat delay is actually controlled by your OS here because it's just a simple onkeydown event. Implementing movement rate would require far more code because you need up and down listeners and a state.
Cross My Heart – A Frogger Demake in 256 Bytes of HTML/JS
11–20 of 51 posts
Re: Cross My Heart – A Frogger Demake in 256 Bytes of HTML/JS
#12In Firefox, I'm getting ~500ms GC pauses every few seconds which make it pretty difficult to play. It works fine in Chromium, though. Edit: Firefox 122.0 on aarch64 (fedora asahi)
From the source the only thing I can see that would make garbage is b.innerText=o which is set 50 times each frame. But even then it's just one giant text node, not html elements so it's surprising this is causing so much GC in Firefox.
Re: Cross My Heart – A Frogger Demake in 256 Bytes of HTML/JS
#13Pretty cute, and it gets super fast pretty quickly. I got to level six on the first go, but after that I noticed if you move one pixel off the side of the screen you could just hold down "UP" to advance levels every few seconds.
Re: Cross My Heart – A Frogger Demake in 256 Bytes of HTML/JS
#14One thing I don't understand is the role of the "" closing tag. I didn't immediately see any reference to an open or closing svg tag anywhere in the source.
Re: Cross My Heart – A Frogger Demake in 256 Bytes of HTML/JS
#15In Firefox, I'm getting ~500ms GC pauses every few seconds which make it pretty difficult to play. It works fine in Chromium, though. Edit: Firefox 122.0 on aarch64 (fedora asahi)
Re: Cross My Heart – A Frogger Demake in 256 Bytes of HTML/JS
#16How to move on a touchscreen?
Re: Cross My Heart – A Frogger Demake in 256 Bytes of HTML/JS
#17Very fun for 256 bytes. The script itself looks beautifully compressed as well. I think gameplay is a bit dampened by the scale of the board vs your character though. In Frogger (at least the one I remember) the cars are the same size as the player. Here they are double height which quickly turns it into a game of trying to tap as fast as possible even when you're only trying to pass one oncoming car a few levels in.…
Re: Cross My Heart – A Frogger Demake in 256 Bytes of HTML/JS
#18Unless I misunderstand the maths, the hold-up strategy has the same probability of winning regardless of which level one is at, since the levels only increase the speed of the obstacles and not their density. I would have thought the difficulty would ramp up such that even stupid strategies get less effective at higher levels, but not this time!