Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (489)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (555)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Newbie & Debugging Questions / Re: How to display a sprite in a Java application? on: 2005-10-28 21:21:23
Thanks for all the help guys.  Especially you oNyx, your reply was so full of constructive criticism, it gave me new hope.  It really helped me a lot.  I would also like to thank Kev for all the helpfull suggestions he made.  They really helped a lot too!  I can't wait to try some of the things you guys have suggested. Smiley

2  Game Development / Newbie & Debugging Questions / Re: How to display a sprite in a Java application? on: 2005-10-28 18:42:02
Thanks Demonpants, you rock. Smiley

Kev, I don't get you.  You leave nasty replies to all my posts and never offer anything even remotely helpfull.  Why even bother to click that "reply" button???
3  Game Development / Newbie & Debugging Questions / Re: Shooting game source code on: 2005-10-28 18:39:16
Yes, that is exactly right.

But that doesn't solve the problem as I do have the package there and the directory structure is right.  I have also tried just compiling the source code for each of these tutorials as the author wrote it.  It won't compile.  Obviously, this isn't something where the syntax is wrong.
4  Game Development / Newbie & Debugging Questions / How to display a sprite in a Java application? on: 2005-10-28 15:31:09
Can anyone give me a code snippet or link to something like this?  I am just starting out with Java game development and I have been repeatedly frustrated to find that most of the tutorials out there will not work with java1.5.  Anything I can find about displaying an image is either in an applet, or wont work with 1.5

All the good tutorials I have found by searching this forum, like the Space Invaders101, or the Cursos de Tutoriales invaders page no longer work. 

All my java books from my classes are the same way, they only use applets or are too old to be usefull with 1.5.

Can anyone help?
5  Game Development / Newbie & Debugging Questions / Re: Shooting game source code on: 2005-10-28 15:26:49
In the Space invaders101 program the error is:
org.newdawn.spaceinvaders.game does not exist

In the spanish space invaders page it is the same error pretty much:
version03.invaders does not exist

I am 100% positive the problem is that I am using java1.5.  This is just the first few errors.  Any use of the "this" pointer is resulting in an error similar to this.  Also some of the method calls for the Image class are not recognized.  They have probably been changed.

I really need to find something that was written for java 1.5.

6  Game Development / Newbie & Debugging Questions / Re: Shooting game source code on: 2005-10-28 04:34:12
Hello all,

I am new to game programming, but not to java.  I have been trying to follow a couple of Space Invaders tutorials like the one listed above, but I am having trouble getting the code to compile.  I believe this is because I am using Java1.5 instead of 1.4.
Can anyone help me out with this?

How the heck do you mark text as Code?  the "Insert Code" button in here doesn't seem to do anything???

Code:----------------------------------------------------------------------------
// create a frame to contain our game
JFrame container = new JFrame("Space Invaders 101");
      
// get hold the content of the frame and set up the
// resolution of the game
JPanel panel = (JPanel) container.getContentPane();
panel.setPreferredSize(new Dimension(800,600));
panel.setLayout(null);
      
// setup our canvas size and put it into the content of the frame
setBounds(0,0,800,600);
panel.add(this);
End Code-------------------------------------------------------------------------

The compiler gripes about the line saying:
panel.add(this);
It doesn't seem to be able to find the object that "this" points to.

Also, I don't understand the line:
JPanel panel = (JPanel) container.getContentPane();
What does this do?

I am used to something more like:
JPanel panel = new JPanel();
container.getContentPane();

Does anyone know of any gaming tutorials out there for the 1.5 Java?

Delnizz
Pages: [1]
 

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

The first screenshot will be displayed as a thumbnail.

Nickropheliac (12 views)
2014-08-31 22:59:12

TehJavaDev (23 views)
2014-08-28 18:26:30

CopyableCougar4 (27 views)
2014-08-22 19:31:30

atombrot (40 views)
2014-08-19 09:29:53

Tekkerue (38 views)
2014-08-16 06:45:27

Tekkerue (34 views)
2014-08-16 06:22:17

Tekkerue (24 views)
2014-08-16 06:20:21

Tekkerue (34 views)
2014-08-16 06:12:11

Rayexar (72 views)
2014-08-11 02:49:23

BurntPizza (47 views)
2014-08-09 21:09:32
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!