D: Hostage Situation

edited in Online Competitions & Jams
A re-interpretation of traditional Minesweeper with the look and feel of those old "Guess Who?" characters (anyone remember playing that as a kid?). Except here they're hostages and they need your help! The clock is ticking...

INSTRUCTIONS:

I've provided a short in-game slideshow that explains how to play.

1. Run the game (see below)
2. Click the 'Game' menu (top left)
3. Click 'How to play'

In super-summary, left-click to attempt to clear a tile, right-click to plant a flag indicating a possible bomb. Try not to kill anyone.


========LATEST VERSION==============================

Known issue: had to reimplement music and sound effects on their own threads for jar version to work as intended. Has resulted in an unpredictable bug where sound effects stop working. You'll have to close the window and relaunch to get them back if this happens.
Content and gameplay is identical to original submission.

Download from http://www.fileswap.com/dl/F6cgOEnpXV/



=====COMPETITION VERSION=============================

TO RUN (WINDOWS OR UBUNTU terminal):
1) Download from http://www.fileswap.com/dl/lTNqjWdfWa/
2) Unzip HostageSituation.zip and navigate into HostageSituation folder
3) Enter 'javac *.java'
4) Enter 'java Minesweeper &' (yeah sorry, it should be called hostageSitch or something)
Thanked by 1Muchie

Comments

  • Hey, the Competition D rules are that a game is only allowed to have 2 key inputs. I know LMB and RMB are technically 2 different keys, but if you're using the mouse position when they're pressed, then that's an extra channel of information. I actually answered that question in the competition thread ;)

    Is there a way you could re-engineer it to match the competition constraints maybe?
  • Damn, I didn't think of that. I think that says a lot about the design of the mouse that I actually experience it as an extension of my MIND :p

    If I retained the touchpad as one input (allowed?) and a long press to cycle through flag/uncover/do nothing....It would be doable I think. Unfortunately, I'm a third year varsity student with a prototype deadline looming, so I won't have the time to rework this without, well, failing :D I will have to gracefully bow out of the competition. Not too gutted - for me this was really about participating and getting feedback on my first game attempt.

    So guys, I'd really, really appreciate if you still tried out my game and let me know your thoughts and hopefully have fun with it - I tried to make it amusing :)
  • edited
    Hi @Kixie,

    Some tips next time for distributing your java code for next time.

    If you build your java files into a jar they will work on any java compatible platform. This would mean people that want to run your game only the the jvm not the whole jdk

    Here is an example; the web is full of 1000's of them
    http://www.freejavaguide.com/jar_files.htm
    Thanked by 1Fengol
  • @tbulford: Thanks, actually I've been trying for the last couple of hour to build a jar file based on those 1000s of examples, but nothing is working. Tried the instructions on the link you provided too - still no success. It tells me it's added the manifest, it creates a jar file, but I can't run it.

    I think the fact that I'm using the default package might be throwing it. Unfortunately, I can't investigate this further now 'cause of work :( Will try again after the long weekend.
  • Please do post a compiled version - I'd like to give this a shot, but I'm not keen on pulling down the full JDK for one game. :P
  • @Gazza_N: I'm hoping I can get to this later today if I push hard enough on my other project. It's good to know there's interest though - was feeling a bit bummed, so thanks :)
  • Likewise, I'm interested in seeing a compiled version of this, if you're still working on it. ^_^
  • @Thaumaturge: Yes! I handed in the prototype for varsity today. So I will be returning to debug this issue with only 3 hours sleep later today :P Oddly that has worked in the past. It really shouldn't...
  • Heh, actually I don't find that to be terribly surprising: I seem to recall reading somewhere that lack of sleep can actually help creativity, if not taken too far. A once-off short night could easily be helpful.

    Of course, lack of sleep has some other, less desirable effects as well, I fear, so it's likely not something to rely upon!
  • @Gazza_N @Thaumaturge: Kind of swapped out one issue for another, but at least it's double-clickable now :)
  • @Thaumaturge: yeees, I called my partner home from work today because I couldn't get the key in the door and thought the weather had done something to the lock. Turns out I was putting the key in the wrong lock. Sheepish is not the word.
    Thanked by 1hanli
  • @ Hanli: Hahahaha! And how good is his delivery.
  • Any news on a compiled version? I don't have the JDK on my laptop right now :(
  • I posted a link to a jar in my original post which only needs the JRE, not the full JDK. I may not have made that clear in my comments, my bad! Can you run it on your machine?
  • Oh right, I was ignoring the latest version because you had a competition version link up. My bad! Will download that and give it a go.
  • Ah, I missed the new version!

    I've tried it now, and I think that it's a cool evolution of Minesweeper. I'll confess that I didn't look at the timers at all -- but then I was playing on the "relaxed" mode. I wonder whether it might not be improved -- perhaps by making one of the "hostages" the terrorist, and providing some way for the player to discover which it is through the course of play -- if they're attentive.
  • Erm. It's been rather a long time since university for me... How do I make this .jar version run? I've definitely got the JRE installed, but everything keeps wanting to handle the .jar like it's an archive.

    What do you people have against executables? Srsly :(
  • What worked for me (albeit under Ubuntu), as I recall:

    Do indeed treat the .jar file as an executable. Unzip the contents to the folder of your choice.

    In a terminal/cmd, navigate to the folder to which you unzipped the .jar, then run "java Minesweeper".

    Notes:
    * It may be that you can run the Minesweeper class file with either a double-click or a selection from the context menu under Windows -- I don't know.
    * It's the "Minesweeper" file that you pass to Java, not the one named "Hostage", I believe.
  • Do indeed treat the .jar file as an executable. Unzip the contents to the folder of your choice.
    Wat?

    I really don't want to have to set up my environment variables and all that bullshit. *sigh*
  • I thought from a console you just typed "java filename.jar".

    I'll put the JRE on my machine this one time and get a version working
  • @dislekcia: how odd. I can just double-click it on my machine. Try 'java -jar HostageSituation.jar' from within the folder where you've put the jar. No unzipping nothing.

    Dislekcia, I can see from your comments that I have very much frustrated you. For this I am truly, truly sorry. I did not put up a jar because I don't believe in making people's lives easy - I did that because it was honestly the best I was able to achieve with my current skillset and horribly limited time. Getting it into a jar file took me a full day of debugging. I failed completely at my attempt to bundle it into an exe. It is both frustrating and embarrassing for me that I have not been able to achieve better. But as embarrassing as it is, it is important to me that you understand that it's because I'm a novice and am not yet fully able to express myself technically, not because I'm some religious Linux fundi.

    I hope that the above instruction works and, again, I am so sorry. I aim to not have this issue with my next submission (chiefly by not writing it using swing in the first place!)
  • @Fengol: You are very kind to extend me that lenience - appreciated :)
  • @Thaumaturge: Thanks for the feedback! I think more narrative would be cool, maybe some scripted animation when you catch them or when they get away.

    I don't look at the clocks either. I think maybe there's just too much information on the screen. Or the player isn't invested in saving everyone. One way to solve this might be to just take out the partial win condition and make it so that as soon as someone dies, the game ends. Or maybe trophies!

    Thanks for giving it a whirl :)
  • edited
    @Kixie: I'm not frustrated with you, just frustrated at the hoops I need to jump through to get the thing to run. I've got 20+ other games that aren't as tricky (barring the odd installer) and turnaround time is a big deal. You'd have gotten a metric ton of complaints if you'd entered something into the IGF this way ;)

    I mean, ease of getting into a prototype is going to have a huge impact on the amount of feedback you get on a new game. While I can understand the elegance of just giving people code, you have to factor in how much schlep it's going to be for them to get everything running properly. What do Mojang do to give people an executable for Minecraft? Why not just include a batch file to run the game correctly?
  • dislekcia said:
    [quote=Thaumaturge]Do indeed treat the .jar file as an executable. Unzip the contents to the folder of your choice.
    Wat?

    I really don't want to have to set up my environment variables and all that bullshit. *sigh*[/quote]
    Argh, I meant "do indeed treat the .jar file as an archive", I believe -- sorry about that! >_<;

    (I didn't have to set any environment variables. I don't think that I had to do anything other than what I described. o_0)

    However, I take it that you have it working now? I hope so, and if so then the above is intended just to clarify.
  • Yes, I got it working. Extracting the .jar didn't do shit, other than spam the same errors the original source had.

    @Kixie's "java -jar HostageSituation.jar" worked, but only after setting up the path environment variable on my XP machine to point to where Java was installed. Without the correct path settings, opening a random console and typing "java <X>" does sweet diddly.

    After all that, game still uses mouse position. Can't really qualify it for Comp D :(
  • edited
    Regarding running the game, that's strange -- perhaps it's a difference between the Windows runtime and that on Ubuntu, or perhaps I have the appropriate addition to my path variable already, either pre-installed with Ubuntu or by some other program. *shrugs*

    As to the mouse position, yeah, I was a little worried about that... : /
  • @Kixie
    It worked right of the bat for me...although I have not played your game yet, will give it a go later this evening. I even installed a clean copy of Windows on a virtual machine, downloaded the JRE and it worked.

    If you do need to wrap it in a executable you could use Launch4j:
    http://launch4j.sourceforge.net/
    It nice and easy, it has a GUI, just specify your jar, output exe and minimum JRE version and you are pretty much set to go.

    Another one is:
    http://www.jwrapper.com/
    It is a bit more involved but a nice thing is you can specify an online update directory. The launcher will check for the latest version of you application using the update URL. I had to increase my heap memory to get it working as it pulls in offline JRE installs for different operating systems, eventually the following worked:
    -Xms256m -Xmx512m


    @dislekcia
    If I am not mistaken @Kixie did mention this was for a varsity project which needed to completed first and withdrew from the competition.

    Unfortunately, I'm a third year varsity student with a prototype deadline looming, so I won't have the time to rework this without, well, failing :D I will have to gracefully bow out of the competition. Not too gutted - for me this was really about participating and getting feedback on my first game attempt.
    Thanked by 1Kixie
  • @ditsemto: Yeah, I thought it might have been updated since then though. Plus I prefer to give the benefit of the doubt most of the time :)

    Thanks for those executable wrappers, will throw those at future Java source projects here from now on.
  • @dislekcia: Glad to hear it can be of help for others as well. :)

    @Kixie
    Solid re-interpretation of minesweeper, good job.
    Enjoyed the hostage time bomb aspect. Did find myself once waiting for the timer to run out to see who would blow up...dunno if that is such a good thing. I am in two minds whether or not the timer should give you some type of indication as to the hostage that it will blow up, so that you can at least work your way towards the hostage? Perhaps a bonus item that temporarily shows which time bomb a hostage is strapped too.

    On the other hand, it is quite intriguing not knowing, so that once you get to a hostage it might not have been the time bomb you were hoping for and you are still left with the one with the least amount of time.

    All in all great game. Hope you get some good marks for this one!
  • @disemto: thank you so much for pointing me to some tools!! I really struggled with whatever it was I was trying to use before - jsmooth or something. Hopefully, what you've recommended will work out better. I'll give it a shot once I get out from under this pile of work and actually get more than 5 hours sleep in a night!

    I like your power up idea. It could be a good way to end up experiencing both possibilities (i.e. knowing vs hoping). I'll let that percolate in the back of my mind and see what comes out.

    Cheers for the feedback and for the technical tip :)
  • @disemto: oh, and thanks for doing the VM/JRE installation thing, only just read that. I was hoping I might be able to get the game to reach a handful of people for whom it would be easy to run, as it was all I could get to. So I'm very lucky someone took an extra step and got me that bit of extra feedback. Appreciation!
Sign In or Register to comment.