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 (533)
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  Java Game APIs & Engines / J2ME / Text Messaging - is there an SE/EE API? on: 2005-04-26 01:20:06
Is there a package that handles sending text messages from a computer to a cell phone? I've read that JAIN is in the works, but that was all I could find.

I know it must be possible, because AOL IM does it, but do they have some kind of massive deal with the service providers? Or is it something I can duplicate alone in a week? Thanks for any help  Smiley
2  Game Development / Newbie & Debugging Questions / Re: Deliver MouseEvent to another program? on: 2005-03-09 20:13:49
Awesome Smiley Thanks guys!
3  Game Development / Newbie & Debugging Questions / Deliver MouseEvent to another program? on: 2005-03-09 15:51:29
Back from a long break  Wink

Can anyone give me a quick answer to this question: is there a way for a Java program to deliver mouse and key Events to another program? This is for an extremely crude game bot. What I imagine is there'll be some kind of System.getActiveWindow() type thing, and then I can post my own events to it. Thanks for any help!
4  Game Development / Newbie & Debugging Questions / Re: Hiding Static Variables on: 2004-07-20 20:54:30
Augh, yes, I must have changed it from protected at some point and forgotten that's how it originally was.

Thanks for the reply... I found this on the Sun Forums in case anyone else has this problem. The short answer is, yes, that's how it works. I can't think of why it should work that way, but what the hey.

http://forum.java.sun.com/thread.jsp?forum=31&thread=484011
5  Game Development / Newbie & Debugging Questions / Re: Hiding Static Variables on: 2004-07-19 22:06:25
1.4.2, Windows XP BTW  Embarrassed
6  Game Development / Newbie & Debugging Questions / Hiding Static Variables on: 2004-07-19 22:05:19
I've got several classes of game object that are all descended from one basic class. I want each class to maintain its own static Hashtable, which will contain
every initialized instance of that class.

To this end, I declare a private static Hashtable objectTable in each class, and init them, in each class, in a static block.

Trouble is, all my classes always end up accessing the table for that basic class whenever I try to iaccess the table directly (ie - objectTable.put(...) or something). I've developed a very ugly workaround, wherein I place the exact same method:

Hashtable getObjectTable() {return objectTable;}

in every subclass, and always use getObjectTable().put(...) instead of just objectTable.put(...). Now the correct static table is always used. Why is this necessary? Am I doing something wrong or is this just how static hiding works? Thanks all,

Bret
7  Game Development / Performance Tuning / Re: Best system for drawing ints to screen? on: 2004-01-31 18:58:20
Images...yes that does make the most sense in terms of cost/benefit. Thank you very much for your help. As a followup, is there a good profiler that plugs into NetBeans? Or do I have to write my own? Thanks,

Bret
8  Game Development / Performance Tuning / Re: Best system for drawing ints to screen? on: 2004-01-30 23:36:43
Ah I think I understand. I think I phrased my question poorly - I'm not worried about the drawing, I'm worried about the allocation of hundreds of strings per second (is that something to worry about?). But if I understand oNyx correctly, I should just have a static final array of Chars, and draw those.

Please reply if I missed something. Thanks for the help!
9  Game Development / Performance Tuning / Best system for drawing ints to screen? on: 2004-01-30 19:30:38
I have a lot of data stored as ints that needs to be drawn once per second or so. (As in "you have 8 widgets available", where the 8 can reasonably be expected to change every couple of seconds - and then 20 kinds of widgets) Graphics objects can draw byte arrays, char arrays, and Strings. What is the most efficient way to convert? I guess I should say that I don't expect the numbers to ever be larger than 32,000 (although they will be larger than 255).


Thanks for any help!
10  Game Development / Newbie & Debugging Questions / Re: Whew. Paint Question. on: 2003-11-14 23:39:10
Well, I figured it out. Maybe folks will be interested in the answer. Actually, I haven't tried it yet (not at home), but it's too spot-on to ignore. According to the API of Component.paint(Graphics g),

Quote
The clip rectangle in the Graphics parameter is set to the area which needs to be painted.


Funny that they don't spell this out in any of Component's subclasses.  Tongue
11  Game Development / Newbie & Debugging Questions / Whew. Paint Question. on: 2003-11-13 04:07:46
1.4.2, WinXP, Netbeans

Hi all,

I just came back to my old project after 3-4 months of lifting heavy objects for money. I think I may have forgotten how to program, so I apologize if this is a stupid question.

I am trying to create a Swing GUI where the ContentPane has a BorderLayout. The graphics and action occur in the center area, which has no child; I draw to the ContentPane directly. Options and user input are on a JTabbedPane in the South, and scoring and time limit are displayed on a JPanel in the North.

I want the graphics drawn right on the contentPane to wrap snugly around the three tabs on the TabbedPane (they are on top of it), as well as around the TP itself. I figure the best way to do this is, draw the graphics to my buffer, then paint the TP onto the buffer, then flip. This is my code: (imageBuffer is just a blank BufferedImage)

backBuffer = ((Graphics2D) imageBuffer.getGraphics());
gameMap.drawIsometricMap(backBuffer);
managementTabbedPane.paint(backBuffer);
getContentPane().drawImage(backBuffer, 0, 0, this);

What ends up happening is, the TP paints once where it belongs, in the South, (and the TP functions normally), then it repaints about at about (0, 4) for the remainder of the program execution. The graphics overlap the real TP (because it isn't repainting where it should), and the empty shell of a TP paints perfectly over the graphics, in the wrong place.

Does anyone know why this is happening? Basically, it seems to me that the TP contains the wrong information about exactly where it belongs at any given time. I tried setting its location absolutely (with setLocation(x, y)), didn't work. Perhaps I'm on the wrong track to acheive this effect in the first place? Any help is much appreciated. Thanks,

Bret
12  Java Game APIs & Engines / Java 2D / Re: Colored Timer Class on: 2003-08-26 07:11:31
Hmmm...good point oNyx. Guess I'll be saving that code for a rainy day.  Tongue Thanks Abuse!
13  Java Game APIs & Engines / Java 2D / Re: Colored Timer Class on: 2003-08-25 05:02:38
Ahhh, very interesting. But how do I control the color of the bar? Pre-rendering 255 * 255 colored bars doesn't sounds any more appealing than allocating that many Color objects. Am I missing something?

Thank you for your help.
14  Java Game APIs & Engines / Java 2D / Colored Timer Class on: 2003-08-24 20:27:54
Hi all, an open question:

I am trying to create a visual timer for a game. Basically, it displays an ever-shrinking colored bar to tell you how much time you have left. I would like the bar to constantly change color from green (plenty of time) to yellow to red (almost no time left) depending on the situation. I currently have my tick() method producing RGB values that properly express the time remaining.

But that way, I have to allocate a new Color each tick. I am currently just using g.setColor() and then g.drawRect() to update the appearance of the timer. Should I worry about this? (ie - are Color objects at all expensive?) And does anyone know of a better way? I assume there must be a reason why Color doesn't have setR(), setG() and setB() methods...Thanks for any help.
15  Java Game APIs & Engines / Java 2D / Re: Fullscreen API bugs, JVM crashes on: 2003-07-15 08:35:03
Hey, thanks for the info aldacron. I'm just going to develop in Swing while I wait for 1.5.  Tongue
16  Java Game APIs & Engines / Java 2D / Re: Fullscreen API bugs, JVM crashes on: 2003-06-30 17:54:17
Heh, sorry. If it would help, here's the details:

(Sorry, couldn't figure out VM version.  Embarrassed Whatever comes with 1.4.1_03?)  Smiley
WinME,
GeForce2 GTS Pro,
nVidia 95/98/Me Driver v.44.03

I had tried the flush thing. I was flushing at the end of my main loop, which is what makes it so confusing. If I don't get the crash, I get a complete log. If I do crash, adios. Nothing. Thank you for the suggestion tho.
17  Java Game APIs & Engines / Java 2D / Fullscreen API bugs, JVM crashes on: 2003-06-28 19:42:48
Is there a way to get a stacktrace or something similar out of a bad JVM crash? My fullscreen game sometimes freezes, badly enough that I have to reboot. I can't get back to my IDE, DOS window, or Error logs. When I reboot, the first two are gone and the log is blank. The result is that I can't even begin to know what caused the crash. Very upsetting. Any suggestions?

I can post code if it would help. Thanks all!
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.

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

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

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

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

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

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

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

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

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

Riven (52 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!