Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (521)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (589)
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: Game programming direction on: 2005-10-31 13:05:03
Yes, start with Java2D first. Eventhough you will get sick of it eventually, it'll be a great help to learning game programming with a graphical representation of whats going on.
2  Game Development / Newbie & Debugging Questions / Re: How to display a sprite in a Java application? on: 2005-10-31 13:01:07
Whats the difference between using imageicons and bufferedimages?
3  Java Game APIs & Engines / Java 3D / Re: noob question PLZ HELP! on: 2005-10-27 01:11:47
And this is DEFINITELY in the wrong place.

JOGL or LWJGL topics (depending on which binding yo uare using) woudl have been closer.

Newless CLubies would probably have been dead on.

How is it in the wrong place? I've only seen stuff like 1.0f in 3D code, which is what this board is for, right?
4  Java Game APIs & Engines / Java 3D / noob question PLZ HELP! on: 2005-10-25 15:51:56
I have no experience with 3D code, so I've been looking at some basic tutorials, and have found something that noone seems to explain...

GL11.glRotatef(angle, 0, 0, [size=12pt]1.0f[/size]);

what does the "f" mean?
5  Java Game APIs & Engines / Java 2D / Re: Serialized BufferedImage on: 2005-05-25 01:43:32
Well, the reason I wanted it serialized was to avoid having to use imageio everytime I load stuff. eg. for tiles I want to store the image in the tile object along with all it's properties....
6  Java Game APIs & Engines / Java 2D / Serialized BufferedImage on: 2005-05-24 22:22:39
Is it possible to create a serialized BufferedImage? If so, how?

The application for this is to store an image using ObjectOutputStream.

Shocked Shocked Shocked
7  Java Game APIs & Engines / Java 2D / Re: Opening an image with JFileChooser on: 2005-05-23 23:45:45
works. thx m8
8  Java Game APIs & Engines / Java 2D / Opening an image with JFileChooser on: 2005-05-23 05:02:00
Ok, I'll be honest here. I have NO IDEA what the deal is with urls and image input and why they never seem to work me. And when it does, it never lasts long.

Anyway, I need help in getting bufferedimage to load properly by selecting an image file with JFileChooser.

I have no working code. I have no code that even resembles working code. Please help a dying programmer ;_;
9  Java Game APIs & Engines / Java 2D / Re: Image Resizing on: 2005-04-30 04:02:50
It works! Thanks a zillion ^_______^
10  Java Game APIs & Engines / Java 2D / Re: Image Resizing on: 2005-04-30 02:42:09
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
    
public BufferedImage resizeImage(BufferedImage bi, int width, int height)
    {
        JFrame f = new JFrame();
        Image bi_i = bi.getScaledInstance(width, height, bi.SCALE_SMOOTH);
        BufferedImage bi2 = (BufferedImage)f.createImage(bi_i.getWidth(f),bi_i.getHeight(f));
        Graphics2D g = bi2.createGraphics();
        g.drawImage(bi_i, 0, 0, null);
        return bi2;
    }
11  Java Game APIs & Engines / Java 2D / Re: Image Resizing on: 2005-04-29 23:50:41
I get a NullPointerException in:

1  
Graphics2D g = bi2.createGraphics();


T_T
12  Java Game APIs & Engines / Java 2D / Image Resizing on: 2005-04-29 20:49:36
Is there an easy way to resize a BufferedImage, and have it stay a BufferedImage in the end? getScaledInstance() gets me a casting exception. Please help!
13  Game Development / Newbie & Debugging Questions / Re: prime number decomposition (math) on: 2005-04-11 12:16:43
Quote

5
Wink


That's the one exception T_T
14  Game Development / Newbie & Debugging Questions / Re: prime number decomposition (math) on: 2005-04-08 16:32:16
couple of things you should know...

- all primes end with either 1,3,7 or 9
- the last digit is evenly distibuted. I tried it with 100000 primes, and all last digits occured 25000 +- 5 times.
15  Game Development / Newbie & Debugging Questions / Re: prime number decomposition (math) on: 2005-04-06 11:05:22
To find out if a number is a prime number you devide it by every integer starting from 2 up to the square root of the nuber you're analyzing. Of course, the program will run a little faster is you skip as many integers as possible (like storing previously found primes in an arraylist and only deviding by those instead of every integer).

in it's simplest form:

1  
2  
3  
4  
if (number % dividebythisnumber == 0)
{
    // number is a prime.
}
16  Game Development / Newbie & Debugging Questions / Re: Am I VERY new to the world of Java, so plz hel on: 2005-04-05 13:30:26
imo, you should get to the point where you know the following before making games:

- arrays and loops
- timers
- keylisteners or mouselisteners (depends what you wanna do)

and most importantly:

- how paintComponent() and repaint() are used
- random numbers!

If you know all that you're ready.
After that (some of this stuff I haven't even touched yet):

- midi playback
- polymorphism
- directx/opengl
- fullscreen mode
- more complicated stuff...

Biggest thing to watch out for is to not use magic numbers Cheesy
17  Game Development / Newbie & Debugging Questions / Isometric Games? on: 2005-03-31 16:04:19
Pardon the noobish nature of this thread, but...

Where can I find information on isometric game development? I don't even know where to get started on it!

That said, I've never made a true scrolling game before (one I'm working on right now just uses objects moving downward to create a sense of motion). Should I try a "normal" tile based game first? Help!
18  Game Development / Newbie & Debugging Questions / Re: HELP, how to start do a JAVA GAME on: 2005-01-14 22:27:06
The easiest game to do is "Guess the number", and call it a text based adventure. Wink
19  Game Development / Newbie & Debugging Questions / Yet another image loading problem thread on: 2005-01-14 16:47:13
Please help me Grin

Here's the code in question:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
public BufferedImage loadImage(String name)  
    {
        URL url = getClass().getClassLoader().getResource(name);      
        try  
        {
              return ImageIO.read(url);
        }    
        catch (Exception e)
        {
              System.out.println("Cannot load image " + name +" from "+url);
              System.out.println("The error was : "+e.getClass().getName()+" "+e.getMessage());
              System.exit(0);
              return null;
        }
}
public void draw(Graphics2D g)
{
        BufferedImage bi = loadImage("hero.bmp");
        g.drawImage(bi,x,y,null);    
}


When I run it... the getClass().getClassLoader().getResource(name); method returns null, eventhogh hero.bmp is in the same folder. How do I fix that?

EDIT: Nevermind, I fixed it by changing

1  
loadImage("hero.bmp");


to

1  
loadImage("<packagename>/hero.bmp");
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.

xFryIx (59 views)
2014-11-13 12:34:49

digdugdiggy (38 views)
2014-11-12 21:11:50

digdugdiggy (31 views)
2014-11-12 21:10:15

digdugdiggy (27 views)
2014-11-12 21:09:33

kovacsa (49 views)
2014-11-07 19:57:14

TehJavaDev (52 views)
2014-11-03 22:04:50

BurntPizza (52 views)
2014-11-03 18:54:52

moogie (67 views)
2014-11-03 06:22:04

CopyableCougar4 (66 views)
2014-11-01 23:36:41

DarkCart (152 views)
2014-11-01 14:51:03
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!