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.
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 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.
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.
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.
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?
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.
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.
* 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!
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?
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!
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.