Is that true: Sometime the game change the resolution of user screen then when the game finished it restore the old resolution?If true, anybody show me sample code to do that.
Hi,First, I know absolutely nothing about creating games in Java. I was curious if anyone can provide me names of any known retail or shareware games that have been written in Java. I would like to see what has been done so far. I was also curious if games are written using the 2D API, 3D API ...
1611 byte By
Ak586 at 2007-9-30 5:49:06
I am working on a game and I am using a pretty simple game loop that I got out of a java game book. This is the basic code I have for it now:private void gameLoop() { Graphics2D g = (Graphics2D)frame.getGraphics(); long startTime = System.currentTimeMillis(); //create the back buffer image ...
904 byte By
Ak586 at 2007-9-30 5:59:23
I have implemented bufferstrategy into my game now and I am having some minor troubles. Sometimes when I start the game, everything works fine, but other times I just get a black screen where I can move the mouse. I don't know why it does this. Here is my implementation, is there anything ...
99 byte By
namnet at 2007-9-30 5:59:33
Hi allWhat's the benefits of using VolatileImages regarding game development?
Hi all,i am making a 2D tilemap based game, and I am using Image, I am loading it via ImageIcon. When i do the same with bufferedImage except with ImageIO i get a 1/10th performance difference.My FPS with the Image is around 500~with BufferedImage its around 50~am I using them correctly? or is ...
652 byte By
luisoft at 2007-9-30 6:06:49
I have a problem with a file in the my game jar. The name of the file is tilegame.dat. In this file I have all images (pngs), levels (my own format...), music (midi, wavs). I have stored all of them in this unique file without any compression... there is only a header to identify the contents ...
1840 byte By
Ak586 at 2007-9-30 6:08:50
In my old game loop I used to use this method to get the elapsedTime in milliseconds since the last update:long lastUpdate = System.currTimeMillis();while(running) {long elapsedTime = System.currTimeMillis() - lastUpdate;lastUpdate += elapsedTime; //do stuff } But now I am trying to implement ...
I control a small dot, it can draw line(black color), when it pass a small square (red color), it cannot cover the square, now I need to cover it ...how I can do ? Thx all
1617 byte By
RisseN at 2007-9-30 6:10:28
hi all, i am busy writing a game which will be similar to battleships. Im making it complety multiplayer (no single player playing). Ive so far got a server running that will hold most of the player details (player position, power, target, map etc) which gets updated by one of the clients ...
Hi all,im making a 2d game where the player can move in 4 directions (the usual, up down left and right). Say there was an object infront of him and hes walking into it, how can I make the player stop moving forwards but at the same time, can move sideways and backwards?I have an ArrayList with ...
1732 byte By
kachkas at 2007-9-30 6:17:05
Hi all, I tried to write a simple program that displays an array of .gif images using OOP. Later I will try to animate these images. However, the following code cannot be compiled. Compiler cannot resolve the getDocumentBase() and drawImage() methods. I will be very pleased if anyone recommends ...
295 byte By
cccB at 2007-9-30 6:17:15
HiDo you know if there exists some list over which values you can give to width and height when you create a DisplayMode-object and you want your game to cover the entire screen? 320x200, 640x480 and 800x600 work, but I'd like to use something between 320x200 and 640x480.
390 byte By
Eliwood at 2007-9-30 6:23:25
Say I have an image that is a sprite sheet. The sprite sheet contains all of the animation frames for a sprite in an organized manner running left->right, top->bottom. To keep things simple, let's assume that all the frames are of the same size. What is the fastest way for extracting ...
357 byte By
BDannyK at 2007-9-30 6:23:34
Hi all,I have a new game: http://www.vendon.net/burst/BurstWebStartClassic.jnlpIf you wanna help me out, you could tell me if it crashes or plays really slowly. ...really any comments in general.Oh, it's Web Start with J2SE 1.4.You can also play it as an applet here: ...
Hey there all, I'm looking for a little bit of help.Im making a Minesweeper game using the API and am stumped at one part of it. I have a 2d array of button objects each with mouse listeners and what i basically want to do is find out which button in the array fired the listener. ...
I'm relatively new to the Java world and do most of my development in VB and C#. I have been trying to learn Java by working with the oldschool game Rogue implemented in Java running as an Applet. I got ahold of some Java source but it was written in an older version so I had to do some ...
1153 byte By
Malohkan at 2007-9-30 6:27:40
I have an RPG game I've made, with a pho-3D engine I whipped up, nothing too impressive, and a grid system for the environment. I'm going to change that to a ray-tracing engine soon, keeping the grid-ness, so that the feel is like Wolfenstein. The game will become a multiplayer game, but I ...
hi all,I am making a 2D tile based game, and when I load about 2500 images (the tiles) into an ArrayList, i get this error.the tile is no where near as big as I want it to be, each image is 64x64. They are bufferedImages.But 2500 "Objects" should be able to fit in java's stack?Any one know a ...
667 byte By
Mronks at 2007-9-30 6:31:18
Hello!First post here at this forum.Anyway, here's my problem...Have you ever noticed that the keyevents act.... funny?Like, lets say you're using public boolean keyDown(Event event, int key) and you have it do something then return ture or false. If you hold the key down, it appears to ...
830 byte By
Matei at 2007-9-30 6:33:28
Hello,I've been planning to write a kind of MUD or MMORPG, that is, a game where there is a central server managing the game world and some hundreds of players connected to it, recieving info from it about what's going on and sending them their commands. So far I've written something using ...
485 byte By
morning2 at 2007-9-30 6:33:39
Dear Developers,I want to simulate a falling object with Java2D graphics. What I did is I draw the object and Thread.sleep(3000), clearRect(..) the panel and draw the object at the next location. The result is the panel did not display anything for 3 seconds and displayed the object at the ...
988 byte By
mjkoss at 2007-9-30 6:37:18
Hi, all. I have been thinking about how one would programmatically calculate the best poker hand given 5 cards and I have no clue how to do it efficiently. You could obviously brute-force your way through it, checking for royal-straight-flush, straight-flush, etc, but that's not too elegant. I ...
32476 byte By
Leongy85 at 2007-9-30 6:38:35
what are the codes to handle the checkbox progress in treeFrame.java when the player answers a correct answer in QnA.java ? thanks ....import java.awt.*;import javax.swing.*; public class treeFrame extends JFrame{ private JRadioButton a,b,d,e,f,g,h,i,j,k,l,m,n,o;private Font boldFont; public ...
For a college project we need to create a RISK-like game. Since the OO analysis and design (mostly with UML) plays a huge part I am wondering about the following issues.1. Should I seperate the game objects (just the data, methods etc) from the visual representation (in our case, extensions of ...
596 byte By
namnet at 2007-9-30 6:39:30
Hi. Im developing a simple game that runs in a Frame. In the frame I add a Canvas called GameCanvas where all the graphics are beeing drawn. It all works great in windowed mode but when I try it in fullscreen mode the screen just turns white.public myFrame {setFullScreen(true);GameCanvas ...
Hi, i am making a game. It is like a question game. But i would like to know that is there a way to make the pieces of the picture to show once the person answer it correctly. The picture is in 30 parts which is for 30 questions. Well, its like if the person answer correct one question, one ...
I would like to know how to display the score after you answer the questions in a Jpanel?
It's getting late, and I'm about to head to bed. After hours of laboring over this, and reading endless posts on here, I'm just frustrated. I'm working on a Card game, one that plays the classic game of War. I already created 2 classes, Deck and Hand. The rules are simple, 2 players are ...
4303 byte By
Matei at 2007-9-30 6:46:45
Hello,I've written a pure-Java 3D engine that emulates lighting, view transformation, projection transformation, etc as is done by DirectX or OpenGL, and then draws geometry flat-shaded using calls to Graphics2D.drawPolygon(int[], int[], int). I'm having a problem in that this method call is ...
I have a program for mobile already, it can go though the internet to show a pic, but how I can save the pic which I show? and is it possible to save the pic in the program?
Hey, I have an applet that i want to put on the web. I finally sorted out all the jar problems and then when the applet loaded it game me this error. Connection Creation Failure: java.security.AccessControlException: access denied (java.util.PropertyPermission local_addr.timeout read)Does ...
helloi want to change my frame based system into time basedbut before i change it, i like to know what is the advantage/disadvantage using both systemwhat i mean frame based here is sprite is updated base on game tickwhile time based the sprite updated base on real timei want to change to time ...
3375 byte By
cccB at 2007-9-30 6:52:27
HiIn my game I load a 2D landscape from a gif image. The image consists of mostly two colors. If I use this image in my game, the game runs fast. as it should.But to make the graphics nicer, I have drawn a second, small image with lots of colors and details. The idea is to replace one of the ...
I am working on a 2d game engine and I could easily use just circle collision or rectangle collision, but I want my game engine to be more flexible than that. So what i'm planing on doing is have a public boolean collisionWith(CollisionShape shape) method that uses if(shape instanceof ...
Hello all!I'm currently making a spaceship game as a final project in school. I'm looking for something simple for collision/laster detection, using contains();java.awt.Rectangle: http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Rectangle.htmljava.awt.Polygon: ...
Ok, I'm very much a newbie. I've done java for maybe a year. But our final projects are coming up, and i thought it would be cool to do a multiplayer game, using two different computers, across the internet. I want to use applets and everything I'm used to...Is this possible? Or is it very ...
I put this line in my "data" section in my game...public static final Toolkit tools=Toolkit.getDefaultToolkit();...and the framerate dropped from 300 to 20. I'm not using the toolkit for ANYTHING. When I disable graphics, my tickrate goes from 3800 to 3200, which is severe, but nothing like ...
1492 byte By
eVloier at 2007-9-30 6:58:28
Hi there, I'm just wondering how to use BufferStrategy class to have buffers bigger than the screen resolution?I need this for my little java game, the buffer, which is little bit bigger than the screen, when displaying, I can just cut portion of the buffer to display.I've gone through some ...
527 byte By
toboch at 2007-9-30 7:01:42
I've created a load runner clone. The character moves up, down, left, and right. When a key is held down, he moves (KeyDown). When a key is depressed (KeyUp) he stops moving. Now what happens in the game is that there is always a slight pause when switching keys (say pressing up and then ...
331 byte By
jogallo at 2007-9-30 7:02:12
Hey everybody! I'm new to Java programming, but I'm really into text-based games and me and a few friends were wanting to try and make one. So, where do I start? Would anybody be kind enough to hook me up with some starting steps and tips or maybe a text-based game tutorial or something of ...
323 byte By
Eliwood at 2007-9-30 7:04:02
How do I add a background image to a component, in this case, a scrollpane containing a drawing area. This is for a level editor for my game. I want a level's background image to be drawn and tiled so the user can get a better preview of what the level will really look like. Is there an easy ...
503 byte By
Ak586 at 2007-9-30 7:04:38
I am creating a racing game and am trying to get the acceleration correct. My sprites (the car) are updated using the elapsed time since the last update. I want the acceleration to be pretty fast at first, but start to level off as the car approaches it's top speed. This approach brings to ...
793 byte By
eVloier at 2007-9-30 7:05:08
Well, I got a VolatileImage(or it can be normal image), I wanna cut a portion of it, then attach something new to the portion, how do I do so?See the following:Image:111111222222222222I want to cut the "2s" part, so I get222222222222Then attach "3s" to the bottom:222222222222333333The way I can ...
Im busy with the Rubiks cube program - i have included my source code- there are a few classes left out which are mainly concerned with the GUI. I cant find any way around these two errors, i maybe just need some other point of view- source code would make my life a bit easier.thanx ...
278 byte By
IIIIIIll at 2007-9-30 7:12:58
I am working on a card game in java and I'm going to need my program to have access to, as well as store thousands of unique cards. could anyone point me in a good direction for what I should use to store my cards? any and all help will be appreciated. Thank you.
hai all,i have the problem with resolution in jpeg. When i encode a gif or jpeg file(with 244dpi) with jimi or jai encoder to JPEG format it atomatically goes to 72 dpi. I didn't find any solution to convert to higher dpi for gif and jped images. can any one pl guide me to do this. It is very ...
1131 byte By
hilln22 at 2007-9-30 7:17:52
Hey creating a soccer management game but need ideas on how to create the match engine to simulate the scores. Im using the same guidelines as some guys Play By Mail game...his methodis described at the folllowing address: http://www.geocities.com/spur4444/esms/numhelp.txtNow with my players ...
Hi all,Our first episode will launch soon...For the first time europes best author, Morten Hjerl-Hansen and the superb graphics wiz Danni Tell brings together europes best actors on the Java platform. We're also entering in the Java Game Developers contest with this episode. Please try it and ...
I am wondering is there a way to take some of the detail out of models so that they are less complex and faster to render? I am using mainly dxf models.