Jump to content
  • Advertisement
Sign in to follow this  
mastersmith98

going forward with java what now?

This topic is 4407 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

so I just got done with a beginning Java programing book and I was wondering were I should go on from there. right now I have a pretty good grasp on what and how object oriented programing works and I know all the basic Java syntax except for the frame and swing stuff. my goal is too be able to start to make a 2d top engine and I know I'll probally have to do something else besides game programing to get there if someone could help me that would be great.

Share this post


Link to post
Share on other sites
Advertisement
Make a program that makes a window that you can minimize, maximize, close (end program).

Make it prompt you "Are you sure you want to quit?" when you close it.

Make a checkerboard in your window when it opens. What are the dimensions of a chess/checker board? How big will the squares be? etc.

Put a single number in the center of each square. 1 2 3 4 5 6....

Remove all the numbers. Make a red checker piece graphic and black checker piece graphic that can fit in a square.

Populate the board, both sides, with checkers.

Make a "highlighted black checker" and "highlighted red checker" graphic.

Add an actionlistener to every checker, to tell when it's clicked...if it's clicked, replace it with the "highlighted graphic"

Now add a series of commands (method) to clear all other highlighted graphics when you click a checker and highlight the checker (so it's the only thing highlighted).
That's the tough one, since you have to have all the checkers in an array or linked list to keep track of them and check them for their status.

Make a "highlighted white square" graphic and "highlighted black square" graphic.

When you click on a square, have it highlight and un-highlight everything else.

Add a method to a checker's actionlistener that says, if the piece clicked can move to a square that's currently highlighted, paint an empty square on top of where the checker is and paint the normal square and normal checker on the highlighted square (now nothing is highlighted).

If you get that far, I'll be impressed.






Share this post


Link to post
Share on other sites
Quote:
Original post by mastersmith98
would it be okay if i used jbuilder ?


doesn't matter. The IDE you use doesn't really matter...

My biggest learning lesson with Java was when I made pong. not only because of the graphics, but because I used tons of OOP.

I made a block class that stored the basic x, y, width, height, and speed. then, I made a paddle AND ball class that was a subclass of block. It really worked well. It's also a bit fun once you get to the part where you have to consider collission detection- and trying to figure out the right algorithim (<- is that the right term i want? :P)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!