Reply
Urgent Help Required!!
Old 03-27-2008, 06:00 AM Urgent Help Required!!
onlyyourspiyu's Avatar
Skilled Talker

Posts: 92
Name: Piyush Agarwal
I need some guidance or help urgently....

I have to design a Online Gaming Site where 2 players can play against each other. The site needs to be based on JSP....

For the site I need to design a game most of would be familiar of....its "Tic-Tac-Toe"....The game should enable two players to play against each other real time online...The game is reqd to be designed with the help of AJAX...

i have the basic knowledge of AJAX but am getting no clues how to start designing the game....

Please help me out....as this is a part of my DegRee Project and its completion is vital...Thank
__________________
I Design..I Create!!
SEO, Marketing, Ads, Freebies & lot more! Your WebBuddy <<must see>> RSS
onlyyourspiyu is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 03-27-2008, 09:40 PM Re: Urgent Help Required!!
willcode4beer's Avatar
Webmaster Talker

Posts: 630
Name: Paul Davis
Location: San Francisco
To get started, break the problem up into smaller parts.
Live tic-tac-toe on the web (ajax/jsp), what do you need?
  • a page to render the game (html)
  • a way to call the server when you make a move (ajax)
  • code on the server to receive the move (servlet or jsp)
  • code on the server to detect a winner (servlet or jsp)
  • code to let the other user know it's their turn (servlet or jsp)
  • code to render the other player's move (javascript/DOM)
So, take these one by one. If something is too complex, break it into smaller pieces. Try to break everything into pieces so small they become trivial.

It goes without saying, no one is going to do your homework for you but, we will offer help and guidance. And if you make an honest attempt to solve the problem, we will help you fix problems in code and help you to understand the concepts needed.

BTW, Please make the title of your post indicative of what the post is about. Stuff like "Urgent Help Required" is likely to be ignored. A title like, "need to find starting point on a project" is more likely to be looked at.
__________________
Paul Davis
willCode4Beer.com (coding for all the right reasons)

Last edited by willcode4beer : 03-27-2008 at 10:03 PM.
willcode4beer is offline
Reply With Quote
View Public Profile
 
Old 03-28-2008, 12:18 AM Re: Urgent Help Required!!
onlyyourspiyu's Avatar
Skilled Talker

Posts: 92
Name: Piyush Agarwal
Thanks paul....

I have already broken the project into the small peices you mentioned already...
I can handle html easily and am currently learning JSP/Servlets....AJAX also a little bit...

But what I am not getting is where should I start from....

Like for the game, should I have a 3x3 table designed to represent the game board?

I know I need to have a JAVA array to save the moves but how to implement it at the table...

AJAX will come in picture a bit later but will it be used only to send moves to the server or I think it will also be required to display the move on the screen of both the players...

I dont want and not expecting you to do my homework....just show me the way and I will do the travelling...

Thanks a lot for helping....

P.S. - I cant find a option to change this thread's title now....
__________________
I Design..I Create!!
SEO, Marketing, Ads, Freebies & lot more! Your WebBuddy <<must see>> RSS
onlyyourspiyu is offline
Reply With Quote
View Public Profile
 
Old 03-28-2008, 11:56 AM Finding a Starting Point
willcode4beer's Avatar
Webmaster Talker

Posts: 630
Name: Paul Davis
Location: San Francisco
Since you've broken the project into small pieces, let me offer an option based on what we do with agile projects.

Get some index cards. On each card write down one component to be built. Put the cards in order of importance.

Now, grab the first one and work on that. If it depends on other things, just fake the dependencies. When you fake a dependency, be sure to mark the card that represents the dependency so you remember to connect to the real thing later.

The key is to get some working code as quickly as possible, even it it is very minimal. Being able to poke something real that works is much more useful than playing with ideas.

From your questions, I think you feel a little overwhelmed and are running into coders-block (writers block for coders).

The trick out of this is to get moving, get some momentum. So, start easy, make a stupid ugly html table with a button in each cell. Don't worry, you can make it pretty later. The key thing here is to write something.
Do this today, no matter how bad it looks. Get it done.

Next up, make a command line version of you tic-tac-toe. Don't worry about displaying a grid. Just be able to send moves (maybe something like: b2,c3,a1,...) and detect when someone has won. Be sure to use a separate class to deal with the commandline interaction.
This is your weekend homework

After you have a command line version that works, write a servlet that replaces the command line interface. The rest of the game code should be unchanged.
Monday's work

Last, connect the 2 with your ajax calls.
After that, just explore idea, polish your web page, and think of other ways to improve.
__________________
Paul Davis
willCode4Beer.com (coding for all the right reasons)
willcode4beer is offline
Reply With Quote
View Public Profile
 
Old 03-31-2008, 08:39 AM Re: Urgent Help Required!!
onlyyourspiyu's Avatar
Skilled Talker

Posts: 92
Name: Piyush Agarwal
Index cards is surely a good idea....will incorporate that....

Could not get into working this weekend because I had a JAVA online assessment today. It went quite ok...

Will kick Start with the Tic TAc Toe, basic class design tomo...

Catch ya later....thanks....gotta go!!
__________________
I Design..I Create!!
SEO, Marketing, Ads, Freebies & lot more! Your WebBuddy <<must see>> RSS
onlyyourspiyu is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Urgent Help Required!!
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13557 seconds with 13 queries