Results 1 to 7 of 7
  1. #1
    cawthorne is offline Member
    Join Date
    Jan 2012
    Posts
    4
    Rep Power
    0

    Talking MY JAVA GAMES! MasterMind, Reversi, Tetris, MineSweeper etc! Ideal for beginners!

    Finally back from the Megaupload takedown! New Pastebin Links!

    Hi there! I started learning Java last September (2011) in school and for practice I have made some console based games. So instead of them just gathering dust I though I'd share them, because they're not terrible and feedback is always nice :D (also they may help beginners if they want to analyse my code :))

    Make sure to change the class name to fit the one you're running in if you're using an IDE (such as eclipse), otherwise it won't load :).

    1) First up is Tetris Beta! It isn't fully working, but I won't have the time to finish it until July (Exams), so I though I'd upload what I have done so far! NOTE: You cannot flip the tiles, but you can clear a row!

    Download .jar:

    Download Source code: import java.awt.*; import java.awt.event.*; import javax.swing.*; public - Pastebin.com

    Game info(not that anyone will need it for this one!: Tetris - Wikipedia, the free encyclopedia

    2) Secondly it is my first ever game in GUI and most of you can probably play it right now with just a quick search in your games fold :P. That's right its MineSweeper! I'm still improving this, but it is in a working state now at least :). Still need to add flagging......

    NOTE: You can change the size of the board too what every you want by changing the int n and int m global variables (it must remain a square though, e.g. n= 20, m = 20 i.e. 20x20). Same goes for the number of mines by changing the int nomines global variable!

    Download .jar: Coming

    Download Source code: import java.awt.*; import java.awt.event.*; import javax.swing.*; public cl - Pastebin.com

    Link to MineSweeper info: Minesweeper (video game) - Wikipedia, the free encyclopedia

    I have to say the algorithm to get it to fill out all of the spaces with no mines etc. was challenging :). Once I found out about the recursion method though it was easy as pie! This is where you can call a method from within its self (do another iteration) with new perimeters AND it will go back to how it was before it was called once its done. Before I knew you could do this I was creating another method to control the recursions (iterations) and it was getting very complicated as I had to save to previous x/y values for EVERY iteration and then get it to reuse them when it finally got back to that iteration (so you can't overwrite them (sometimes it can have 10,000+ iterations!) :). - Still good fun though!

    3) Next up is a game i've loved since I was a kid and was my first complex creation 'Reversi', otherwise known as Othello. It is a board game, which I made into a java app. The hardest part here was to get to check for invalid positions and also to flip the tiles (which I'm fairly certain is does properly now!)

    Download .jar: Coming

    Download Source code: import java.io.BufferedReader; import java.io.IOException; import java.io.Inpu - Pastebin.com

    Link to Othello/Reversi info: Reversi - Wikipedia, the free encyclopedia


    4) Next up is 'MasterMind'! A fairly straight forward, code cracking based game, which is also very challenging :). The hardest part when it came to creating this was probably creating the logic to check how close you're guess was, but since I'm always improving it seems pretty simple now :P.

    Download .Jar: Coming

    Source Code: import java.io.BufferedReader; import java.io.IOException; import java.io.Inpu - Pastebin.com

    Link to MasterMind info: http://en.wikipedia.org/wiki/Mastermind_(board_game)


    5) Next up is my simplest game, a 'Reaction Tester'! (Does what it says on the tin). Even though this is my simplest game, with two difficulties, it also proves to be my second most popular after Othello/Reversi.

    Download .Jar: Coming

    Source Code: import java.io.BufferedReader; import java.io.IOException; import java.io.Inpu - Pastebin.com


    6) Finally it is my first every game, that I made in Java 'NumberGuessing game' :). At the time it seemed incredibly complicated, but now it seems far too simple. But don't be fooled by the dull name, it is pretty entertaining with a two player option, where you and a friend compete to guess your own mystery number first with 'warmer', 'colder' clues :D.

    Download .Jar: Coming

    Source Code: import java.io.BufferedReader; import java.io.IOException; import java.io.Inpu - Pastebin.com

    Got any ideas for more games!?!?! Leave a comment/P.M. me and I'll get right on it! (as long as it isn't insane :P).

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,202
    Rep Power
    19

    Default Re: MY JAVA GAMES! MasterMind, Reversi, Tetris, MineSweeper etc! Ideal for beginners!

    For the second time I've moved a post of yours from the Applets forum. It appears that all you want to do is advertise and don't even check back for responses. That's not in line with the purpose of a forum.

    The next time you post an advertisement in the Applets or any other technical section of these forums, you will be banned as a spammer.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    cawthorne is offline Member
    Join Date
    Jan 2012
    Posts
    4
    Rep Power
    0

    Default Re: MY JAVA GAMES! MasterMind, Reversi, Tetris, MineSweeper etc! Ideal for beginners!

    Quote Originally Posted by DarrylBurke View Post
    For the second time I've moved a post of yours from the Applets forum. It appears that all you want to do is advertise and don't even check back for responses. That's not in line with the purpose of a forum.

    The next time you post an advertisement in the Applets or any other technical section of these forums, you will be banned as a spammer.

    db
    Well excuse me!

    Firstly I'd line to say im sorry for posting in the wrong section, but I did check back for responses quite often for the first month after posting my last one, and they were none! In the end I decided to let the instant email subscription option do the work for me!

    Secondly the only reason I did repost this again, but with more of my games with source code was for ONE reason. It was because I got an email from a member here asking me to fix the links on the old thread, because the file haring website which I had used 'Megaupload' had since been taken down!

    Thirdly, the reason why I did start a new thread and not just edit the previous one is because there is no edit original post button to be seen! If there is I'm sorry, but it is posted in the least obvious place of any forum I have been apart of, since I actually looked for one for about 5 minutes in disbelief!

    Fourthly it was a while ago, since I posted the last one and I'm sorry, but I forgot where the correct forum was, since I never actually nagivated to the old one after I posted it in the last section, but used a link. And when you come to this forum as a non frequent member (infrequent because there seems to be not a lot going on), the 'wrong' place I posted in seems to be the most logical place to post what I've got to share.

    Lastly I think it Is obsurd that you would suggest that all I want it advertisement! Again I only did this via request an I have put a lot of hard work into these. If I'm honest I'd rather not share the result of many hours of my productivity, just so it can essentially be copied. Also don't you think if I was looking for advertisement I would have upload the .jar files so people can experirnece my work more easily? But no I only linked to the source code at first, because I knew that would be the more useful and benificial option to a programming community. Not even mention that all this is doing is taking away from me, I'm not getting any form of money! If anything it might be getting the tiniest bit more traffic to your site!

    But don't worry I shan't bother next time I feel like possibly helping a dead beat java community, some of which are still learning and may need some form of help, not if all I'm going to get is a presumptuous threat and no appreciation, especially from a Mod!

    /Rant.

    Ps written on my iPhone, so please excuse any misspellings or random words (the iPhone can have a mind of its own!) :P.

    Also yes I can see an edit post button on this post, but still not in the old thread. Is there a policy whereby you cannot edit posts after they're a certain amount of time old?
    Last edited by cawthorne; 04-13-2012 at 11:06 AM.

  4. #4
    jgh40 is offline Member
    Join Date
    Jun 2013
    Posts
    2
    Rep Power
    0

    Default Re: MY JAVA GAMES! MasterMind, Reversi, Tetris, MineSweeper etc! Ideal for beginners!

    I have come up with a method to package one of these games for FreeBSD. I have done MasterMind, or MM. As part of the package, it builds and installs a compiled jar and uses a shell script to execute the jar.

    I can do the same for all of these games, but was wondering if you would be interested in putting this code into a versioned tarball and having the code within it. For example.

    Download MM-0.1.tar.gz or MM-0.1.zip
    Within that is a directory: MM-0.1
    and under this is
    MM.java.

    Or Download JavaGameSuite-1.0 all of them in one subdirectory.

    Any thoughts?
    Last edited by jgh40; 06-12-2013 at 07:49 AM.

  5. #5
    cawthorne is offline Member
    Join Date
    Jan 2012
    Posts
    4
    Rep Power
    0

    Default Re: MY JAVA GAMES! MasterMind, Reversi, Tetris, MineSweeper etc! Ideal for beginners!

    Quote Originally Posted by jgh40 View Post
    I have come up with a method to package one of these games for FreeBSD. I have done MasterMind, or MM. As part of the package, it builds and installs a compiled jar and uses a shell script to execute the jar.

    I can do the same for all of these games, but was wondering if you would be interested in putting this code into a versioned tarball and having the code within it. For example.

    Download MM-0.1.tar.gz or MM-0.1.zip
    Within that is a directory: MM-0.1
    and under this is
    MM.java.

    Or Download JavaGameSuite-1.0 all of them in one subdirectory.

    Any thoughts?
    That's cool that you have done something with my code! I'm not really familiar with this tar business. It was my understanding that it was just a different way to distribute your code? If you want to repackage it to make these work on the FreeBSD OS feel free and I will add the links :). But as I say I like programming, but I don't really share my projects much, so don't bother with this stuff usually :P.

    If you have any more cool ideas or want my input freel free to reply :). I only ask that if you do post my games elsewhere just mention my name 'Greg Cawthorne' and maybe link to this thread :).

  6. #6
    jgh40 is offline Member
    Join Date
    Jun 2013
    Posts
    2
    Rep Power
    0

    Default Re: MY JAVA GAMES! MasterMind, Reversi, Tetris, MineSweeper etc! Ideal for beginners!

    Quote Originally Posted by cawthorne View Post
    That's cool that you have done something with my code! I'm not really familiar with this tar business. It was my understanding that it was just a different way to distribute your code? If you want to repackage it to make these work on the FreeBSD OS feel free and I will add the links :). But as I say I like programming, but I don't really share my projects much, so don't bother with this stuff usually :P.

    If you have any more cool ideas or want my input freel free to reply :). I only ask that if you do post my games elsewhere just mention my name 'Greg Cawthorne' and maybe link to this thread :).
    I did post them, and committed them to a svn code repository found here, that you can commit to if you give me your login for sourceforge ( you need to create one ):

    https://sourceforge.net/projects/javagamessuite/

    I made a distribution file of the code (available for download at sourceforge) so it can be built and compiled and you can see the buildlogs here:
    swills other Tinderbox - java-games-suite

    Additionally, I have posted the jars compiled here. Please let me know if they work or not.
    Index of /~jgh/files/jars/

    Thanks!
    -jgh

  7. #7
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,939
    Rep Power
    8

    Default Re: MY JAVA GAMES! MasterMind, Reversi, Tetris, MineSweeper etc! Ideal for beginners!

    Shameless self promotion: I also offer free hosting for Java games (in fact you can specify your own ad codes to hopefully make some money) at Static Void Games.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Replies: 1
    Last Post: 01-15-2012, 02:50 PM
  2. Java Tetris 1.0
    By levent in forum Java Software
    Replies: 1
    Last Post: 01-07-2012, 08:07 AM
  3. Replies: 7
    Last Post: 12-11-2011, 09:06 AM
  4. Mastermind Java Code
    By TriSBR in forum New To Java
    Replies: 3
    Last Post: 11-03-2011, 07:40 PM
  5. Normal tetris transform to Tetris with MVC.
    By kuburoman in forum Advanced Java
    Replies: 1
    Last Post: 04-24-2011, 10:53 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •