Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (476)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (531)
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 1453 times)
0 Members and 1 Guest are viewing this topic.
Offline 666DemonThe

Senior Newbie





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

http://www.youtube.com/playlist?list=PL1584AF182169FC0E

Play List of my Java tutorials
Offline GotoCofee

Senior Newbie


Medals: 2



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

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

JGO Kernel


Medals: 336
Projects: 2
Exp: 5 years


I'm the King!


« Reply #2 - Posted 2012-04-21 01: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: ImageIO.read(URL) 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  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

pw (13 views)
2014-07-24 01:59:36

Riven (13 views)
2014-07-23 21:16:32

Riven (13 views)
2014-07-23 21:07:15

Riven (14 views)
2014-07-23 20:56:16

ctomni231 (43 views)
2014-07-18 06:55:21

Zero Volt (39 views)
2014-07-17 23:47:54

danieldean (32 views)
2014-07-17 23:41:23

MustardPeter (35 views)
2014-07-16 23:30:00

Cero (50 views)
2014-07-16 00:42:17

Riven (50 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org 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‑gaming.org
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!