Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (843)
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  Game Development / Newbie & Debugging Questions / Re: package, import help on: 2005-02-04 12:33:42
Ah.  Thanks very much for the speedy and concise answer.
2  Game Development / Newbie & Debugging Questions / package, import help on: 2005-02-04 11:55:24
I'm trying to use an AdvancedTimer in my game, so I downloaded the zipped folder from the GAGETimer home and extracted it, then at the top of my class with my other imports I write:

This seems very simple but I keep getting a "package does not exist" error.  I feel like I just forgot to do somthing with the downloaded files.  Please help me.
3  Java Game APIs & Engines / Java 2D / Re: frame rate counter on: 2005-02-03 03:51:46
Ok, I updated and found out that my images ARE accelerated!  Thanks for the help with that.  I still haven't put in the timer you suggested, but are you sure that it will ignore the monitor refresh rate?  I don't see how it could avoid it.
4  Java Game APIs & Engines / Java 2D / Re: frame rate counter on: 2005-02-03 02:31:19
Stupid me.  I thought that I was running 1.5.  I'll let you know how it works out after I update.

Ha ha ... It seems that I had updated the JRE and not the JDK.  I guess that would do it.
5  Java Game APIs & Engines / Java 2D / Re: frame rate counter on: 2005-02-03 02:21:24
That's wierd.  I'm getting a "cannot resolve symbol" error on the getCapabilities(GraphicsConfiguration gc) method.  I checked, like, 25 times to make sure I was spelling it right, but no go.

Thanks, I have the threshold set to 0.
6  Java Game APIs & Engines / Java 2D / Re: frame rate counter on: 2005-02-03 01:40:20
Thanks for that link.  You're saying that the GAGETimer will ignore the monitor refresh rate?

As for accelerating images, lets see if I've got this right.  If I have a BufferedImage "i" which might or might not be accelerated and I want to make an accelerated version called "accelerated", the following will work?

GraphicsConfiguration gc = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();
BufferedImage accelerated = gc.createCompatibleImage(i.getWidth(), i.getHeight(), Transparency.TRANSLUCENT);
Graphics2D accelG = accelerated.createGraphics();
accelG.drawImage(i, 0, 0, null);

And every time I draw "accelerated", it is, and remains, an accelerated image?  How do I check to see if an image is accelerated?
7  Java Game APIs & Engines / Java 2D / frame rate counter on: 2005-02-02 22:45:00
Hi.  I've put a frame rate counter in my game and it is giving me an average around 60 fps.  This is great but I think that the counter is being limited by my monitor refresh rate (I know I read somewhere that that happens under certain conditions).  Is there a way to measure my frame rate without it being limited by the monitor refresh rate?  I know that the number would be useless, as the frame rate can't actually go faster than the monitor refresh rate, but I would still like to see it.  Also, I am using System.currentTimeMillis() to get the elapsed time between frames.  Is this the best way to measure my game's frame rate and manage my games timer?

I have no idea how to accelerate my images.  I am using BufferedImages, can they be accelerated?  Maybe I am already accelerating them.  I have my game working at full screen and am using a BufferStrategy to draw.  Although there seem to be many informative articles about accelerated images, I haven't yet seen one which simply and concisely shows how to create and display them.  For example, if I have a BufferedImage which I want to draw to the screen, how do I make sure that it is accelerated before I draw it?  I think that perhaps I'm missing some important understanding of accelerated images.  Some links or an explanation would be great.
8  Game Development / Game Play & Game Design / Re: Game Organization on: 2005-01-28 16:49:07
Thanks, that's exactly what I was talknig about.
9  Game Development / Game Play & Game Design / Game Organization on: 2005-01-27 20:26:15
There's probably a real term used to describe what I'm talking about, but I don't know it, and thus cannot find an answer to my question.  I am looking for either some sites or tips from you guys on the accepted/approved ways of organizing game code so it is clean and manageable.  For example, is it standard to have (like I usually do) a base class for game objects which other classes extend to make the player, monsters, items, etc.?  That is only an example, but I would really like to understand on a general level how java game code is conventionally organized.
10  Java Game APIs & Engines / Java 2D / Re: pacman pathfinding on: 2005-01-12 00:03:38
That Ghost Psycology site is hilarious!  Thanks for the links.
11  Java Game APIs & Engines / Java 2D / Re: pacman pathfinding on: 2005-01-11 18:19:32
Cool.  The heuristic function was also giving me problems with pacman, but I am putting it off untill I can actually make the ghost do somthing halfway intelligent.  I thought about it a little bit and could only come up with this:  The shortest distance between any two points (if I can only move up, down, left, and right; NOT diagonal) is |start.x - end.x| + |start.y - end.y| (the straight lines lining up the horizontal and vertical coordinates).  This is never really the best move in pacman, because it is easy to have walls between the start and end points to get around.  I figure, the farther away  the points are using the above function, the more possibilities of finding a relatively straight path between them (only RELATIVELY straight).  What I mean is, the smaller the straight-lines distance described above, the greater descrepancy between the straight-lines distance and the real distance.  So my heuristic might be: find the straight-lines distance, and the shorter it is, add more to it.  The only problem is that if the distance actually is the straight-lines distance, then it will greatly overestimate the heuristic.  I could add another part to the heuristic function which could check to see if it is a straight line to pacman, or even if the straight-lines distance is the exact answer.

I hope I'm explaining my thoughts correctly.  Thanks again for the great help.
12  Java Game APIs & Engines / Java 2D / Re: pacman pathfinding on: 2005-01-11 17:27:20
Thanks for the help.  That makes sense and it's not too difficult!  I'm not at the computer with my code on it so I can't implement this until tomorrow, but I'll tell you how it goes.

Somthing that bothers me about all this pathfinding buisness is that the ghost is calculating the best path to pacman each frame: it gets the ENTIRE path, but only moves a tiny amount (not even one tile in my game) before checking again.  Is this over-doing it?  I mean, I'm only using a tiny part of the calculated path.  Should I only check every once in a while, or at certain times like when it or pacman gets to an intersection?  Or is there a different way of dealing with this problem?  Is it a problem at all?

edit: spelling
13  Java Game APIs & Engines / Java 2D / pacman pathfinding on: 2005-01-11 13:08:45
I'm writing a remake of pacman, and the ghost pathfinding is giving me tons of problems.  I can't get it to work.  I've studied the astar algorithm untill my head hurt, tried to implement it two different ways, and it still doesn't work.  Any pathfinding advise?  Is there a better or quicker way than astar?  Am I a complete moron?  Help is appreciated.
Pages: [1]
EgonOlsen (37 views)
2018-06-10 19:43:48

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

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

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

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

nelsongames (121 views)
2018-04-24 18:14:32

ivj94 (861 views)
2018-03-24 14:47:39

ivj94 (122 views)
2018-03-24 14:46:31

ivj94 (758 views)
2018-03-24 14:43:53

Solater (139 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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!