Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: My first Ludum Dare entry, online multiplayer game Hide-n-Stab (54.244.244.60)
71 points by bendmorris on May 3, 2014 | hide | past | favorite | 54 comments



Last weekend for the Ludum Dare 48 hour game competition "Beneath the Surface," I created an online stealth game. Building even a simple multiplayer game in 48 hours was a very ambitious goal but I'm very pleased that I was able to pull it off.

In Hide-n-Stab, everyone looks alike, but some characters are harmless NPCs while others are fellow players like yourself. Your goal is to find other players and kill them by stabbing them in the back, but whenever you attack, you'll be revealed as a player for a short time.

You can play in your browser, and I'd love to hear your feedback: http://54.244.244.60

The game was created with Haxe, using the HaxePunk game engine, which I'm a contributor to.


I like this type of game, reminds me of Spy Party. Suggestion: don't allow the characters to walk through each other. If a player tries to stab you and fails, the fight just becomes walking through each other and trying to turn around fast enough to stab the other guy in the back, which isn't really fun or strategic.


Yeah, honestly it reminds me of what spy party had the potential to be. I haven't played it in a while, but it was really a disappointment.


I love the concept, though the speed boost mechanic destroys the stealth mechanic that I think you were going for. Those who eschew stealth and just get good at knife fighting mow down everything in their path, dummies and stealth players alike.


occasionally my character will start moving in a direction until the reach an edge, and I cannot make them move other than to stab or make the other animation, and I have to reset the page, because even if the char dies, usually it will not accept the c as input, or the char will immediately be stuck in one place upon respawning.

This seems to maybe not be happening any more though. Maybe you fixed it? Or maybe it was just due to traffic.

Also, the highest score I've gotten is 22, though that streak started with only 6 other players (and ended with 10 or 12).


I (hopefully) just fixed that movement bug. Good to hear that it doesn't seem to be happening any more.

22 is great! My record is somewhere in the 30's, and I've been playing for a week :)


Is the source code available anywhere? What did you use for the server?


Source is available here: https://github.com/bendmorris/hide-n-stab

Both the client and server are written in Haxe, which is compiled to Flash (for the client) and Neko VM bytecode (for the server).


I like the game its ideas but why are you still actively developing and encouraging others to develop in Flash? I don't want to come over as offensive, but it is a dead platform. Uncertain what the LD-jury judges on, but they should incorporate technology stack in the final results. In your case, you would get a few points off for using Flash.


Are you familiar with Haxe? I target the Flash platform because most people have the plugin installed and it makes distribution easy. But Haxe is capable of compiling to multiple targets, making it easy to write a single code base and from that create apps for flash, mobile, or desktop. The great thing is that I can use the Flash platform now, while it's still very common, but avoid being locked into it in the future.


There are plenty of developers still actively producing and releasing games in Flash - the fact that it can cross compile to iOS, Android, and Mac/Windows desktop applications with a single codebase is pretty compelling.

Haxe and Unity also do this, but I would hesitate to call Flash a dead platform - it's just not the flavor of the month right now.


It seems like there is no advantage to being stealthy -- sure, a stabbing action gives you away as a real player, but it also allows you to move faster than hidden players who, seeing you revealed, might try to distance themselves from you.


Agree that it almost makes more sense to make stealth mode fast and stab mode slow.


It sounds fun, but I'm afraid it's not working for me on Chrome 34 on OSX. Just shows the tiles and Score: 0 in the top left.


I think the server is having trouble handling the load, unfortunately :( I'm going to have to troubleshoot and possibly restart.


Seems like the server might have been overloaded. Was working for me on the same platform earlier.


Chrome 34.0.1847.131 m - does not work. Fix it soon as this looks like an amazing idea!


I'm moving everything to a more robust EC2 instance, so please bear with me.


Doesn't work for me either in Firefox 29 on OSX


Firefox 29 on Linux.

Isn't working for me.


yep, same issue with Chrome, Firefox and Safari on OSX


Thanks for playing, everyone! While my little server didn't stand a chance against the deluge of new players, I was able to fix a lot of bugs and scale things up quite a bit. I'm going to keep working on it and put out a more polished final version soon.


Just completed a server upgrade and migration. Sorry for the delay - should've seen that coming. Hopefully there will be no more problems.


Still some intermittent problems - I'm going to be constantly monitoring things, but if your game freezes or glitches, just try refreshing.


Seems this new server's getting crushed... but the times it's worked, it was a lot of fun!


Nice game, very addictive.

As a fellow developer I wrote a quick article on your game (http://www.uppskattat.se/articles/hide-n-stab). I hope you'll get some visitors.

You should think of having some domain, I think most non-IT people are suspicious against ip-addresses. Hit me up if you want me to add some credits for you or if you change the hostname to something else.


Glad you enjoyed it, and thanks for the article! This is just a temporary home for the game. Once the competition is over, I'm planning on polishing it up and posting it on Kongregate or somewhere similar.


Cool, when that happens and if you remember and care about it it hit me up and I will update the article.


The server is currently getting overloaded, but try reloading your browser a few times before throwing in the towel. It's a lot of fun if you get in.


Problems:

You are almost invulnerable running around constantly attacking and when someone decides to kill you in this mode it is very random who dies, usually best connection wins. This could be easily fixed not by improving the lag, but by improving the gameplay.

I think you shouldn't be able to attack again until the reveled mode ends. Otherwise, once revealed, the game become run and attack.


For God's sake fix that collision detection. I try to stab someone and someone tries to stab me, we are going through each other and standing on top of each other and still stabbing, and nothing happens.

Edit: It is so frustrating. I stand at exactly (pixel-perfect) the same height as someone else. I stab him so that my knife ends directly in the middle of the other player. It does nothing. I try again, this time going to the right a bit (so move to the right, then look to the left so that I stab towards him). This time the knife ends around where his sprite begins. At the same time he does one stab and I die. Why do I die and never someone else? Is this lag or something and has he stabbed me ten seconds ago? Is anyone getting scores of over 1 or 2?


You can only stab from behind, so that might explain the trouble you're having.


Oh, that might explain. Let me try.

Edit: yes that's it


Great job! Do you have any plans for keeping this up long term?

I managed to play for a while yesterday before it got HN'd (can we say that now instead of slashdotted?) and was looking for a temporary diversion but it does not seem to be functioning properly any more.


I'm working on fixing some bugs and adding a few new features, then I'll post it somewhere more permanent like Kongregate. I'll be sure to announce when I do.


Cool concept, but ran into some crazy lag on kill events; another player and I must have stabbed each other 6 or 7 times before I died.


How do I compile this? I've installed haxe, lime, openfl, renamed openfl version from 1.4.0 to 1.2.3, but every time I install a dependency it gets stuck on another. The one it's currently stuck on is spinehaxe, for which google finds two github repositories, neither of which seem to be of any use. It's not in the lime repositories either.

How do you compile this?


You'll need a few of my own libraries:

* spinehaxe: github.com/bendmorris/spinehaxe

* SpinePunk: github.com/bendmorris/SpinePunk

* my fork of HaxePunk: github.com/bendmorris/HaxePunk (use the "all" branch) which has modifications not accepted into the main version yet

To install spinehaxe and SpinePunk, clone the repository, enter that directory, and run the command "haxelib dev <library name> src". For HaxePunk, clone my fork, check out the "all" branch, and run "haxelib dev HaxePunk path/to/haxepunk"

Hopefully installing those should be enough to get it working.


Did all you said, modded the openfl version to 1.3.0, then the following:

     - Running command: haxe bin/linux64/cpp/haxe/release.hxml -D HXCPP_M64
    src-client/hidenstab/Client.hx:66: characters 8-21 : sys.net.Socket has no field endian
    src-client/hidenstab/Client.hx:83: characters 15-36 : sys.net.Socket has no field bytesAvailable
    src-client/hidenstab/Client.hx:84: characters 15-36 : sys.net.Socket has no field bytesAvailable
    src-client/hidenstab/Client.hx:89: characters 30-45 : sys.net.Socket has no field readByte
    src-client/hidenstab/Client.hx:90: characters 30-45 : sys.net.Socket has no field readByte
    src-client/hidenstab/Client.hx:98: characters 20-36 : sys.net.Socket has no field readBytes
    src-client/hidenstab/Client.hx:102: characters 20-36 : sys.net.Socket has no field readBytes
    src-client/hidenstab/Client.hx:106: characters 33-54 : sys.net.Socket has no field bytesAvailable
    make: *** [linux] Error 1
Edit: So it's not `make linux` it seems, `make flash` seems to do something... Let's try making the server or something...

Edit2: ./server:

    [...]
    Called from flash/Lib.hx line 191
    Called from /usr/lib/haxe/std/neko/Lib.hx line 30
    Uncaught exception - load.c(237) : Failed to load library : lime.ndll (lime.ndll: cannot open shared object file: No such file or directory)
Edit3: Found lime.ndll in some bin folder somewhere. Copied it over to where ./server is. Now it seems to try to bind to 54.244.244.60 (your server's IP) which of course doesn't work. Server.n is a binary format, that can't be the config file, hmm...

Edit4: Oh there are replies that HN doesn't show in edit mode. Okay. Gonna try this!


The targets you want are "flash-final" for the client and "server" for the server.

Before building, modify src/hidenstab/Defs.hx to change the host and port.


In HaxePunk, edit the file "include.xml." Find openfl, remove the version completely (just "<haxelib name=openfl />"), save and try again.


You'll need to run "lime setup linux" to build the lime.ndll file and then copy it into the hide-n-stab directory.

edit because I can't reply to your comment: yes, the client also uses the values in Defs.hx. It's likely a Flash security issue due to running it locally. Try adding "-Dnetwork-sandbox" to the command in the Makefile which builds the flash client.


Okay the server seems to run now, but the client gives a black screen. When using `make flash` (without -final) it does show "Masks", "output:" and "-- HaxePunk 2.6.0-dev --", but still no game. Does the flash client also use the values in src/hiddenstab/Defs.hx?


How's it going?


Still not working. It seems to compile, but I don't know what to do with the black screen that the client gives. Compile errors are googleable, but I don't feel like digging into code in some language that I have never used. I wouldn't know how to do console.log nor where to read the console log.


By the way, on Chrome, I can't move at all. WASD nor arrows work, but the other controls (like X) do work.

EDIT: Got to a score of 7 then the game froze. I think it's a bit unbalanced at the moment... there's just too much advantage for revealing yourself: you get to run very fast, and you can easily maneuver behind people. Also, there are a lot of netcode issues such as entities showing up that aren't actually there. It's pretty fun though!

EDIT2: Yeah, there's some kind of freeze (infinite loop) bug on Firefox that sometimes triggers after killing someone. Makes it hard to play...

I think this game has a lot of potential. You should put in a leaderboard to see who has the highest score.

EDIT3: Managed to trigger the "can't move" bug on Firefox, so it looks like it's not browser-specific. Then I triggered the freeze bug after pressing Z, so it looks like it doesn't matter whether or not you've killed someone for triggering the freeze.


It's a fun and interesting idea, but it's loading about one time in three for me. When it does, it frequently crashes, resets, or simply won't let me move. The rest of the time it's various asset loading errors and other problems. I know the HN hug of death is hard to avoid, but there are a lot of other bugs going here also.


When the server went down, I was running around with my hair on fire trying to fix it and other bugs that cropped up. Inevitably I ended up introducing even more bugs in the process. Everything is working relatively smoothly right now, and I'm keeping an eye on things.


I had to limit the game to 100 simultaneous players. It seems there are always more people who want to play, so I set up a second server at http://54.186.236.169 - this server should have lower latency, but also fewer people. Consider switching!


Page doesn't load.


Nice, it's like Spy Party, but with an actual release. Nice job.


Pretty entertaining. Works well on Firefox 28 on Mac.


This did not work on my machine running Chrome on OS X. I can't do anything in the game, I am just staring at the screen loaded.


You got front-paged.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: