Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (525)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (593)
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  Games Center / Archived Projects / Re: Mobile Sand on: 2005-05-31 13:11:22
Great game! Smiley
2  Games Center / Archived Projects / Re: My first game... on: 2005-04-19 12:22:52
the graphic artifacts is just because of my unfinished graphics.. I'm also planning to rewrite the main loop, now it is set to max 60 fps.. The speed of the game depends on the fps, think I have to introduce time (delta) or something..

f.l.x: do you have java3d installed?

3  Games Center / Archived Projects / Re: Star Gauge, v0.2.2a (April 9/05) on: 2005-04-18 09:49:42
Looks nice  Smiley Not very smooth on my crappy computer though Sad

fps: 10
engine fps: changed between 9,10,33 and 100 Huh

my pc:
win xp, centrino pentium m 1.4ghz, 512ram, crappy intel graphics card..
4  Games Center / Archived Projects / Re: My first game... on: 2005-04-17 22:29:36
hehe, that's a good idea  Smiley Have you seen Drunken master with Bruce Lee?
5  Games Center / Archived Projects / Re: My first game... on: 2005-04-17 17:03:02
added this:

<extension href="https://j3d-webstart.dev.java.net/release/java3d-1.3-latest.jnlp"/>

to the resources tag.. does it work now (even if java3d is not installed) ?
6  Games Center / Archived Projects / Re: My first game... on: 2005-04-17 16:49:52
my first try with webstart..  Embarrassed I think it will work now if you have java3d installed...

the jar:
http://www.stud.ntnu.no/~thomassl/bin/SuperSpillet.jar
7  Games Center / Archived Projects / My first game... on: 2005-04-17 15:53:28
http://www.stud.ntnu.no/~thomassl/bin/web/webstart2.jnlp - Super Bob..

This is FAR from finished, I just want to know if the scrolling is smooth on other machines.. and if it starts at all =)

Graphics are ripped from supermario (except bob), but I will make my own soon =)
8  Game Development / Newbie & Debugging Questions / Re: Loading images... on: 2005-04-17 11:17:34
finally it works  Grin
9  Game Development / Newbie & Debugging Questions / Re: Loading images... on: 2005-04-17 10:00:26
I now know that my problem is classpath-related.. If I move the data folder to the folder called classes(this is where JBuilder put my compiled files) then it works with
getClass().getClassLoader().getResource(...).. But the problem is that when I press "rebuild", JBuilder deletes all files in the classes folder..  Sad I lost A LOT of my new graphics this way  Angry

So, I want to have the "data" folder in the project folder right next to "src" and "classes".. This works with jar if I add the following to the manifest:
Class-Path: .;superspillet;

But it doesn't work inside JBuilder, but I guess it will when I figure out how to change the classpath.. Anyone know how to do this? If I go to project -> project properties -> classpath
I see the classpath, but can't change it..
10  Game Development / Newbie & Debugging Questions / Re: java3D and jar.. on: 2005-04-16 19:11:04
Ahh, thank you =) I just installed java 1.5, and forgot to copy the j3d files..
11  Game Development / Newbie & Debugging Questions / java3D and jar.. on: 2005-04-13 23:30:07
I'm  using com.sun.j3d.utils.timer.J3DTimer.class in my 2dplatform game.. I'm trying to make a executable jar-file (for the first time..). I'm using JBuilder's executable-jar-wizard...

When i execute the jar I get the following error:
Exception in thread "Thread-2" java.lang.unsatisfiedLinkError: no J3DUtils in java.library.path
  at java.lang.ClassLoader.LoadLibrary(Unknown Source)
  at java.lang.Runtime.loadLibrary0.. etc..


The J3DTimer class is inluded in the jar.. manifesT:
Manifest-Version: 1.0
Main-Class: superspillet.SuperSpeletMain

What am I doing wrong Huh
12  Game Development / Newbie & Debugging Questions / Re: Loading images... on: 2005-04-13 22:59:38
Can't get it to work.. I've tried anthing I can think of now..

Sad

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
    
private BufferedImage loadImage(String s)
    {
        BufferedImage src = null;
        try
        {
            BufferedInputStream inStream = new BufferedInputStream(getClass().getClassLoader().getResourceAsStream("/"+s));
            src = javax.imageio.ImageIO.read(inStream);
            //System.out.println("laster: "+s+" som er: "+src);
        }
        catch(Exception e)
        {
            System.out.println("feil ved lasting av bilde: "+s);
            e.printStackTrace();
            System.exit(0);
        }
        return src;
    }


The problem is that the src object is null.. According to javadoc the read() method in ImageIO returns null if no registered ImageReader claims to be able to read the stream... My guess is that it can't find the image?

Example of s: "data/bilder/ting/box1.gif"

I'm using JBuilder X,.. The file structure in the jar-file:
[SuperSpillet.jar]
-data
---bilder
-----ting
-------box1.gif
-superspillet
---BildeButikk
13  Game Development / Newbie & Debugging Questions / Loading images... on: 2005-04-13 14:01:11
I'm having problems when I pack my game into a jar, it won't load images right.. Read somewhere that I had to use  class.getClassLoader().getResource()  or something to get it right? Also, should I use BufferedImage?(is it faster?)

I'm using a singleton-class "BildeButikk" (ImageShop in english) to load images.

Image   background = BildeButikk.get().getImage("b.png");


code:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
package superspillet;
import java.util.HashMap;
import javax.swing.ImageIcon;
import java.net.URL;
import java.awt.*;

/**
 * BildeButikk.java
 * Singleton for å hente bilder.
 */

public class BildeButikk
{
    private static BildeButikk      butikk = new BildeButikk();
    private HashMap                 bilder;
    public BildeButikk()
    {
        bilder = new HashMap();
    }

    public static BildeButikk get()
    {
        return butikk;
    }

    public void removeImage(String id)
    {
        //dispose??
        bilder.put(id,null);
    }

    public Image getImage(String id)
    {
       if(bilder.get(id)==null)
       {
           try
           {
               //Config.get.getPath("bilder") returns "data/bilder/"
               Image tmp = loadImage(Config.get().getPath("bilder") + id);
               bilder.put(id, tmp);
           }
           catch(Exception e)
           {
               System.out.println("Kunne ikkje laste bilde: " + id);
               System.exit(0);
           }
       }
       return (Image) bilder.get(id);
    }

    /**********************************
    * metode for å laste bilde
    * @param fileName Filnavnet på bilder som skal lastes.
    *              f.eks.  "bilder/b.gif"
    * @return Image et objekt av klassen Image
    **********************************/

    private Image loadImage(String fileName)
    {
        //URL newFileName = this.getClass().getClassLoader().getResource(fileName);
        Image xx = null;
        try
        {
            xx = new ImageIcon(fileName).getImage();
        }
        catch(Exception err)
        {
            System.out.println("Feil ved lasting av bilde.:" + err.getMessage());
            err.printStackTrace();
        }
        return xx;
    }
}
14  Games Center / Archived Projects / Re: Pool Comet Aquarium on: 2005-04-12 21:56:57
"applet crashed" in Opera 7.54  Sad
15  Games Center / Archived Projects / Re: Mighty Bubbles - GDC 2005 on: 2005-04-10 14:14:07
Nice game! I'm working on a platform game too at the moment.. I liked the graphics too! Especially the backgrounds Smiley What format is the music and did you make it yourself?
16  Java Game APIs & Engines / Java 2D / Re: super mario hill-problem.. on: 2005-04-09 15:26:32
ok, i'll drop the transparent pixel way.. storing a slope for each tile is a good idea, thanks for tips  Smiley
17  Java Game APIs & Engines / Java 2D / super mario hill-problem.. on: 2005-04-06 10:16:29
Hi, this is my first post at this amazing forum  Smiley
I'm making a supermario clone just for fun.. It's fullscreen (640x480) and is based on 32px tiles..

So far the hero 'detects ground' whenever the tile is ground. However I want to be able to make hills / slopes to make the game a little less square.. How can I do this? I'm thinking that instead of checking if the tile is ground or not, I can somehow check if it's transparent or not at a certain x,y location?

edit: I meant to put this under the noobies-category.. sorry.. =)
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.

toopeicgaming1999 (67 views)
2014-11-26 15:22:04

toopeicgaming1999 (58 views)
2014-11-26 15:20:36

toopeicgaming1999 (12 views)
2014-11-26 15:20:08

SHC (25 views)
2014-11-25 12:00:59

SHC (24 views)
2014-11-25 11:53:45

Norakomi (30 views)
2014-11-25 11:26:43

Gibbo3771 (24 views)
2014-11-24 19:59:16

trollwarrior1 (37 views)
2014-11-22 12:13:56

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

digdugdiggy (53 views)
2014-11-12 21:11:50
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!