Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
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:
1  
import com.dnsalias.java.timer.*;

This seems very simple but I keep getting a "package com.dnsalias.java.timer 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.

EDIT
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.

EDIT
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?

1  
2  
3  
4  
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?

PS
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]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (38 views)
2014-12-15 09:26:44

Mr.CodeIt (31 views)
2014-12-14 19:50:38

BurntPizza (62 views)
2014-12-09 22:41:13

BurntPizza (99 views)
2014-12-08 04:46:31

JscottyBieshaar (60 views)
2014-12-05 12:39:02

SHC (74 views)
2014-12-03 16:27:13

CopyableCougar4 (77 views)
2014-11-29 21:32:03

toopeicgaming1999 (138 views)
2014-11-26 15:22:04

toopeicgaming1999 (127 views)
2014-11-26 15:20:36

toopeicgaming1999 (38 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org 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‑gaming.org
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!