943,936 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 3302
  • Java RSS
Nov 26th, 2007
0

Sokoban game help needed (java)

Expand Post »
Hi,

I'm trying to make my own sokoban game in java.

Sokoban is a top down 2D puzzle game where you move around a level trying to push boxes to the goal area in the least possible moves.

I'm already pretty stuck at an early stage. My first objective it to load an image and be able to move it around with the arrow buttons on my keyboard.

Does anyone know how to do this.

I have a .bnp image that I want to use for the character.

Next i want to load in images for walls and boxes and the goal area and create conditions so that my character can't walk through the wall and so he'll be able to push the boxes around the map.

I'd really appreciate any help I could get. An example of using the arrow keys to move a small .bnp image around an large JFrame would be greatly appreciated.

Thanks
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mrsmoke is offline Offline
2 posts
since Nov 2007
Nov 26th, 2007
0

Re: Sokoban game help needed (java)

You might want to go through the Space Invaders 2D game tutorial on this site: http://www.cokeandcode.com/
Moderator
Featured Poster
Reputation Points: 3239
Solved Threads: 839
Posting Genius
Ezzaral is offline Offline
6,761 posts
since May 2007
Nov 26th, 2007
0

Re: Sokoban game help needed (java)

Cool thanks!!!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mrsmoke is offline Offline
2 posts
since Nov 2007
Nov 29th, 2007
0

Re: Sokoban game help needed (java)

If you would like to implement an algorithm that tries to solve a problem have a look at this:

Java N Puzzle - heuristic search algorithms
Last edited by schoolsoluction; Nov 29th, 2007 at 9:20 am.
Reputation Points: 30
Solved Threads: 3
Light Poster
schoolsoluction is offline Offline
27 posts
since Sep 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: java strategy game
Next Thread in Java Forum Timeline: eclipse configuration for application server





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC