67 comments

[ 2.7 ms ] story [ 129 ms ] thread
Congratulations on launching.

I did not see instructions so I don't know how to interact with the game or what I am supposed to do.

But the pixel art is awesome.

Did you try playing it?
Unsuccessfully, yes.

Edit: twice now.

Thanks for trying it out! I have added an instruction, you just have to tap on the ants to squash them!
I just tried again on my iPad and got an error

  Null is not an object…
null is too primitive to be an object.
congratulations! To me, it is a kind of perfect little game, with an extra psychological twist. I don’t have a phobia for insects. The theme of having me protect a child instead of a generic target put me in a completely a different mindset. I really started to hate the fast-moving black ants.
Thank you so much for playing!
I got 159 on my first try. I like the art. The difficulty progression is pretty good, starts out easy and gets faster and harder. Nice work!
If you play well enough you can actually save the Shehzadi ;) But thank you so much for playing. That's a great score!
So how much is the max score? Is there an end, or are we cursed to eternal bug-squashing?
There is an end! I think the hardest step is the one where fast black ants attack every two seconds. and after that if you're able to play for 30 more seconds, the princess will be saved.

I didn't put much thought into arranging/tuning the values, but you can take a look at the levels here: https://github.com/shajidhasan/shehzadi-in-peril/blob/main/g...

(comment deleted)
Fun game! Resizing the browser window after it starts breaks the game though. If you you resize it so the princess is off the screen, you can't lose :)
Yeah I've noticed when I was writing codes! But I intended the game to be primarily played on a mobile device, so didn't bother to fix it.
Happens also on mobile. Just rotate e.g. from portrait to landscape during gameplay.
Whats the risk of putting your vercel project on hackernews?
dealing with the deluge of recruitment emails :)
Not quite sure what you mean by that?
Just check what cloud costs you may endure. Serving static CDN files is cheap. Dynamic image resizing costs. I use the simple img tag as I am not interested in that optimization.
Congratulations on the launch! Please, consider putting up a screenshot at the top of the README. When I see visual products such as games or GUIs showcased in HN, having a good screenshot or two is often the deciding factor in whether I try it or not. And probably I am not the only one. A picture is worth a thousand words.
Oh, it's the same with me! I'll add a screenshot whenever I'm free.
I had some fun while waiting for my container to upload. Thanks!
A rare Show HN game that works perfectly on mobile, like an app. Good game too. Well done.
Thank you so much! I could never imagine a game this small would get so much attention.
gg i only lasted 57 secs :'(
I think adding a note that there's an end would go a long way. I personally tried it once, killed something like 100 ants, thought "That's cute, but not interested in clicking on ants endlessly", and closed the game well before I lost.
I will do that, thank you for playing!
Really well done!!! Not sure whether this is the limitation of the hosting platform, but I can't find a link from your game to github.
It's not a limitation, it's just hosted in Vercel. I will try and find an appropriate place to hyperlink my GitHub account.
The only issue I have is that I like the dying sound better than the squishing sound, hence the incentives are misaligned. ^^

Though it appears that you have to squish at least one ant for the dying sound to work. Not sure if that’s on purpose.

Aha! :P Yeah that sound is pretty funny.

Well, there's this browser limitation, you first have to interact with a webpage in a way for it to be able to produce sound. This stops random tabs and pages blasting sound as soon as they're opened. That's why you need to first kill an ant first!

Like Asteroids with a health bar and without the movement.
So fun, thanks for sharing! I'm feeling some nostalgia. The first game I ever made was also an ant defense game. You use a magnifying glass to protect your tomato at a picnic. As you get to later levels, the ants get bigger and the sun starts to set, so you have to buy upgrades.

I wrote it in Java in high school back in 2006. The site I hosted it on in high school is no longer live. I put it on Replit a few years back, but I no longer have access to the account, so I had to fork the repl to play it again. Things change. Hold on to your code. It's fun to revisit old programs!

If you want to give it a try: https://replit.com/@PatrickAtReplit/Ant-Killer-Game.

Thank you so much for trying it out!

I tried to fork and play your game but having very little experience with Java, I couldn't run it! Do I need to download it and run locally?

163 and my brain is fried! Good work.
I got 161! A fast bullet ant destroyed me! Good job!
Awesome game! Was extra challenging with a touchpad rather than a mouse.
This a great start. A level progression system would make it a full fledged game. You could introduces walls to control the direction/flow of ants. The walls would change per level. Also, some kind of penalty for spamming might help. Right now I can use multiple fingers to press all over the map without much thought.
Oh.. my best is 170. Thank you for fun before asleep.

I think this is a great result for the first game.

What a great game. Terrifying, but great! Thanks for sharing. I loved how the ants come in waves, felt very old-skool in line with the graphics, but still very effective!
Wonderful game, and the hit/death sounds of Scheherazade is priceless ;DD

Hack: if you zoom out the window (ctrl plus -), the ants will home in on a nonexistent princess and you can massacre them :D.

Yeah a lot of people noticed this hack! Resizing the window does the same thing. I will need to find a way to stop that!

And thank you for playing! Shehzadi's voice cracks me up as well

Nice little game, and gets pretty challenging.

However, if you resize the window (I fullscreened it after 50 or o ants), the princess is no longer centered and the ants cannot reach her anymore, except those that come from the "closest" wall. Makes the game pretty easy since you only have to watch 1/4th of the screen

Thanks for playing!

Yeah a lot of people noticed the issue. I will have to do something about it!

That was fun! I got to 175. Reminds me of the fly swatting game on Mario Paint. Or this app with cat games that I play with my girlfriend's cat.
That was much more fun than I expected and the game is really well-drawn and snappy. I was doing so well until the really fast black ants started showing up.