Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: Easiest way to do this?

  1. #1
    Junior Member
    Join Date
    Oct 2012
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Easiest way to do this?

    I've spend quite some time working on multiple games, all pretty much up to scratch on the development side of things, but i just want to add some prosthetic things, and one thing that i'm determined to add, i actually don't know the specific name for it, but it has the same job of a splash screen but it loads inside the gui, example... (This has been created using photoshop.)

    When you open the game for 5-10 seconds you will see this:


    Then after 5-10 the game will show...

    EDIT: Can i simply do this, by drawing an image, then removing?

    Example:
    My Game updates every 5 milliseconds
    so:
    Timer startUpTimer;
    boolean startupready = false;
     
    if(startupready == false && startUpTimer < 5000) {
    callImage
    startUpTimer = new Timer(5000, this);
    startUpTimer.start();
    } else if(startUpTimer >= 5000) {
    startupready = true;
    startUpTimer.stop();
    callnormalstartup.
    }

    or something along those lines, even though thats really badly writen...


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Easiest way to do this?

    Quote Originally Posted by Jerba View Post
    EDIT: Can i simply do this, by drawing an image, then removing?

    Example:
    My Game updates every 5 milliseconds
    so:
    Timer startUpTimer;
    boolean startupready = false;
     
    if(startupready == false && startUpTimer < 5000) {
    callImage
    startUpTimer = new Timer(5000, this);
    startUpTimer.start();
    } else if(startUpTimer >= 5000) {
    startupready = true;
    startUpTimer.stop();
    callnormalstartup.
    }

    or something along those lines, even though thats really badly writen...
    What happened when you tried that?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: Easiest way to do this?

    I would browse the SplashScreen class and the tutorial on creating a splash screen. Even if this is not what you want to do, perhaps it will give you an idea of how things are done.

  4. #4
    Junior Member
    Join Date
    Oct 2012
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Easiest way to do this?

    Yeah, i wrote a custom version of the splash screen class, and tried to apply it to an ImageIcon, but it didn't print out the picture at all...

  5. #5
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Easiest way to do this?

    Quote Originally Posted by Jerba View Post
    Yeah, i wrote a custom version of the splash screen class, and tried to apply it to an ImageIcon, but it didn't print out the picture at all...
    If you want help, I'd recommend throwing together an SSCCE demonstrating what you've tried, and we'll go from there.

    Also, just for future reference, using more descriptive post titles is probably a good idea. I almost skipped over this post because the title is too generic (and now that it has replies, most people will do the same). But if you had made the title something like "Easiest way to implement Splash Screen", more people interested in topics such as game development are more likely to check out your post.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  6. #6
    Junior Member
    Join Date
    Oct 2012
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Easiest way to do this?

    Okay, right thanks. i'll remember to add more description in my titles as well thank-you for the feedback.

Similar Threads

  1. What is the easiest way to change a single character in a string?
    By Jumbosize in forum Java Theory & Questions
    Replies: 2
    Last Post: April 26th, 2012, 04:16 PM
  2. This might be the easiest thing to solve.
    By tn12llmark in forum Object Oriented Programming
    Replies: 1
    Last Post: November 2nd, 2011, 07:49 AM
  3. Replies: 2
    Last Post: September 16th, 2011, 03:32 PM
  4. Easiest transition from VBA?
    By Milothicus in forum Java Theory & Questions
    Replies: 1
    Last Post: June 12th, 2010, 03:30 PM