File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Game Development and the fly likes Need logic  for   this game. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Game Development
Bookmark "Need logic  for   this game." Watch "Need logic  for   this game." New topic
Author

Need logic for this game.

Praveen Kumar
Ranch Hand

Joined: Nov 06, 2006
Posts: 133
Hi All,

I need a logic/algorutham for the specification which is mentioned below

Purpose:
● The goal of this exercise is to develop a JAVA puzzle game which is a "variation" of the
Tetris game.
● We are interested in seeing your code writing skills, style and logic.
Don't hesitate to comment on your code in order to make it as clear as possible.
● The purpose of this exercise is purely a skill assessment, and gameplay implementation
ability.
Rules of Game:
● there a 5 different Elements, each with one specific color (so 5 color)
● Element pair are created every X milliseconds, X decrease every 2 minutes of gameplay
X = 2sec at beginning of the game
Elements pair appear at random position on the first top line of the Gameboard
they, then, come down from the top until they stack up on top of other Element or on the
Gameboard border
● at the beginning of the game, the Gameboard will be randomly filled with some Element
the number of element is up to you (could be dependent on the level selected by the player)
● the user control a cursor
he can move it up, down, right, left and select an Element which does not move(fixed
Element) (so cannot select an Element from the moving pair)
● when the user select a fixed Element, he can then press one direction (up, down, right, left)
if there is another fixed Element in the adjacent cell in this direction, both Element (selected
one + one in given direction) switch position
● When four Element of same color are connected in a tetris shape, they are removed from the
game board
All Element above those about to be cleared will then fall until they land onto other Element
or border of the Gameboard.
the valid combination of tetris shape are :
● game is over when gameboard is full, and no more Element pair can be added
the game score will be a combination of nb of tetris-shape removed and how long the player
played before he lost
Note:
● this is a speed game the user will be forced to loose at some time
● the control of the cursor is not synced with the creation of a new Element pair, both are
desynchronised event
● in the "res"directory you will find the graphic resources that you can use for this test
To Submit:
● Please submit a java console application that will open a window and start the game.
● You may attach a separate text file that documents player controls and any other comments
(as gameplay improvements, bugs not corrected, any comment that will help evaluate your
submission...)
Important:
● JAVA only
● java console application (not an applet)
● ALL COMMENTS IN ENGLISH


Please give inputs where i can get this ..... help me help me
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

There is no quick answer to this - you are asking someone else to design your software for you (which also appears to be for some sort of assignment). And we are NotACodeMill. What have you designed so far? Where are you stuck? Feel free to ask questions with example of your work. People will help.
[ September 17, 2008: Message edited by: Paul Sturrock ]

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10535
    
    9

Originally posted by Paul Sturrock:
.. you are asking someone else to design your software for you (which also appears to be for some sort of assignment).


If I am not very mistaken this is the first round of your job interview.
I know a company in India, which takes this approach.
You are typically given a problem to solve (like the one posted by the OP)
Once you submit your solution, you are invited for technical discussions regarding your code. Nowhere in this discussion are you asked typical "interview" questions, but you have to sort of undergo a "viva". These technical discussions typically comprise of multiple rounds. The whole focus is on the company trying to gather what you really know and not what you have read in books.

If this is an interview assignment, I would strongly recommend the OP to try and fix it himself, instead of looking for ready made solutions.
At the end, even if you dont land the job, you will surely have gained immense tips and tricks, which are seldom mentioned in any book.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Gavin Tranter
Ranch Hand

Joined: Jan 01, 2007
Posts: 333
Thats a pretty big job interview/assignment.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need logic for this game.