Allegro.cc - Online Community

Allegro.cc Forums » The Depot » [KrampusHack 2020] Yukidaruma

This thread is locked; no one can reply to it. rss feed Print
[KrampusHack 2020] Yukidaruma
Eric Johnson
Member #14,841
January 2013
avatar

Behold, my KrampusHack 2020 entry—Yukidaruma—created for Elias.

{"name":"612765","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/b\/2bb12af03af0d7e708a85ab52361f215.png","w":768,"h":432,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/b\/2bb12af03af0d7e708a85ab52361f215"}612765

Elias wished a holiday-themed, light-filled, non-violent game, and well, Yukidaruma features a snowman during Christmas, sports basic lights, and is contextually non-violent. :D

You can play it in your browser here (move with the left and right arrow keys, and toss snowballs and close prompts with the z key). Be sure to also peruse my logs (once the TINS site makes them public in a few hours) and the game's source. 8-)

Comments, questions, concerns—let me have it! And let me know how many points you scored! :)

Elias
Member #358
May 2000

Quote:

Each Christmas, the yellow elephants living on the moon shower the world with hearts compromised of hopes, dreams, and joy.

Haha :D Love the game, thanks! My highest score is 8340 so far, around 7000 it gets really hard!

--
"Either help out or stop whining" - Evert

Eric Johnson
Member #14,841
January 2013
avatar

Thanks for playing, Elias! It brings a smile to my face knowing that you liked it. ;D

I know how fond you are of your yellow elephants, so I wanted to include a reference to them. I really wanted to show a transition of the elephants throwing the hearts, but I struggled to draw them satisfactorily, so they were scrapped.

Also, if you didn't figure it out already, the flashing hearts clear the screen and repair the platforms upon being hit. With good RNG, you can make it to 10,000 and beyond. My best was a little above 15,000, but that was with really good RNG and lots of flashing hearts. I normally struggle to go above 8,000. Difficulty was one area I wasn't sure of, as sometimes it was too easy and other times too hard during development. I may revise the game a bit later after I've collected more feedback. :)

SiegeLord
Member #7,827
October 2006
avatar

The visual style is great (naturally) and I particularly enjoyed the color variations. I like it (I got around 9K score).

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

GullRaDriel
Member #3,861
September 2003
avatar

Nice entry, best score above 5000. Sometimes when a floor block is deleted near the snowman it is warping the snowmen to nearest block. But hey, he was not on a deleted block.

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Eric Johnson
Member #14,841
January 2013
avatar

Thanks for playing, SiegeLord and GullRaDriel!

Sometimes when a floor block is deleted near the snowman it is warping the snowmen to nearest block.

Yeah, it's a bug I'm already aware of. I'll commit a fix when I get the time.

Dizzy Egg
Member #10,824
March 2009
avatar

This is very cool. My favourite part is the art style, the animated wobbly graphics work really well, feels like playing a cartoon. I haven't managed more than around 7500 yet, but it is good fun!

----------------------------------------------------
Please check out my songs:
https://soundcloud.com/dont-rob-the-machina

Peter Hull
Member #1,136
March 2001

Has anyone had any problems running this with firefox? I get a black screen, no error messages. I had a bit of a poke around the code and it may be something to do with your async loaders, specifically loading background.mp3 which is quite a large file (at least compared to the others.) I found that if I reload a couple of times I can get it to work, which makes me think its timing-related, ie. once the file's in the cache it loads much quicker and this seems to fix it. Unfortunately for the same reason it's difficult to debug further as it's not reproducible.

Having said which, when I did get it to load I really enjoyed it, the sound and Roobarb style graphics work together nicely!

Eric Johnson
Member #14,841
January 2013
avatar

Thanks for playing, Dizzy Egg and Peter Hull! I'm glad the graphics have been well-received. :)

Peter, which version of Firefox are you using? I encountered the same issue as you did during development, and came to the same reloading "fix". Perhaps it would fair better if I load the background sample first rather than last. I'll look into this further, and perhaps will add a loading screen of some sort (rather than an empty black one).

Edit:
I pushed a commit to use OGG format on Firefox, thinking that may fair better than MP3, but it didn't. Firefox sometimes throws "NS_ERROR_PARSED_DATA_CACHED", and takes 3 reloads for the background sample to load properly (this is a bug dating back to at least 10 years, from what my searches have yielded). I'll look into re-encoding the background sample, or playing with the headers.

Edit #2:
I think I've fixed it... I loaded the background sample first, and it seems to work. I cleared Firefox's cache and loaded the game without fail on the first try. Please let me know if the problem still persists.

Neil Roy
Member #2,229
April 2002
avatar

Nice game. I got 6000 on it after the third try. I had no troubles playing it using Firefox 84.0.1 64bit.

---
“I love you too.” - last words of Wanda Roy

Peter Hull
Member #1,136
March 2001

(I think I've seen all the same FF bug reports!)

Didn't work for me, sorry. I still needed 3 reloads to get it.
One thing I did try when I was messing about was to set the 'preload' attribute to 'auto' on the <audio> element that you create in loadSample. Apparently different browsers set the default value differently so it's possibly plausible this would help. But I'm not sure if it did, may just have been the "Third time lucky feature"

Eric Johnson
Member #14,841
January 2013
avatar

Thanks for playing, NiteHackr! :D

Peter, I've committed a new fix attempt. Please clear cache and let me know how it fairs.

Peter Hull
Member #1,136
March 2001

Works for me!

amarillion
Member #940
January 2001
avatar

Ha, I recognize this. This is Pyoro, right? https://www.youtube.com/watch?v=dMfF9rk9xGU

I got 6450 so far, but I'll keep trying. It's addictive like an arcade game should be.

I want to have a look at Poyo as well, as I'm basically unhappy with Phaser. Is it compatible with ES6-style imports?

edit: 9800!

Eric Johnson
Member #14,841
January 2013
avatar

This is Pyoro, right?

You're right on the money! I mentioned as much in my logs. I knew it as "Bird & Beans" from the stand-alone DSi port. :)

Quote:

I want to have a look at Poyo as well, as I'm basically unhappy with Phaser. Is it compatible with ES6-style imports?

I'm curious, what has you unhappy with Phaser? And Poyo doesn't export itself, so you won't be able to use it with import syntax (although it shouldn't be too difficult to hack-up an imports-friendly version). As it stands, it expects poyo.js to be the first script included in the head of the HTML document, with the scripts that use it coming after. You can look at Poyo on GitHub for examples.

Quote:

edit: 9800!

That's excellent! Curiously, the game becomes easier after 10,000 points, as the logic behind spawning the screen-clearing hearts spawns them more frequently after that. The speeds become crazy though. :o

amarillion
Member #940
January 2001
avatar

I'm curious, what has you unhappy with Phaser?

All kinds of small problems

The main problem is GUI stuff. Phaser wants to take control over the page, yet doesn't provide good GUI widgets. You can (and should) use browser widgets for GUI stuff, but Phaser is not really designed for that, it's just awkward.

In the tilemap routines, model and view are tied together. If you scale a tilemap, collision detection is broken. It doesn't do animated tilemaps. Try to draw a tilemap that is smaller than your canvas - you can't. So I ended up writing my own tilemap code.

Mouse events are broken. I end up writing my own mouse handler.

Phaser tries to provide convenience for everything, yet half the time I end up rewriting parts. I'd much prefer a low-level library, like allegro, so that I can write my own abstractions.

Phaser doesn't do ES6 imports either.

Phaser is not set up for unit testing. As soon as your module depends on Phaser, you can't write unit tests for it anymore.

Eric Johnson
Member #14,841
January 2013
avatar

Ah, curious. I suppose that's to be expected from the one-size-fits-all approach of frameworks and the likes though. In contrast, Poyo is fairly low-level, and much of its API was inspired by Allegro 5. It's a tiny library that doesn't back you into a corner.

Main features:
- Load and draw bitmaps (as-is, tinted, rotated, scaled, clipped).
- Load fonts and draw text (self-explanatory).
- Load and play samples (change gain, speed, and repeat; no audio panning though).
- Affine transformations (translate, rotate, scale, and shear; no perspective transforms).
- Interface with mouse and keyboard (button/key up/down/pressed/released, get X/Y, lock, focus, etc).
- A couple more advanced features (render-to-texture, instanced rendering/batching, bespoke shaders).

No built-in methods for physics, tile-maps, animation frames, or collision detection. Again, it's a library, not a framework. But of course, just like with Allegro, you could easily roll your own solutions to suit your unique needs.

I'm slowly working on the next version. I plan for it to include texture transformations, stereo audio panning, and primitives (yes, this one's a little embarrassing, as when I originally endeavored to write the library, I only cared about blitting images, so primitives weren't a priority in the first release; but it will be trivial to commit). I'd like to also eventually look into adding touch inputs for mobile (I'm not a mobile gamer, and the phone I have is old and slow, so mobile/touch is a low priority).

amarillion
Member #940
January 2001
avatar

10970!

Niunio
Member #1,975
March 2002
avatar

I can't play. For some reason Xubuntu's Firefox doesn't include WebGL2, and my WIndows Firefox thinks that when I press "Z" I want to look for something in the page instead of send the keystroke to your app (this happes in most web-based games).

It is sad because the game looks like really nice and fun. :(

-----------------
Current projects: Allegro.pas | MinGRo

Eric Johnson
Member #14,841
January 2013
avatar

Niunio, please clear your cache and try again in Windows Firefox. I've committed a change that should make the game playable for you. :)

Also, regarding, Xubuntu, which version of Firefox are you using? Do you have hardware acceleration enabled? Have you tried playing under Chromium to see if it's specifically a Firefox issue?

Any luck, Niunio?

Go to: