Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (788)
Games in Android Showcase (234)
games submitted by our members
Games in WIP (860)
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] 4
61  Game Development / Newbie & Debugging Questions / Re: How do I take input from full screen mode? on: 2006-06-21 18:52:40
Yeah, I know I kinda need a new machine. I was thinking of buying a laptop and souping it up. Right now I'm running (okay, don't cringe) Windows ME, on an HP Pavilion computer with 383 MB of RAM. The RAM isn't bad but the OS is.  Roll Eyes

Oh, and also I extended JApplet because it's what I'm used to doing. I really don't know much else and JApplet makes it so easy to initialize everything.
62  Java Game APIs & Engines / Java 3D / Re: Textures on a .obj file? on: 2006-06-21 18:43:13
Sorry, it didn't look like any Java3D I recognized but on closer inspection I guess it is.
63  Java Game APIs & Engines / Java 2D / Re: ::Pixel art resources thread:: on: 2006-06-20 20:25:47
Thanks a lot, got me hooked
64  Java Game APIs & Engines / Java 2D / Isometric programming help? on: 2006-06-20 20:16:57
I've recently become obsessed with isometric pixel art after reading the post on the Java2D board. I'd like to create a game with my newfound talents but I don't know how to optimize the output to the screen. I want to be able to cut off all tiles not showing on the screen so that it draws much faster. To do this, I would need to represent the tiles in an array and then... what? I don't know.  Huh
65  Java Game APIs & Engines / Java 3D / Re: Textures on a .obj file? on: 2006-06-20 20:10:03
How come people keep forgetting that this is a Java3D board? I don't want to sound frustrated but Coke and Code showed me exactly what I wanted to do... in OpenGL. I'd really prefer to use Java3D.
66  Discussions / General Discussions / Re: Who is addicted to polls? on: 2006-06-20 19:50:48
I'm surprised that thre's any No votes at all.
67  Games Center / Contests / Four Elements V Contest on: 2006-06-20 18:39:57
GameDev has a new contest running until November 30th: the Fifth Annual Four Elements Contest. Details are available here:
68  Game Development / Newbie & Debugging Questions / Why not try ImageIcon? on: 2006-06-20 18:35:36
Try using an ImageIcon and then calling getImage() on the icon. It works! (at least for me...)
import java.awt.*;  
import javax.swing.*;
import java.applet.*;
import javax.imageio.*;
* @author Nick

public class TestJApplet extends JApplet {
    ImageIcon icon=new ImageIcon("a.gif");
    /** Creates a new instance of TestJApplet */
    public TestJApplet() {
    public void init()
    public void paint(Graphics g)
        Image image = icon.getImage();
        g.drawImage(image, 100,100,this);

That's pretty much as close to your original code as you will get. However, (and this is just me) wouldn't it run a little bit faster if you declared your Image outside of any methods, then called getImage() within the init() method? This way the computer doesn't have to copy your image over and over every frame.
69  Game Development / Newbie & Debugging Questions / How do I take input from full screen mode? on: 2006-06-20 18:26:35
I've been working on a game and it's the first time I've worked with anything full screen before. Up until now I never cared if I had to stick my game into a JFrame but this is for the GameDev Four Elements Contest and I figured full screen would make a better impression. (I've never entered any contest at all before.)

So I started to set up the Game class somewhat like this:

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.awt.geom.*;
public class Game extends JApplet implements KeyListener{
   public static boolean forceWindow=false;
   ImageIcon mainmenu=new ImageIcon("Title Screen.jpg");
   Image buff; Graphics backg;
   static GraphicsEnvironment gfxenv;
   static GraphicsDevice screen;
   public static final DisplayMode[] wishList={};
   public static DisplayMode originalMode;
   public void keyPressed(KeyEvent e){
   public void keyReleased(KeyEvent e){}
   public void keyTyped(KeyEvent e){}
   public void init(){
   public void paint(Graphics g){
   public static void main(String[] args){
      JFrame frame=new JFrame("My Supercool Game");
      originalMode=screen.getDisplayMode();   //****** this line gives me problems as well
      if(args.length>0&&args[0].equals("window")) forceWindow=true;
         Insets i=frame.getInsets();
      Game g=new Game();
      g.init(); g.start();

So I ran something similar to this and it got me to full screen, but then it was stuck. I tried Alt+Esc, I tried Ctrl+Alt+Del, I tried pressing the Escape key. Nothing at all worked. I had to hold the power button on my computer to get it to shut off, thereby ending the program. It won't even respond when I force windowed mode. (However, then it's a JFrame which gives me that nice X in the corner.)

Also, you may have noticed the line I marked that gave me problems. This line compiles fine, but gives me the exception below and then ends when I try running it.

Exception in thread "main" java.lang.InternalError: Could not get display mode
        at sun.awt.Win32GraphicsDevice.getCurrentDisplayMode(Native Method)
        at sun.awt.Win32GraphicsDevice.getDisplayMode(Unknown Source)
        at Game.main(

I'm not sure how to work around this, but I've heard that internal errors are "very rare, and there's usually nothing you can do about them when they pop up." What I'm trying to do is save the user's current display mode so that it can be restored later. This is what's messing the whole thing up.
70  Java Game APIs & Engines / Java 2D / Re: Isometric map wrapping on: 2006-06-18 16:13:10
Please clarify... what's all this X stuff? Do you mean, if you have tiles 123456, going from left to right across your screen, and then you move three tiles to the right it would be 456123? I'm just getting started in the world of isometric game programming. (Mainly because I read the thread at and I got hooked.) But in the row below that you'd have to draw one tile twice, becuse half of it is hanging off either side of the screen.
71  Game Development / Newbie & Debugging Questions / Re: Double Buffering Problem on: 2006-06-17 17:59:03
Thanks a lot! I also noticed that as soon as I put the applet into a Web page (making it visible) then the problem went away. I should have went straight for the API. (Boy, I feel like an idiot now.) But thanks so much, CommanderKeith!

PS- I tried making my applet visible before calling createImage() and I am no longer getting the NullPointerException. However, I got another NullPointerException at a later point in my code.  Undecided

int state;
public static final int MENU=0, MAINMENU=0;
ImageIcon[] menupix=new ImageIcon[5];
menupix[0]=new ImageIcon("mainmenu.jpg");
if(state==MENU) menupix[MAINMENU].paintIcon(this,g,0,0); //this line is the culprit

This is a (rather condensed) version of my code that's giving me a hard time. I've crawled through the API but could not find anything pertaining to the situation. It won't tell me what the NullPointerException is, either, but I'm pretty sure it's referring to the ImageIcon. This was called from a JApplet's Paint method. All of the declarations were outside of any methods I had. Setting menupix[0] was in my applet's init() method. Thanks a lot for putting up with me and my stupid questions.  Grin
72  Java Game APIs & Engines / Java 2D / Double Buffering on: 2006-06-16 16:43:02
How can I double-buffer my game without having to call javax.swing.JApplet.createImage()? For some reason this method keeps returning null.
73  Discussions / General Discussions / Re: Do you think 2D platform games are dead? on: 2006-06-16 16:24:32
Probably not, unless it offered something extra, like gish for example.

What the heck is gish? (Forgive me if I should have already known)
74  Game Development / Newbie & Debugging Questions / Double Buffering Problem on: 2006-06-16 16:18:40
I've been working on a platform-style game with animation, sound fx and the whole nine yards. However, I am currently stumped. My main class extends JApplet, but every time I call createImage(int,int) on it, it returns null. How can I fix this?

PS- I really don't want to have to create it using a MemoryImageSource but if that's what it comes down to then I'll do that.
75  Discussions / General Discussions / Do you think 2D platform games are dead? on: 2006-06-15 20:02:33
I'm starting up a computer game programming company this summer and my first game will be a lot like Super Mario, by this I mean the setup of it. I will be selling this for $10 but I'd like to know if it's worth my time.
76  Game Development / Artificial Intelligence / Pocket Tanks ground-- Drawing to the Screen on: 2006-06-11 23:50:50
All right, Malohkan, you've convinced me. It'll work. The storing of the numbers wouldn't be too too bad, but drawing them to the screen would be a pixel-by-pixel ordeal. I've been trying an "optimizing" drawing method that only updates the pixels that have changed. Of course, I might just be afraid to do anything at all graphics intensive because my computer is a slug. (I filled it all up with free downloads and demos... I'll never do that again!) I could probably get away with total update on a better computer but I'm still going to only update the pixels that need it.
Oh, and CommanderKeith, to cause the projectiles to ricochet or roll, to find the slope you just have to use trig on the x and y coordinates of the topmost pixels to either side of the ground pixel where the projectile has hit.
Also, one last thing, I'm also creating a copy of this software in PocketC ( and running it on a Palm Pilot will take a lot of optimizing and stretching my luck. My company website is not up yet but when it is you'll be able to download either version. (I'm not selling this... it's just a little pet project of mine.)
77  Game Development / Artificial Intelligence / Pocket Tanks ground on: 2006-06-09 17:19:19
I put this in the Game Logic area because it didn't really fit anywhere else. I'm trying to make a program that uses features similar to those in Pocket Tanks where the ground can be eroded or blasted away. I'm having problems figuring out how to keep track of where the ground is and where it isn't. I've tried vectors for the ground's surface, which is a nightmare to keep track of if a hole is blasted far underground, and I don't think a double-subscripted array would be the best because it would fill the memory with 800x600=480000 numbers to just hold the ground data. Another reason why I don't think the vectors would work is because you can see the layers of the earth moving and surface vectors would not be able to reproduce this accurately. With the double-subscripted array you can use an
array to represent each type of terrain. (Or you can use an object, but that would get messy real quick. (In my science class we're having a Pocket Tanks tournament because it's the end of the year. This frustrated me to no end when I could not replicate the ground moving around on my computer at home. I will find out on Monday if I've won the tournament.)
78  Game Development / Artificial Intelligence / Re: The History of AI on: 2006-06-05 17:26:27
It is pretty creepy if you think about it, because then the system could be adapted to manufacture parts, building new drives and such, then because it's evolutionary it would continue to improve itself ON ITS OWN to take over the world. It gets a little scary, but I think that we'll never achieve anything of that scale. It all seems way too sci-fi.
79  Game Development / Networking & Multiplayer / Re: RMI help? on: 2006-05-30 20:27:05
I'm going to post this into the Newbies forum as well but I don't understand how the Sockets work.
80  Game Development / Networking & Multiplayer / Re: Creating a user account? on: 2006-05-30 20:22:49
The JSP is a good idea but I've personally never gotten one to work on my computer. I'd forgotten about them because the one time I tried it it didn't work. Are you supposed to compile them or something? (Don't laugh, I'm dead serious.)
81  Game Development / Networking & Multiplayer / Re: Creating a user account? on: 2006-05-25 19:16:47
That did help. I was hoping anyway to store all of my players' info on one serialized object at a specific URL. How would I go about writing a file to the Internet?
82  Game Development / Networking & Multiplayer / Where's a good tutorial that explains both TCP & UDP? on: 2006-05-24 20:32:23
I'm interested in creating a networked game but I've never achieved anything with networking. If anybody could tell me of some good tutorials involving TCP and UDP I would appreciate it. (I'd like to learn the two of them because they're both suitable for different projects.)
83  Game Development / Networking & Multiplayer / Creating a user account? on: 2006-05-24 20:28:19
I am creating a game where users must log in and save results to a server. I would like to be able to store all of their data on the server so that anyone can perform an on-demand lookup of, say, the five people who have the highest level character or, the most advanced weapons or something. I want my game to run as an applet, but I know those are sandboxed and I don't know which I/O methods will work. I was hoping that I could use serialization but that could pose a problem when more than one user tries to access, and also will serialization work? My website will be hosted on Freewebs ( and I'm not too sure how kindly they'd take to me trying to write to their server. How do I serialize an object and store it at a URL?
84  Java Game APIs & Engines / Java 3D / Re: Textures on a .obj file? on: 2006-05-18 17:35:24
The way I load OBJ files is from this tutorial:

Click on Lesson 8a. No matter what I do I can't seem to get anything more than different colors. If I need to do a sign or something I render the text as polygons.
85  Java Game APIs & Engines / Java 3D / Textures on a .obj file? on: 2006-05-17 20:40:31
I'm SICK of colored models! How can I get some textures in there? I've been using Blender ( to create my models, then exporting them along with the appropriate .mtl files and accompanying images. Why, why oh WHY?  Huh
86  Game Development / Newbie & Debugging Questions / Re: Top-View 2D RPG tutorials? on: 2006-05-17 17:43:34
Oops, forgot to mention... the Barrier class has collision-test functionality to check if the Actor is walking on top of it. Just thought it was worth mentioning...
87  Game Development / Newbie & Debugging Questions / DIY Top-Down RPGs on: 2006-05-17 17:42:19
It's not too hard... you can even do it yourself! All you need are a few classes...

Actor, to hold player information
Level, to hold information about the terrain
Barrier, which represents something the character cannot walk onto
Game, extends JApplet and contains the whole thing
Item, used for powerups
AIController, for attaching onto an Actor to create enemies

You can subclass any or all of these if you want to take it further. I made my first RPG in about a week for an English assignment. CAUTION: IT STINKS but that's only because I didn't take the time to polish it. You can find it on my website If you go to the Downloads page, download, and open it, you can see just the tip of the iceberg of what you can do.

Suggestions: You can create a cutscene class to represent character dialogue.
An interface defined to set and move locations of objects in your world might help too.
88  Discussions / General Discussions / Re: how about... doing something against all that spam? on: 2006-05-16 13:53:13
All right, I'm a little nervous my account is going to be deleted because I mentioned a certain free web hosting service once in a post and some people thought it was spam.
89  Discussions / General Discussions / Update the style on: 2006-05-16 13:51:07
For some reason the GUI doesn't show up in my school's browser. It shows up at home but I can't see the smileys, or the navbar, or much else. All I see is text and avatars. The images are there, they're just really small and blend into the background. Attached is a screenshot. To find out which buttons are which I have to hover over them and wait for the tooltip. (First to find the buttons I have to highlight the space where I think they are with the mouse, so they show up blue.)
90  Discussions / Miscellaneous Topics / Re: Free Site Hosting on: 2006-05-16 13:45:59
Hi to you too but I'm not a spam bot... I'd really like some help! My school's blocked Freewebs and they'll probably block this site too if I hang around much longer...
Pages: 1 2 [3] 4
hadezbladez (2109 views)
2018-11-16 13:46:03

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

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

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

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

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

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

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

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

nelsongames (3852 views)
2018-04-24 18:14:32
Deployment and Packaging
by philfrei
2019-02-17 20:25:53

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