Results 1 to 8 of 8
Like Tree1Likes
  • 1 Post By KevinWorkman

Thread: What to use to create a game?

  1. #1
    Tombomb is offline Member
    Join Date
    Jan 2012
    Posts
    33
    Rep Power
    0

    Default What to use to create a game?

    Is it fairly simple to create a game using an application, or is it like always done with an applet? Thanks for any feedback!

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,993
    Rep Power
    9

    Default Re: What to use to create a game?

    You can use either. Put your game in a JPanel, then you can put the JPanel in either an applet or an application.
    DarrylBurke likes this.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Tombomb is offline Member
    Join Date
    Jan 2012
    Posts
    33
    Rep Power
    0

    Default Re: What to use to create a game?

    Alright, simple enough. Thanks! Also, I have a simple...or so I think it will be a simple issue. I have an application that I run and it's a GUI. When it pops up when I run it, the screen is blank until I resize it...?? Any solutions? I have tried the pack() method but that just makes my window like 50 pixels by about 5...extremely small and doesn't work... =/

  4. #4
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,993
    Rep Power
    9

    Default Re: What to use to create a game?

    Quote Originally Posted by Tombomb View Post
    Alright, simple enough. Thanks! Also, I have a simple...or so I think it will be a simple issue. I have an application that I run and it's a GUI. When it pops up when I run it, the screen is blank until I resize it...?? Any solutions? I have tried the pack() method but that just makes my window like 50 pixels by about 5...extremely small and doesn't work... =/
    Without seeing an SSCCE (that's not your whole program), it's pretty impossible to say what your problem is. But are you adding components to your GUI after it's already visible?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    Tombomb is offline Member
    Join Date
    Jan 2012
    Posts
    33
    Rep Power
    0

    Default Re: What to use to create a game?

    Well, I have attached a zip file with a calculator app I created. When you run the GUI file, all you get is a blank JFrame until you resize it. I have this exact issue with every other app I make. Most of the time it works fine, then something happens in the code and it starts doing that and never goes back. =/ I just don't get it... and yes I do add components after its visible. That's kind of another issue I have too...sorry for coming up with so many but asking has been helping me a lot! I am currently writing a program for my dad to use at his business...the run down of it is this: its a cabinet door making program. You enter in the customer's name, it creates a directory of that name, and Door 1.txt. then, the next screen has a JComboBox which has options "Single Door", and "Double Door". My problem with that is I have instantiated like 12 JLabel's and JTextFields for the single door, which I have appear when "Single Door" is selected on the JComboBox. But, when I select "Double Door" I have those same "Single Door" options appear, plus just one more named "Middle Gap", which is both a label and text field as well. The issue here is all I do when "Single Door" is selected is set the doubleDoorOptions.setVisible( false );, and that worked fine until I got to the point of actually testing the program, because just because the double door options are not visible it's like they are still there just hidden...is there a way to actually take them off or do I have to create a new set of labels and text fields for doubleDoor and singleDoor?

    If that was too confusing, I am sorry. If so, let me know and I will try to explain it better in it's own thread, and if you would still be so kind as to help with the first issue with the JFrame thing?


    - I really appreciate the answers. I just joined this forum like last week and it has been an awesome resource. I love it! Great community!

    Zip Files - Calculator Project.zip
    Last edited by Tombomb; 01-13-2012 at 07:27 PM.

  6. #6
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,993
    Rep Power
    9

    Default Re: What to use to create a game?

    Like I said, without an SSCCE, we can't really help. Many of us can't or won't download attached zip files. It's much better to create an SSCCE and copy and paste it here. Make it as easy as possible for other people to help you, and you'll be more likely to receive better help faster.

    You can't just add components after your gui is already visible. This is a common problem, and without an SSCCE, all I can do is recommend you do a search on these forums or in google.

    For your other issue, I'd recommend checking out CardLayout.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  7. #7
    Tombomb is offline Member
    Join Date
    Jan 2012
    Posts
    33
    Rep Power
    0

    Default Re: What to use to create a game?

    Okay, thanks. Is it worth me posting like 1000 lines of code for an SSCCE? like that can't be fun to look over as someone trying to answer a thread lol.. but I'll definitely hit up google to figure out a different approach, as well as CardLayout. Thanks again

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

    Default Re: What to use to create a game?

    Quote Originally Posted by Tombomb View Post
    Okay, thanks. Is it worth me posting like 1000 lines of code for an SSCCE? like that can't be fun to look over as someone trying to answer a thread lol.. but I'll definitely hit up google to figure out a different approach, as well as CardLayout. Thanks again
    No, an SSCCE should only be a few lines long. Check out the link above for more information.
    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: 06-02-2011, 09:29 AM
  2. Where can I create sound for a computer game?
    By rajkobie in forum New To Java
    Replies: 2
    Last Post: 05-12-2011, 09:07 AM
  3. Replies: 2
    Last Post: 08-05-2010, 04:49 AM
  4. Trying to create a map for a Zuul game using JFrame
    By alpdog14 in forum New To Java
    Replies: 1
    Last Post: 04-18-2009, 12:24 AM
  5. Create the game Hangman
    By barney in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 06:16 AM

Posting Permissions

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