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 10 of 10

Thread: JAVA game development issue

  1. #1
    Junior Member
    Join Date
    Jan 2013
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default JAVA game development issue

    hello!
    first of all, I am making a game.
    the game is 2D and a simple side-scroller.
    the problem is, that i want to make menu's. and i dont have a clue how. i mean, how to make the main menu, (I know how to make listeners and button listeners)?
    and another important thing, is the menu bars- like a bar with icons, inventory, stats, skills etc, i dont know how to make them.
    do i have to learn threading for that? because i thought maybe i'll make another program, with the menu, and when i click something it calls another main(String args[]).
    I also thought about making it manually- setting visibility for all paint components objects, making a few buttons, setting the fps on 0, and on click I make paint component objects visible, buttons not visible and fps normal. would that be good? or just an alternative to something better?
    thanks!


  2. #2
    Member angstrem's Avatar
    Join Date
    Mar 2013
    Location
    Ukraine
    Posts
    200
    My Mood
    Happy
    Thanks
    9
    Thanked 31 Times in 29 Posts

    Default Re: JAVA game development issue

    I don't get, why can't you make a menu, given that you know about listeners and your can do a scroller game itself. You just have to create the buttons components, put them on the screen and associate listeners with them. You don't have to do a separate program for that: it's just a regular window (JFrame in case of Swing) with buttons. And windows can be easily created programmatically.
    Concerning the HUD (that bars with icons, inventory, stats etc): here, I guess, a good solution will be to use several graphical layers for your game: one for the game field, another for HUD. And define their updates with time appropriately.
    By the way, what engine are you using for your game?

  3. #3
    Junior Member
    Join Date
    Jan 2013
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: JAVA game development issue

    hmm enigne? none XD
    I program it all by myself and a friend who knows to draw. i already made a nice game in about 3 days, an imitation of "this is the only level" game.
    about the menu, should i make it in the same JFrame? or make a seperate one for buttons, so when i press something it disappears and switches to the game JFrame?
    also, i would really like to know about using an engine. must it be a java engine? how do i use it? it comes as a folder that i can import?
    thanks!

  4. #4
    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: JAVA game development issue

    It sounds like you're biting off a bit more than you can chew. I recommend taking a step back and really wrapping your head around all the concepts you're trying to use. When you talk about a menu, do you mean a drop-down menu like you see at the top of most programs, or do you mean an in-game menu usually consisting of a few buttons?
    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!

  5. #5
    Junior Member
    Join Date
    Jan 2013
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: JAVA game development issue

    I meant an in game menu, like in most computer games, with a few buttons. why do you recommend taking a step back? i (think) i know what im doing, and i like programming anyway.

  6. #6
    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: JAVA game development issue

    I recommended taking a step back because it sounds like you don't really have a solid grasp of the fundamentals just yet- how to create a menu, how to create a button, how to pause the game or render different screens.

    You should have a solid grasp of each of these concepts before trying to combine them, otherwise you're just going to give yourself a headache.
    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!

  7. #7
    Member angstrem's Avatar
    Join Date
    Mar 2013
    Location
    Ukraine
    Posts
    200
    My Mood
    Happy
    Thanks
    9
    Thanked 31 Times in 29 Posts

    Default Re: JAVA game development issue

    I agree with KevinWorkman, you should learn the foundations of Java language before trying to write a game. And, also, you should use some engine (if, of course, you don't writing a game for educational purposes).

  8. #8
    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: JAVA game development issue

    I would actually recommend starting out in something like Processing. It makes your life a lot easier and teaches you Java syntax. Once you understand the basics you can work your way up to Java and game engines.

    I've been writing tutorials here that you might find helpful: Static Void Games - Tutorials
    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!

  9. #9
    Junior Member
    Join Date
    Jan 2013
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: JAVA game development issue

    thanks!

  10. #10
    Junior Member
    Join Date
    Jan 2013
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: JAVA game development issue

    here is my progress:
    game.rar - Speedy Share - upload your files here
    no real menu yet, just the image. i do not intend the game to be lavarunner like it is, its just for the meanwhile fun but it doesnt matter because i made it all in a very versatile programming style (i think) so i can change it to something entirely else very fast.

Similar Threads

  1. came from 3d to game Development...
    By earthquaketry in forum What's Wrong With My Code?
    Replies: 1
    Last Post: November 22nd, 2012, 08:22 AM
  2. 3D Battle Cruiser for Game Development
    By Angryfly in forum Android Development
    Replies: 1
    Last Post: August 12th, 2012, 02:06 AM
  3. Undead Liberty (Java Game Development)
    By Dwaq in forum Paid Java Projects
    Replies: 4
    Last Post: May 2nd, 2012, 06:52 PM
  4. Any good books for java game development?
    By u-will-neva-no in forum Java Theory & Questions
    Replies: 1
    Last Post: September 23rd, 2011, 05:30 AM
  5. Game Development Career
    By Brt93yoda in forum Java Theory & Questions
    Replies: 5
    Last Post: September 6th, 2010, 10:52 AM

Tags for this Thread