6 Replies - 449 Views - Last Post: 12 August 2013 - 11:59 AM Rate Topic: -----

#1 SeaOrtho  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 11-August 13

Where can i Start in Java Game Dev if i want to make a FPS

Posted 11 August 2013 - 06:40 PM

Hi i am 13 years old. For some time me and my friend are learning game dev. We have learned many things this past year but i am not sure where to start in java Game Dev. I have watched many videos in making a java game but none of them help a lot . I really want to make a fps Game i have tired unity and unreal engine and decided to do everthing from scratch and to create my own engine. but how where do i start.

Here is the code i type to make the screen.
import java.awt.Canvas;

import javax.swing.JFrame;

public class Main extends Canvas{
	private static final long serialVersionUID = 1L;
	
	private static final int screenWidth = 800;
	private static final int screenHeight = 500;

	public static void main(String[] args) {
		JFrame f = new JFrame();
		Main game = new Main();
		
		f.add(game);
		f.pack();
		f.setSize(screenWidth, screenHeight);
		f.setTitle("Test");
		f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		f.setLocationRelativeTo(null);
		f.setVisible(true);
		f.setResizable(false);
		
	}

}



Ok this opens the window...
But what do i do next...
I am very confused and been trying my best to find my answer but nothing yet
But i am 13 i don't know alot.
So thats why i am asking you

Thank You!

Is This A Good Question/Topic? 0
  • +

Replies To: Where can i Start in Java Game Dev if i want to make a FPS

#2 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10826
  • View blog
  • Posts: 40,363
  • Joined: 27-December 08

Re: Where can i Start in Java Game Dev if i want to make a FPS

Posted 11 August 2013 - 07:16 PM

Start by learning the basics of Java. I don't mean to be rude, but your code reflects a lot of big wholes in your foundation. You need to have a good handle on the basics, or it will come back to bite you. Start with OOP, then work on your design patterns some. You need to have good architecture skills for developing games. Look at the MVC pattern.

Check out my thread Getting Better at Programming Java. You will want to be well into stage 3 before developing games of the magnitude you are describing.

We also have the pinned Java Game Programming Thread.

Hope this helps some!
Was This Post Helpful? 0
  • +
  • -

#3 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9587
  • View blog
  • Posts: 36,326
  • Joined: 12-June 08

Re: Where can i Start in Java Game Dev if i want to make a FPS

Posted 11 August 2013 - 07:16 PM

Moving to the game dev section.
Was This Post Helpful? 0
  • +
  • -

#4 farrell2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 866
  • View blog
  • Posts: 2,657
  • Joined: 29-July 11

Re: Where can i Start in Java Game Dev if i want to make a FPS

Posted 11 August 2013 - 07:16 PM

Game programing is probably the hardest. You need to understand not only java, but many design principles. Programming video gams for the evil genius is a book geared toward kids.
Was This Post Helpful? 1
  • +
  • -

#5 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8347
  • View blog
  • Posts: 31,913
  • Joined: 06-March 08

Re: Where can i Start in Java Game Dev if i want to make a FPS

Posted 11 August 2013 - 07:16 PM

I think you missed so basic stuff here ... no problem

Why making a class Main (quite an ambiguous name) to extend Canvas if you main() method in that class does not create that badly named, Main object ?
The main() method should only have a few lines... it is only used to create an Object of the class type and launch the application

Why creating a JFrame inside that class that is is not instantiated ? Does not make sense

That will make more sense

import javax.swing.JFrame;

public class Main extends JFrame{
	private static final long serialVersionUID = 1L;
	
	private static final int screenWidth = 800;
	private static final int screenHeight = 500;

        public Main() {
		super("Test");
		setSize(screenWidth, screenHeight);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setLocationRelativeTo(null);
		setVisible(true);
		setResizable(false);

        }
	public static void main(String[] args) {
		Main game = new Main();
		game.pack();
		
	}

}


Was This Post Helpful? 1
  • +
  • -

#6 anonymous26  Icon User is offline

  • D.I.C Lover

Reputation: 1
  • View blog
  • Posts: 3,638
  • Joined: 26-November 10

Re: Where can i Start in Java Game Dev if i want to make a FPS

Posted 11 August 2013 - 08:23 PM

Don't try to make an FPS, there is just too much to master and learn. Start with very basic games first as outlined above.
Was This Post Helpful? 1
  • +
  • -

#7 SeaOrtho  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 11-August 13

Re: Where can i Start in Java Game Dev if i want to make a FPS

Posted 12 August 2013 - 11:59 AM

View Postmacosxnerd101, on 11 August 2013 - 07:16 PM, said:

Start by learning the basics of Java. I don't mean to be rude, but your code reflects a lot of big wholes in your foundation. You need to have a good handle on the basics, or it will come back to bite you. Start with OOP, then work on your design patterns some. You need to have good architecture skills for developing games. Look at the MVC pattern.

Check out my thread Getting Better at Programming Java. You will want to be well into stage 3 before developing games of the magnitude you are describing.

We also have the pinned Java Game Programming Thread.

Hope this helps some!


Thanks for the help.

Thanks for the help i will try my best to learn java
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1