Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (775)
Games in Android Showcase (230)
games submitted by our members
Games in WIP (856)
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] 2 3 ... 11
1  Java Game APIs & Engines / JOGL Development / Re: How to: Getting started with JOGL on: 2006-07-14 16:22:08
Slightly revised so that the package name corresponds to the usage with the latest beta 05 release.

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  
import java.awt.*;
import java.awt.event.*;
import java.util.logging.*;
import javax.media.opengl.*;

import com.sun.opengl.util.Animator;

public class Triangle implements GLEventListener {

   // Statics -----------------------------------------------------------------

   private final Logger LOG = Logger.getLogger(Triangle.class.getName());

   public static void main(String[] args) {
      Frame frame = new Frame("Triangle Demo");

      GLCanvas canvas = new GLCanvas();
      canvas.addGLEventListener(new Triangle());

      frame.add(canvas);
      frame.setSize(512, 512);

      final Animator animator = new Animator(canvas);
      frame.addWindowListener(new WindowAdapter() {
         public void windowClosing(WindowEvent e) {
            new Thread(new Runnable() {
               public void run() {
                  animator.stop();
                  System.exit(0);
               }
            }).start();
         }
      });
      frame.setVisible(true);
      animator.start();
   }

   // Constructors ------------------------------------------------------------

   public Triangle() {
   }

   // GLEventListener ---------------------------------------------------------

   public void init(GLAutoDrawable drawable) {
      GL gl = drawable.getGL();
      if (LOG.isLoggable(Level.FINE))
         LOG.fine("Init GL is " + gl.getClass().getName());
   }

   public void display(GLAutoDrawable drawable) {
      GL gl = drawable.getGL();
      gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
      gl.glLoadIdentity();
      gl.glColor3f(1F, 0F, 0F);

      gl.glBegin(GL.GL_TRIANGLES);

      gl.glVertex3f(0.0F, 0.0F, 0.0F);
      gl.glVertex3f(1.0F, 0.0F, 0.0F);
      gl.glVertex3f(1.0F, 1.0F, 0.0F);

      gl.glEnd();
   }

   public void reshape(GLAutoDrawable drawable, int i, int i1, int i2, int i3) {
   }

   public void displayChanged(GLAutoDrawable drawable, boolean b, boolean b1) {
   }
}
2  Game Development / Networking & Multiplayer / Re: How to convert applet to work on cellular phone? on: 2006-03-20 13:50:46
And if you're attempting to target Nokia series 40 phones the most popular screen size is 128 x 128 pixels and the jar must be less than 64KB.  Some of the newer series 40 phones have high(er) resolution screens e.g. 6230i at 208 x208 - this is inface one of the most popular handsets in the UK at the moment.

I suppose it comes down to your target audience and how you aim to distribute the app.

ribot
3  Game Development / Game Play & Game Design / Re: Graphics Editing Programs on: 2006-03-20 10:34:22
I switch between Fireworks and Photoshop for my bitmap/vectorish graphics.

For real vector work, I use Illustrator.
4  Discussions / General Discussions / Re: Puppygames Competition! on: 2006-03-20 10:31:28
I'd be happy to test on my G4 laptop.

ribot
5  Game Development / Game Play & Game Design / Re: Engine Codebase Design on: 2006-03-20 10:30:53
Kev has some nice pointers in his tutorials

http://www.cokeandcode.com/spaceinvaderstutorial

Good place to start from.

Cheers,

ribot
6  Java Game APIs & Engines / J2ME / Re: Does anyone have the Nokia XHTML Guidleines v1.3 PDF? on: 2006-03-17 16:59:51
Oh well, must have been Nokia playing around with their site.

Managed to get the document from another server in the end.

Thanks anyway.

ribot
7  Discussions / General Discussions / Re: Puppygames Competition! on: 2006-03-17 16:39:10
I find the rules quite contradictive:

"Scoring is based in equal weights on graphics, sound, polish, fun"

and further down...

"there are more points available for polish, fun, and theme than graphics and sound"

hmm, so is it equal or not?
8  Discussions / General Discussions / Re: Disney getting into the casual games market on: 2005-12-29 21:29:37
We've recently created an experimental casual game for Nokia - if you want to have a little read: http://www.futureplatforms.com/fp/twitchr.jsp

Lots of nice pixel graphics and many subtlties to the game play.  Wink

If you'd like any more information, please email me/pm me/reply here.

Cheers,

ribot
9  Discussions / General Discussions / Re: Where Are You? on: 2005-12-29 21:20:23
Brighton, UK.  The company I work for www.futureplatforms.com which focuses solely on J2ME games/application development.  Lots of nice projects down here.  Babel Media are also based in Brighton - big porting company for Java Mobile Phone games.
10  Java Game APIs & Engines / J2ME / Does anyone have the Nokia XHTML Guidleines v1.3 PDF? on: 2005-12-16 17:09:40
The one which you can supposedly download from this link:

http://www.forum.nokia.com/info/sw.nokia.com/id/7f3f1424-b51e-4067-a3ef-acaab08e484f/XHTML_Guidelines_For_Creating_Web_Content_v1_3_en.pdf.html

...but it doesn't seem to contain any download link.

Sad

Any feedback would be much appreciated!

Cheers,

ribot
11  Discussions / Business and Project Management Discussions / Re: Looking for java games for distribution on: 2005-10-09 12:25:09
Hi there Richard,

I have experience of writting a suite of games for mobile devices.  I currently have a platform which allows me to build to 40+ different devices from a number of handset manufacturers.

Let me know what specifically you're looking for.

ribot
12  Game Development / Game Play & Game Design / Re: Basic game design question on: 2005-10-09 12:07:57
Excellent!  Thanks for the confirmation OT.

Had thought about going the old skool route, but thought that it would probably be best that I went for something a little less fragile for part of the core of my engine.

Any idea as to the actual speed boost gained by using array lookup tables in relation to maps?  (1 - 3%?)

Cheers,

ribot
13  Game Development / Game Play & Game Design / Re: Basic game design question on: 2005-10-09 11:53:19
hehe, thanks for the reply OT!

Well, what I meant is that there will be at most 20 different types of animals, but the quantities (number of each type) could easily be 30,000 or so.  I do want to treat all the animals the same - it's just that I need a nice efficient method to bump the number of a specific type's quantity up or down by x.

I'm currently tending towards the HashMap:

where the House uses

1  
pets.put(new Integer(Mouse.ID), new Mouse(x,y,z,1));


, which allows a fast lookup on the unique animal ID (Unless I'm wrong?).

Wink

I then use a snippet of code (contained in Building) to update the number of a type of animal in a House:

1  
2  
3  
4  
5  
public void setAnimalQty(int animalID, int qty) {
  if(stock.containsKey(new Integer(animalID))) {
    ((Animal)stock.get(new Integer(animalID))).setQty(qty);
  }
}
14  Game Development / Game Play & Game Design / Basic game design question on: 2005-10-09 10:37:41
Hi all,

I'm currently designing the core for a personal game project of mine and seem to have got stuck with the simplist of problems. 

[size=12pt]The background[/size]

I have three classes

  • Mouse
  • Cat
  • Dog

all of which extend the Animal class.

There are only two other classes to consider: House which extends Building.

[size=12pt]Class structures[/size]

Animal

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
public abstract class Animal {

  public int x,y,qty;

  public Animal(int x, int y, int qty) {
    this.x = x;
    this.y = y;
    this.qty = qty;
  }

}


Mouse

1  
2  
3  
4  
5  
6  
7  
8  
9  
public class Mouse extends Animal {

  public static final int ID = 1;

  public Mouse(int x, int y, int qty) {
    super(x,y,qty);
  }

}


Building

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
public abstract class Building {

  // Option 1
  Animal[] pets;
  // Option 2
  ArrayList pets;
  // Option 3
  HashMap pets;

  public Building() {
    // Option 1
    pets = new Animal[2];
    // Option 2
    pets = new ArrayList();
    // Option 3
    pets = new HashMap();
  }

}


House

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
public class House extends Building {

  public static final int ID = 1;

  public House() {
    super();
    // Option 1 (Array)
    pets = new Animal[]{new Mouse(getX(), getY(), 1)};
    // Option 2 (ArrayList)
    pets.add(new Mouse(getX(), getY(), 1));
    // Option 3 (HashMap)
    pets.put(new Integer(Mouse.ID), new Integer(1));
  }

}


[size=12pt]The problem[/size]

Seen in the Building and House classes are three options for ways to save your pet objects into the house.  At any point though, another mouse could come into the house, bumping up the qty variable value by one of the mouse object.  My question is how do I do this efficiently and what is the best method to use? 

i.e. Using arrays - If a mouse enters the house, I first need to run through the pets array attempting to cast each element to a Mouse, upon success, the qty value is incremented, but using the instanceof or casting seems very inefficient.

Using ArrayLists - nice to use, but I can't seem to find a nice way to pull individual animals out of the list when "building.getPet(id animalID)" is called.

Using HashMap - Each animal type has it's own unique ID - this ID is fed into the key of the hashMap and the value associated with this is the qty variable.  My problem with this is that I would no longer have access to any of the animal's other variables, methods...  If I were to use pets.put(new Mouse(x,y,z,1), new Integer(1)) this would duplicate the qty variable.  :/

Ideally i'd like to use the unique static IDs as a lookup table to the actual class.  So I think I'd use

1  
2  
 
pets.put(new Integer(Mouse.ID), new Mouse(x,y,z,1));


Generally, there won't be more than 20 different type of animal in a building (the norm will be around 3).  What would be the most efficient method to use?

Many thanks.  Any advice would be much appreciated!

ribot
15  Discussions / General Discussions / Re: IOTD - give me your screenshots on: 2005-10-01 07:49:18
Yeah, nice to have a java iotd.  Would be really nice to get the prev / next in there soon.

Nice site!
16  Java Game APIs & Engines / J2ME / Re: Shaving on: 2005-08-02 16:23:50
I'm trying to use antenna and proguard and using wtkobfuscate and wtkpreverify in an attempt to package up my jars.  But I'm having troubles with the preverification part:

JAR file creation failed with error -1
The preverified classes if any are in tmp41.

The preverify part of my ant script looks as follows:

<wtkpreverify jadfile="game.jad" jarfile="game.jar" classpath="C:\kmidp20.zip" verbose="true" />

Whatever I do, the ant build seems to fail on the above line with the "JAR file creation failed with error -1...."

Any tips would be much appreciated.
17  Discussions / General Discussions / Re: Eclipse 3.1 on: 2005-07-27 18:48:54
Blah^3 - So what IDE do you use under OSX at the moment then?

I'm currently on Eclipse3.0.1 and XCode (Tiger) and am quite happy (running on my alBook).
18  Discussions / General Discussions / Re: OS X 10.3.9 broke my java on: 2005-04-22 08:29:42
an update has been released:

http://docs.info.apple.com/article.html?artnum=301382
19  Discussions / General Discussions / Re: 'Simple games' rule mobile charts on: 2005-04-21 15:26:59
I totally agree with the article.  Nothing new in my view.
20  Discussions / General Discussions / Re: OS X 10.3.9 broke my java on: 2005-04-21 15:24:31
Worked here first time.  thank god.

awaiting 10.4.1 where java 5 will be included.
21  Games Center / Archived Projects / Re: Timer midlet for Motorola V600 on: 2005-04-16 08:51:55
Nice.  Will this code work only on the V600 or are the funlight packages avaialble to all modern motorola phones?  e.g. RAZR aka V3?
22  Java Game APIs & Engines / J2ME / Re: avoiding string creation on: 2005-04-08 06:57:58
I also found that Strings are very memory hungry - so I have also reverted to the use of a set of image based fonts.  
23  Java Game APIs & Engines / J2ME / Re: .png image bug on: 2005-04-08 06:51:13
Have you tested on Nokia series 60 at all?  There is a major bug with regards to image creation with the createRGBImage() method in that you should be unable to an image of size larger than 4095 ints (tha array that contains the image data).  Please let me know if you have not experienced this problem.

Cheers,

ribot
24  Games Center / Archived Projects / Re: Tribal Trouble (finally) released! on: 2005-04-04 16:17:55
Quote
Works fine here. Nice game!

The price seems a little steep. I mean, it's a very good game and all, but I think it needs a one player campaign to fully justify that price. For that price you can have 2 full AAA games from the budget bin, you know what I mean? 15 or 19.95 quid seems a bit more easy money to spend on the net. I know 24.95 is just 5 more, but psychologically it seems "a lot" more.
I'll probably register anyway, though Smiley

But other than that, it's really impressive work!


Well, with the current exchange rates, the game equates to around £13.50 or so.  I'd still like to have a one player campaign mode.  Cheesy
25  Games Center / Archived Projects / Re: Tribal Trouble (finally) released! on: 2005-04-04 04:53:40
Works very well on mt 1.5Ghz 17" Apple laptop!  Only had time to go through the tutorials so far... Graphics run smoothly and look nice and the music / effects are amusing to listen to.

I'd be interested in knowing how you found developing the native OS X bits (what tools you used...).

Very nice game... I'll play some more tonight.
26  Discussions / Miscellaneous Topics / Re: SWT Through Webstart on Mac OS 10.3 on: 2005-04-01 05:38:33
Do you want to post a link and I can try it from my 10.3 laptop?
27  Java Game APIs & Engines / J2ME / Re: Images in MIDP 1.0 on: 2005-03-30 15:13:04
Glad you sorted your initial problem, do you have any screen shots of your application so far?
28  Discussions / Miscellaneous Topics / Re: I've switched IDEs! (pretty sure) on: 2005-03-22 17:19:41
Quote


NetBeans is Java just like Eclipse, so there is a Mac OSX installer, no?


Yep, I was hoping that there would be a mobility pack for the OSX version of the beta netbeans... unfortunately not though... so i'll stick to eclipse for the mo for mobile java development.

I'll give netbeans a go...
29  Discussions / Miscellaneous Topics / Re: I've switched IDEs! (pretty sure) on: 2005-03-22 13:25:38
...and what do you use on your osx box?  Eclipse 3.1?
30  Java Game APIs & Engines / J2ME / Re: Image file size on: 2005-03-17 16:13:14
On my current project my images range from 500 bytes to 3.5kb.  Used for backgrounds or as part of a sprite strip for an animation of an element in world space. I always use an adaptive palette and save out as 8 bit pngs (from fireworks or ImageReady).  I then use png crush (command line compression app) to compact them a little more.  

Pngs often consume quite a large of space for palette information (300 to 1000bytes) so it really helps if you can reduce the colour palette (i normally try and reduce the palette down to around 16 colours, sometimes 32 if the image is large and has a large variety of colours.
Pages: [1] 2 3 ... 11
 
hadezbladez (12 views)
2018-11-16 13:46:03

hadezbladez (17 views)
2018-11-16 13:41:33

hadezbladez (6 views)
2018-11-16 13:35:35

hadezbladez (6 views)
2018-11-16 13:32:03

EgonOlsen (1880 views)
2018-06-10 19:43:48

EgonOlsen (1904 views)
2018-06-10 19:43:44

EgonOlsen (1261 views)
2018-06-10 19:43:20

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

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

nelsongames (2007 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
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!