Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (754)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (842)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Youtube !!!!!  (Read 2662 times)
0 Members and 1 Guest are viewing this topic.
Offline 666DemonThe

Senior Newbie

« Posted 2012-04-20 17:50:37 »

Play List of my Java tutorials
Offline GotoCofee

Senior Newbie

Medals: 2

« Reply #1 - Posted 2012-04-20 17:54:51 »

You look talented, it's nice to see people sharing knowledge!
Offline ra4king

JGO Kernel

Medals: 507
Projects: 3
Exp: 5 years

I'm the King!

« Reply #2 - Posted 2012-04-20 23:30:17 »

Pretty cool that you have the time and energy to make videos to help others! Smiley

However, I can't help but criticize some points you made in your videos:
Tutorial 1
- Why are you creating 2 JFrames? Your Window class already extends JFrame, no need to have a JFrame variable inside it.
- When accessing static variables, you use the class name, not an object's name, for example: JFrame.EXIT_ON_CLOSE, not j.EXIT_ON_CLOSE.

Tutorial 2
- It is best to extend JComponent, instead of JPanel, since the JPanel isn't focusable by default.
- Never ever override the paint(Graphics) method of any Swing component, use paintComponent(Graphics).
- You created the Thread object, but you never actually started the thread.
- Same as point 2 for Tutorial 1, use Thread.sleep(3), not t.sleep(3).

Tutorial 3
- Variables like X and Y shouldn't be public and static just so you can access them from your InputH class. Pass the Board object to the InputH class so it can modify the variables on that object, not globally.
- Since you never started the thread to begin with, your repaint() wasn't getting called. It is bad to put repaint() inside your paint method.

Tutorial 4
- You were getting that "line" effect because you didn't clear the screen every frame. Instead of double buffering (by using img1) on an already double buffered JPanel, you should simply call g.clearRect(x,y,w,h).
- Creating a new Image every single frame is a huge waste of memory, create 1 Image object and reuse it. However as noted above, it is best to just clear the screen.

Tutorial 5
- It's best to not use ImageIcon to load images, use the ImageIO class: returns a BufferedImage.
- Just like the X and Y, don't make the Image variable static! That is also why getClass() wouldn't work, since you can't call a non-static method in a static context.
- It's usually a bad idea to make "res" a source folder, since you get problems with exporting later on. Put "res" under "src" so you can do getResource("/res/Player.png")

Don't take these points the wrong way. I'm only trying to help here. I wish I had the time to make videos and I admire your enthusiasm.

However, it is painfully obvious that you aren't very familiar with Java and basic OO principles yourself. I recommend you learn more about game making before teaching others to make games Wink

This post includes links to many JGO posts for creating Java2D games. Smiley

Pages: [1]
  ignore  |  Print  

DesertCoockie (20 views)
2018-05-13 18:23:11

nelsongames (68 views)
2018-04-24 18:15:36

nelsongames (65 views)
2018-04-24 18:14:32

ivj94 (748 views)
2018-03-24 14:47:39

ivj94 (79 views)
2018-03-24 14:46:31

ivj94 (555 views)
2018-03-24 14:43:53

Solater (94 views)
2018-03-17 05:04:08

nelsongames (168 views)
2018-03-05 17:56:34

Gornova (338 views)
2018-03-02 22:15:33

buddyBro (998 views)
2018-02-28 16:59:18
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!