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 
|
|
|
|
|
3
|
Game Development / Newbie & Debugging Questions / Deliver MouseEvent to another program?
|
on: 2005-03-09 15:51:29
|
Back from a long break  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!
|
|
|
|
|
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
|
|
|
|
|
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), 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. 
|
|
|
|
|
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
|
|
|
|
|
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.
|
|
|
|
|
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.  Whatever comes with 1.4.1_03?)  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!
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|