aspose file tools*
The moose likes Game Development and the fly likes The Black Box: Reloaded Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Game Development
Bookmark "The Black Box: Reloaded" Watch "The Black Box: Reloaded" New topic
Author

The Black Box: Reloaded

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

A while back I posted a link to my online game, Black Box. It's had a bit of a technology update (but no new user-visible features). Anyone interested please visit The Bear Den (see link below) for details.
[ May 11, 2005: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

That's much better. Good work Bear.


GenRocket - Experts at Building Test Data
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
After I get done with my book(s) I want to make a multiplayer game. I can hear my server crashing already!

Eric
Pauline McNamara
Sheriff

Joined: Jan 19, 2001
Posts: 4012
    
    6
Nice.

Sooooo... if you wanted to hook it up to a Flash GUI? Interesting to explore for sure.

Actually, you could do something like this with a Flash-only implementation. But since you have it all there already...
[ May 13, 2005: Message edited by: Pauline McNamara ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

The servlet->JSP API is well-defined since I use scriptless JSP pages, but it is certainly geared towards JSP 2.0. Being Flash-impaired I'm not sure how well suited it would be to a Flash interface.

The "business logic" layer, which implements the game logic, is completely UI-agnostic and could be layered upon to maintain the server-side state.

Pauline, could you fill me in a little on what servlet<->Flash interaction entails?
Pauline McNamara
Sheriff

Joined: Jan 19, 2001
Posts: 4012
    
    6
Something called Flash Remoting is the usual go-between for Flash and servlets. It gives you the serialization/deserialization you need for Java and ActionScript objects to be understood on either end. (ActionScript is Flash's scripting language.)

My limited experience with Flash Remoting has been with Flash and PHP, but in general it likely works the same way. It gets you a gateway on your server that your Flash app sends it's requests through and gets it's responses back through.

Here's an article that explains some of the mechanics (a bit dated but the old ActionScript syntax doesn't break it as an overview): Flash Remoting for J2EE Developers.

Nowadays another approach called Flex is all the rage, but it's big price tag limits it to big commercial projects. Flash Remoting is also not cheap, but there are open source alternatives (openamf, for one), or if you're using Cold Fusion or JRun I think it's included.

How's that for starters?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I still suck at this game!
Ali Gilani
Ranch Hand

Joined: Mar 01, 2002
Posts: 137
IS this game an applet? usually my mozilla browser freezes for a sec, when loading applets, yet there was no such delay while loading this game.

Secondly, excellent work. Very impressive game however i think there is a problem with the game, i tried to guess the positions of 5 balls, after i had made my choice, i clicked on submit, which merely refreshed the board . I spent 10 min guessing and then a new board??? why is that?

Ali
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

IS this game an applet?


No. It's a Servlet/JSP web application. Read the colophon if you are interested in how it works.

merely refreshed the board


Without showing you your score and results? I've never seen this happen. Does it happen all the time for you?
Ali Gilani
Ranch Hand

Joined: Mar 01, 2002
Posts: 137
Read the colophon if you are interested in how it works.


what colophon?


and how did u make the graphics? did u use maya, 3d studio max??

whats a good book to learn jsp/servlet?



Ali
[ June 15, 2005: Message edited by: Ali Gilani ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

what colophon?


There's a link near the bottom of the Welcome Page, and also one at the top-right of the Game page (right under the User's Guide link).

and how did u make the graphics? did u use maya, 3d studio max??


The graphics for the 3D theme were made by Jay Barnes, a web designer that I work with on occasion. I'm not sure what tools he used to create them. I know he does amazing things with Photoshop, but I've seen him use other tools as well.

whats a good book to learn jsp/servlet?


Check out the JavaRanch Bunkhouse for recommendations.
Ali Gilani
Ranch Hand

Joined: Mar 01, 2002
Posts: 137
could u ask barnes then? and let me know?

also although i have not learn jsp yet but will learn within a month or so, after then if i have questions regarding ur programming would u care to help??

Also could you tell me about XmlHttpRequest, and CSS


Ali
[ June 16, 2005: Message edited by: Ali Gilani ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

could u ask barnes then? and let me know?


I talked to Jay last evening and asked him then. He said that he used a combination of Cinema 4D XL and Photoshop to render the graphics.

also although i have not learn jsp yet but will learn within a month or so, after then if i have questions regarding ur programming would u care to help?


Of course. That's exactly what our JSP and Servlets forums are for.

Also could you tell me about XmlHttpRequest, and CSS.


These are good subjects for the HTML/Javascript forum.

In a nutshell, XMLHttpRequest is a Javascript object (or ActvieX object for IE) that allows you to make asynchronous requests back to the server under Javascript control. When the request returns its response, a Javascript handler is called to process the content of the response. Because this operates "under the covers", the page itself is not refreshed and you use client-side DOM manipulation to make changes to the page as appropriate.

BlackBox uses it to send the game "moves" back to the server, which computes the results of the "move" and send that data back to the page. Javascript objects on the page evaluate the returned data and make the appropriate changes to the "game board". This way, the page need not be refreshed after every move (which caused a white flash between moves that was very distracting and disconcerting), but still allow the computations to be performed on the server, as well as keeping the game state up-to-date on the server.

[ June 16, 2005: Message edited by: Bear Bibeault ]
[ June 16, 2005: Message edited by: Bear Bibeault ]
Ali Gilani
Ranch Hand

Joined: Mar 01, 2002
Posts: 137
Can the same game be made into pure 3D, allowing the users to see the board the and pieces from any angle and actually move the camera around?

could jsp/servlet technology manage that?

and what program will be used to make the graphics for that( could u ask barnes then) i dont think photoshop can make 3d graphics. or can java3d or openGL manage the graphics?


Ali
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

JSP and servlets would not be an appropriate technology choice for such a system.
Ali Gilani
Ranch Hand

Joined: Mar 01, 2002
Posts: 137
so what would be an appropriate system?


why wouldnt jsp/ servlets work?


Ali
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

so what would be an appropriate system?


I would start a new topic in this forum on just that subject. Otehrs might have some good ideas -- it is not my area of expertise.

why wouldnt jsp/ servlets work?


JSP and Servlets live in the world of the HTTP protocol -- where the browsers send a request, and the server sends a response (usually HTML) back. Not very well suited to 3D interactivity. It's barely suitable for a game like BlackBox.
Ali Gilani
Ranch Hand

Joined: Mar 01, 2002
Posts: 137
i posted the question on the Sun forums, and they say that an applet is the best way to go. what do u think?

Ali
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

Again, not really my area of expertise. Having never written an applet, I'm not sure what restrictions it places on your java classes.

I'd start a new topic describing what you want to do, and those more familiar with the genre may have some ideas.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: The Black Box: Reloaded