A web application is probably one of the worst platforms upon which to build a game (due to the latency of the HTTP request/response cycle), but that didn't stop me. I developed this more to play with JSP 2 and Tomcat 5 than anything else, but it was a lot of fun to work on this -- much different from the drier, business-oriented web apps I usually work on.
Give it a whirl and let me know what you think -- especially if you are familiar with the original Parker Brothers game.
Keep in mind that it is a web application, so I already know it's too slow.
bear
Enter the BlackBox [ September 12, 2004: Message edited by: Bear Bibeault ]
Gregg, it's worth reading the instructions if you are interested in figuring out how the game works. It's always intrigued me since it's such an "engineer's game" (not to mention a good lesson on 'black box' vs 'white box' testing).
Cool game. I'm going to come back and play it more when I get some time. Looks like it has a 'mastermind' feel to it.
I'm a fellow JSP developer, so I like the concept.
Here's a jsp idea i have that could be cool:
A few years ago our customer wanted an instant message interface built into their web app. While analyzing the solution, one thing I tried was where you have an invisible frame in the browser connect to a jsp/servlet, and leave the connection open. This way you can stream dynamic text back to the client as javascript commands, and the browser executes them for you. For example, you would stream text like so:
out.println("<script>"); out.println("var chatText = "hello world"); out.println(/* javascript function to update chatwindow element in other frame */); etc...
In the chat servlet running on the server, we started a loop that monitored a global static chatbean. When a new line of text was added to the chatbean, it would use the open socket to the webpage to send the new line as a javascript function. This way chattext was pushed globally as soon as it was entered.
What I think would be cool would be to have a multiplayer javascript game where you take advantage of this open connection as a means to synchronize the game between clients. The online logic would rest in the servlet, and you could use global beans to communicate game variables between players.
Sure it would be a hack, and you could probably do it better with flash, but it would be neat to try and implement.
I'm lovin the game. Nice way to excercise my brain . I've got two enhancement suggestions for you:
1- When I'm playing the game I often forget how many balls I'd chosen to find. It'd be nice if there was a running count next to my score of how many balls I still need to place. 2- After finishing the game, to start a new game you've gotta go to two screens: click "new game" then select the # balls to find. It'd be nice if you could select the # balls on the final score screen and skip the middle page.
but I know you do not want to use JavaScript since you hate it so much.
Not at all. In fact, I use a fairly extensive amount of Javascript in the game (read the Colophon). Sorry if you got the impression I hate Javascript... what I hate is how it is misused for things better done on the server side.
What types of things do you think would benefit from rollovers? I didn't want things to get too whacky when you waved the mouse around, but I'd certainly consider anything that would improve usability.
Ernest, thanks for the kudos. In a microcosm, my BlackBox implementations are a history of my entire tech career.
Indeed! The 3-ball game is really hard since there is so much empty space and possiblity of "pass-throughs" that give you little information but costs 2 points.
Incidentally, the 5-ball game has the possibility to have configurations that are impossible to deterministically solve.
That's a cool game. I feel inspired but can't think of a board game that would translate to a web platform. [ September 15, 2004: Message edited by: Helen Thomas ]
Which result do think is in error? They look correct.
Helen Thomas
Ranch Hand
Joined: Jan 13, 2004
Posts: 1759
posted
0
How would you explain the hit directly above the red ball if it's real position is indicated by the blue ball.
Unfortunately I submitted my guesses before shooting all rays which is the object of the game to keep the score low. As a result not a lot can be said about the bottom part of the grid.
Its interesting that the reflections provide the most significant information.
Bacon
Ranch Hand
Joined: Jul 14, 2004
Posts: 305
posted
0
Got an 11. I know that's not relevant to game development, but I'm pleased with that score. Is that a good score?
On a more relevant point... What is the best way to get started with game development. It sounds like a lot of fun.
Helen Thomas
Ranch Hand
Joined: Jan 13, 2004
Posts: 1759
posted
0
I go by the hits mainly. I don't trust the relections just yet. But it's an excellent game. I've blog raved about it.
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15362
6
posted
0
start with a simple game eg tic tac toe and learn how to make it. From there you build upon your experiences til you build bigger and better games.
my 2 cents
Eric
Bacon
Ranch Hand
Joined: Jul 14, 2004
Posts: 305
posted
0
Thanks Eric. Do you need change?
Should I bother with GUI right away or is there a simpler way to get to learn the logic portion first?
btw... a new personal best: 9!
An interesting twist on the black box would be to make it truely 3D, a cube. That would be difficult, but really cool. What do think Bear, could you have a prototype ready by next week? [ September 16, 2004: Message edited by: Ray Marsh ]
How would you explain the hit directly above the red ball if it's real position is indicated by the blue ball.
The 'ray' detoured off the green ball in the second-to-last row, and into the ball in the first column.
I've blog raved about it.
Too cool! Might you provide a url?
Its interesting that the reflections provide the most significant information.
It usually takes players a while to relaize that. Congrats!
Should I bother with GUI right away or is there a simpler way to get to learn the logic portion first?
Starting with the model is always a good way to deal with just about any type of app. The model for this implementation is entirely GUI-agnostic and could be used for any UI. Perhaps I should get up off my butt and finish the Swing interface (as if I had the time!)
Bacon
Ranch Hand
Joined: Jul 14, 2004
Posts: 305
posted
0
Originally posted by Bear Bibeault:
...quote: -------------------------------------------------------------------------------- Its interesting that the reflections provide the most significant information. --------------------------------------------------------------------------------
It usually takes players a while to relaize that. Congrats!
aw shucks!
...The model for this implementation is entirely GUI-agnostic...
My degree is actually in theology, but I'm gettin static on this one! [ September 16, 2004: Message edited by: Ray Marsh ]
Helen Thomas
Ranch Hand
Joined: Jan 13, 2004
Posts: 1759
posted
0
Bear you must be getting a lot of PM's. Your box is full. It was on my blog actually with a readership of one and family. The latter also think that Wonderland(Stinky & Loof) from http://www.BigFishGames.com is terrific. They have some free trial-sized games but probably not done in Java. Downloadable so fast. Though speed hasn't been an issue with me with BlackBox.
I remember when i was young, my sister had the game. Your interface is spot-on with what i remember... the orange plastic pieces with the shapes cut out look great!!!
What might be useful as a teaching tool is after the player submits their guess and you tell the how you did, you could draw in the rays that don't work with their ball pattern, showing them where they made a mistake.
Yes, they could probably figure it out on their own, but sometimes (just like with code), you're so locked into what you BELIEVE is correct you can't see what IS correct...
Overall, an EXCELLENT re-creation... [ October 11, 2004: Message edited by: fred rosenberger ]
Never ascribe to malice that which can be adequately explained by stupidity.
Ray Marsh
Ranch Hand
Joined: Jan 12, 2000
Posts: 458
posted
0
so... fred... where's your shameless grab for bragging rights? an experienced sage like yourself should be in the hunt for the prize.
please notice that i typed all in lower case so you can understand. [ October 11, 2004: Message edited by: Ray Marsh ]
Your interface is spot-on with what i remember... the orange plastic pieces with the shapes cut out look great!!!
Thanks! But I can't take credit for the artwork of the 3-D theme. I lent my physical copy of the game to Jay Barnes who renderred the graphics for me. I will take credit for driving the effort to make it as realistic as possible.
What might be useful as a teaching tool is after the player submits their guess and you tell the how you did, you could draw in the rays that don't work with their ball pattern, showing them where they made a mistake.
Yeah, that's on my possible future features list. Not so easy to do in the web environment, but certainly a worthwhile feature.
Originally posted by Ray Marsh: so... fred... where's your shameless grab for bragging rights? an experienced sage like yourself should be in the hunt for the prize.
I never said I was any GOOD at the game - just that my sister HAD it. I don't think I've seen the game in 25 years, let alone played it.
please notice that i typed all in lower case so you can understand.
I made a special effort for you, Ray, to use proper case in this post. If anybody is wondering what this is all about, see THIS thread.
Ray Marsh
Ranch Hand
Joined: Jan 12, 2000
Posts: 458
posted
0
I saw that thread before, hence the reason for the good natured barb.
I do appreciate the mixed case effort, however, it is unnecessary since I am bilingual!
Ok...I placed all the balls and got the message You have no remaining guesses to place....you may submit now...
I clicked on "Submit Guesses". The board is cleared, the score became zero and the Messages window displays Welcome to the ...., as if a new game has began.
Then I clicked on a empty space in the grid, the Messages window says You have already made the maximum number (4) of guesses. Please remove guesses before trying to make any more.
Am I missing something? [ October 14, 2004: Message edited by: Mani Ram ]
Mani, sounds like a problem with running some of the JS. Could you send a problem report including your precise browser info to the e-mail address on the game?