I wanted fine control over timing (in windows XP), but ran into two problems.Problem 1: If you use the Swing timer, or Thread.sleep, the resolution is limited to 10 or 11 milliseconds. There is a Thread.sleep(millis, nanos) function, but I tested it and it still has 11ms resolution in ...
I have also posted the same question in the Applet section. Sorry for the repost but I didn't know where to post this question. Thanks for your time!I am trying to make a game of Risk (The world domination board game). My design has a gamePanel that extends JPanel and has children attackPanel ...
222 byte By
fedora45 at 2007-9-30 7:27:45
I am a newcomer to java game world. So needs a lot of help to build a semester project. Now, from where should I start, what to read, books on this paltform anything that helps PLZ let me know.
I can see it fine on my PC but nobody else can view it. http://www.info.com.ph/~arivera/game/testmain.htmlI'm using SDK 1.4.2
Can swing components be correctly serialized/deserialized does anybody know?Thanks
Howdy!Today I got in touch with JOGL for the first time and I wonder whether there are modelfile loaders for JOGL (Milkshape3D, 3DS, OBJ a.s.o. ) like there are avaible for Java3D?Thanx in advance!- Thomas -
2139 byte By
RisseN at 2007-9-30 7:34:47
Hi everyone,Im currently making a fullscreen 2D RPG that loads the maps from .txt files. Everything is working well so far, you can explore the map, collision detection is satisfactory.My problem now is trying to figure out how to handle creating the enemies, creatures etc. I want to have a ...
Hello, I started writing java about 1 year ago with my primary interest being game development, I have written about 5 games or so in that time, 4 animated and 1 just using swing components. In writing these games I found that I must be doing something fundamentaly incorrect since I have seen ...
I am writing a fullscreen exclusive game (this is my first) which will also be able to switch to a windowed mode, and I want to make sure I have everything set up correctly. Here is the plan: I am going to to my drawing in some kind of draw() method in the class where my main game loop is ...
I am writing a tile based 2d rpg, and I am having a problem figuring out the best way to draw my map. First I will describe the process I am currently using: I have a tilesheet image which is a gif file made up of 16 rows and 30 columns, I wrote a map editor for saving Location objects to be ...
14614 byte By
Sephora at 2007-9-30 7:42:21
Hello :) I'm writing a simple game but I am having so much trouble with it :( here is the code now all it does right now is it writes out the values of the cards on the screen in an applet however I want it to display card images from http://www.waste.org/~oxymoron/cards i can't get it to ...
1427 byte By
Malohkan at 2007-9-30 7:47:09
Loader: - grab logo and loader class for drawing progress info - grab info file for the specific game- tells game name of the game logo- tells class, image, audio, and level filenames- has name of main class for the game- I could write another program to generate this file - load Classes- ...
Greetings,I'm developing a game for mobiles using Sun ONE Studio Mobile Edition. All my emulators (the ones built into Sun ONE Studio and the Nokia and Siemens emulators I downloaded) always crash whenever I use a MIDP 2.0 feature like the GameCanvas class or the "gedWidth" method of the ...
240 byte By
IIIIIIll at 2007-9-30 7:58:13
In the Map interface there is a method called containsValue(Object obj) that returns a boolean. My question is, does this method call the objects equal method? or does it have some other way to check for the object in the map?
1214 byte By
Ak586 at 2007-9-30 7:59:37
I am implementing bounding circles for my game and I have a question. I have heard that creating a new object takes up a lot of time (i.e doing it every update). Should I give each of my objects a BoundingSphere instance variable (I created my own simple BoundingSphere class), update it's ...
598 byte By
kn0t at 2007-9-30 8:02:44
Hi, I'm new to Java game programming (just started yesterday reading some tutorials etc actually), and I started making some simple 2D game.But there is some problem, when the game is over, and the player presses a key.It should start a new game then, and you can hear the sounds playing of the ...
285 byte By
namnet at 2007-9-30 8:04:17
HelloIm making a 2D game and the maps are built up by three images and a text file. I'm now wondering if it's possible to put all these files into one, like level1.map or similar, and later extracting them. Maybe the smartest thing would be to put them in a jar?
575 byte By
rdx65 at 2007-9-30 8:04:28
I am trying to develop a desktop shooting game in java. When the bullet strikes a ship, there should be an explosion. What I am trying to achive is creating the explosion fire animation. I have created 5 gif images which can show the explosion fire. My game is running in a loop and it updates ...
Not sure if this is a java issue or what but I was hoping for your help. I'm trying to copy and paste text into a message box on the following and can't get it to work. If you can open the link below and then open a table in java and try to copy and paste text into the discussion box you'll ...
337 byte By
Fuzzlost at 2007-9-30 8:08:42
Hey,making a breakout clone, four players, over a network. But i was wondering, is there a faster way to draw and redraw the 'ball' and paddles than just drawing a rectangle and square? im worried about performance issues over a network, so i need to find a way to make it draw all the objects ...
I am having a problem loading large maps into my game, I believe this because I am drawing them onto a BufferedImage and then drawing that, are there some limits to the size a BufferedImage can be? I thought I heard they could only be the size of your screen, but I can no longer find where I ...
330 byte By
lavina0 at 2007-9-30 8:16:19
Can anyone tell me how to use a Static Method, or where exactly to put it? I know that the word "Static" must go in front of the type name in the method signature, but does it have to be at every method signature or is there another place it must go? I want my game to open without the use of ...
How to Develope java Games? we want to develope very big game?How we can develope that game?Means if we use openGL is the best are java 3D is the best. How we develope using Applets.What is the best.Actually we want to develop client server game. How it will develope
Hey allDoes anyone know offhand which is faster:String mystring = getAwfullyLongString();mystring.indexOf('x');//- ormystring.indexOf("x"); ie: if you only need to find one character, is there any singificant benefits in using a char over a string? ...
102 byte By
Fuzzlost at 2007-9-30 8:19:02
Ok... stupid question for the day... what's the command to make a JFrame go fullscreen?
i want to use [TAB] button to show mini map in my gamebut KeyListener doesn't receive VK_TAB eventanyone know how to receive this tab button?i use Component.addKeyListener(KeyListener)
3602 byte By
RisseN at 2007-9-30 8:29:32
Hi everyone,Im now trying to create a game menu which can be braught up during the game. Initially I have a swing menu that comes up when you start the game where you can select all your options, characters etc. Once you are playing the game however (fullscreenX mode) I cant figure out how to ...
is there a .out command to get out of a loop?In the program i want it to append until a comma is seen from the file(below)while(c != ','){ssnumb2.append(c);System.out.println(ssnumb2); } the problem is that it never gets out of the loop when the comma is recieved it just repeats the word ...
if we want to develope the peer-to-peer game in java. how it will be develope.Same in client-server technology r any different technology is there.
Hello all,I just wrote a peer to peer chess app, it runs fine on a lan but when i try to use it through my university's firewall it is blocked. I'd like to make it appear to the firewall as http. Is this possible and if so any ideas on how to do it. Im using a ServerSocket which sets up a ...
Hi, I'm trying to make a board game (monopoly like). My problem is with player moves. The board is displayed in the background of a JPanel. How can I move each player token on a given square ?I thought first I could use transparent JLabels for squares, but I can't draw the tokens, which are ...
hi,actually i am developing small gis system.in this case i want to zoom a map.i saw lot of games(ex-generals) that use such kind of zooming techniques.where can i get help?are there any examples?pls help me.thanks, kelum.
3770 byte By
Malohkan at 2007-9-30 8:48:05
In my Block Traffic game, I use the following code to saturate a gray image with color for the game pieces. It works fine on my Windows box, but not on my brother's Mac. Here's the error and the code it's happening in...Error:java.lang.ClassCastException at ...
To allCan anybody give me some advice on game programming using J2ME, it seems to be a complicated thing, since J2ME is really a set of standards instead of a SDK. Which sort of technology should be chosen seems to be another problem. (choose embedded server or MIDP or others...?)Thanks!From ...
2781 byte By
eVloier at 2007-9-30 8:52:54
Hi there, in my game, I rotate sprites base on their direction. However, the image is cutted when it's rotated since the destination(result) image is only the same size as the source image(both are a rectangle image), so the destination image is not big enough to hold the rotated image. For ...
I have developed a game which paint many images in the panel,but these cant be shown as the same time.(smaller image is,faster the game load it)Anyone can teach me how to do that?thank..
HiI want to start learning Java Game programming, can someone plz guide me to the steps to learn and available online tutorials..thanks
I wanted to make sure my game was actually setting the frame rate so I set it to 1 fps...but...it still goes at what it's always done...it waits initially (first key press) and then just goes full speed.here's the code I'm usingpublic void run(){ while(true){//Get the Time this cycle ...
1416 byte By
Malohkan at 2007-9-30 8:56:43
I have a strange scenario here. I have my game, in an Applet, where everything is controlled by me. Drawing, frame rate, positioning, mouse/key listening, the works. But in one of my games, StarBaseInvasion, I have a buy menu which I would like to use JTextFields. However, I don't really want ...
6372 byte By
PC_COGN at 2007-9-30 8:57:40
I'm writing a game as part of a year-end school project. The code below represents the coding portion of the project, but it is not functioning in the way that it's supposed to.Here's what it does right:1) Loads and displays the images properly.2) Detects when a key has been pressed (an ...
867 byte By
RXon at 2007-9-30 8:58:26
Hi all,I'm new to gaming (Java for that matter), and have a game with a general bullett like thing.First i use the swing timer to animate it across the screen, until it collides.But all swing timers uses the same thread so if I fire rapidly they go really slow.So i made a runnable that moves ...
When I scroll my map there is a point where many calculations must be done and this takes longer than the usual run through my game loop. This is my first time using a main game loop (I used threads before), and I was assuming that by subtracting the time it took to go through the loop from my ...
When I press and hold a key to move the ship in my game it moves then it stops the moves smoothly until I press and hold another key...is there anyway to make it move smoothly from the off?I've seen a few implementations on the site that use an array and both keypressed and released...would ...
374 byte By
Ak at 2007-9-30 9:04:30
I am making a racing game and I want the camera to zoom out as the car's speed increases (so the player can see farther ahead). I am using a tilemap and I am not using any 3d, just 2d. I tried a "quick fix" by just using Graphics2D.scale(double, double), but that operation cut my fps in half! ...
836 byte By
HobblaX at 2007-9-30 9:04:41
My current game features a grid made of a bunch of buttons, and I have an actionlistener set to them, so when i click on them they do what they want.My completely works, but it is hard to play because you don't always have the information you need.An easy way to fix this would be to right ...
Hi,I am new to java game development and have little experience about java 2D.i want to develop 2D game that contains a geographical map.Initially I have to collect all the data about particular area.(area boundaries, roads, houses etc..).First screen it should show the most abstract ...
1977 byte By
at 2007-9-30 9:06:59
Hi, Can someone please help, im writing a connect 4 game but there seams to be a problem with my search method(searching for 4 matching coloured counters in a row) can you please have a look and let me know any idea you may have.Thanks... here my methodspublic boolean searchForWin (int color, ...
1188 byte By
luisoft at 2007-9-30 9:14:33
I am rewriting my InputManager controls... but a strange behavious is occuring...Below is part of my code. KeyBoardDevice implements KeyListener and MouseDevice implements MouseListener, MouseMotionListener, MouseWheelListener.For some reason the keyListener is not working... I have put some ...
297 byte By
Malohkan at 2007-9-30 9:18:51
I have a video that I'd like to be displayed in a game I'm writing. Rather than load them in frame by frame and do the standard animation style, I'd like to be able to load and/or play them through the DivX video to save a ton on file size. Are there any tools to help me do this?
Hi,Zooming is a concept that originates from the metaphor of the sound of an airplane flyingtowards the earth. This means getting nearer to the object of interest, seeing more detail. Incomputer graphics this has been partly realized as getting nearer to the focus of the windowof interest while ...