Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (487)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (553)
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 / Artificial Intelligence / Re: Detect "going in circles" i 2D grid. on: 2006-02-18 10:03:00
Yep, seems as the logic will work perfectly. Didn't think of your point on the "figure-eight". I Assumed it would get lost at the cross over,
but your right it will be detected the next step after.
I'm gonna try on an implementation in my game, thx !
2  Game Development / Artificial Intelligence / Re: Detect "going in circles" i 2D grid. on: 2006-02-18 08:50:54
Actually it's not as if a player where standing on a coordinate in the grid.

I didn't make myself clear, but the case is I'm making a "path" in the grid by drawing a line from (X1,Y1) to (X2,Y2).
Based upon criterias and of course the level map the path can take a different turn on any coord.
The whole path is calculated at every frame and I need to detect if the path goes in circles or any more complex
path eventually turning into an eternity loop.

My grid is only built up by numeric values and holds no logic of its own.
 
3  Game Development / Artificial Intelligence / Re: Detect "going in circles" i 2D grid. on: 2006-02-17 15:13:40
I got your point, and it actually should work im my case if the code ( or actually my objects within the grid where prepared for it ).
Unfortunatly this is not the case. My grid is just a level map with only integer values. Of course this can be changed...

Never the less i think I need a list of directions the object went at a certain grid cordinate. There is always the possibility of going in an "eight" or even a more complex path, eventually turning up going into "where gone before".

My 2nd thought was to have the grid location as some sort of hashed map key, and the list of directions the object went as value.
At least i would know there to look on each turn in the loop. The list of alternative directions the object went will assumebly be quite small.

This will of course consume more memory and not as fast as your solution,
but since I only will store a "couple of" integers, it'll be ok ?
4  Game Development / Artificial Intelligence / Detect "going in circles" i 2D grid. on: 2006-02-17 14:13:56
I have a 2D grid where the path an object moves through the grid is determined by a loop.
Every loop cycle i calculate the next step based upon certail criterias and add the path (grid coords) to a list.

But in this loop i need to detect if the object is going in circles ( an popentially avoid an eternity loop ).  Undecided
As I figure it this is "only" to discover if the last coordinate plus the one I'm about to add already exists after each other in the path list ?!?

But this seems as I on EVERY calculated new path coord have to go over the list from the beginning to check
for the coord combination and the list grows by every added coord making the operation slower over time.

Anyone know of any faster way to detect this circular movement?
5  Java Game APIs & Engines / Java 2D / Re: java Fmod and GAGE on: 2005-09-09 04:37:12
Take a look a http://java.dnsalias.com/ , the home of GAGE. Scroll down to the main page bottom...
6  Java Game APIs & Engines / Java 2D / java Fmod and GAGE on: 2005-09-08 18:09:14
I've posted this Q in the newbee's forum but got no replies, so I'll try my luck here instead. I'm making a 2D game, NOT using anything but plain doublebuffer images and plain core Java2d, drawImage(), etc. As timer I use GAGE and rendering at a fixed 60 FPS rate. When doing some profiling, I notice that GAGE uses 100% CPU of the available to the JVM. Of that about 15% is to drawImage() calls, game logics and and other updates is practically zero.
I'm not sure how to interpetrate the profiling result but there seem to me as the rendering has been done in time and that there should be time over for other thing within the current framerate. And without sound the game runs smooth...

Now i wanna add some sound to the game. First i used GAGE sound implementation around Java sound API, but as sound quallity is a factor as important as the graphics in the game i wanna use mp3 sounds. This excludes the GAGE API which doesn't support dito. I stumbled across FMod and the java wrapper around it from http://topresult.tomato.co.uk/~jerome/Fmod/NativeFmod.

It was as easy to implement as i states, but my implementation of it REALLY slowed the game down, making it impossible to play and therefore accept. Has anyone done such implementation along with GAGE ? Shall the calls to Fmod be running in its own thread ? Please enlight me dudes...

If anyone intends to response but need some pseudo code or snippets just say so... :O)
7  Game Development / Newbie & Debugging Questions / java Fmod and GAGE on: 2005-09-05 18:11:16
I'm currently working on a simple 2d game clone of an old C64 game. As low-res timer I use GAGE. What i relly want is good quality sound and I want to use a remix of the old original use the gunes in mp3 format. If I GAGA sound API with the render method in my main loo everything runs smooth. But since I found no way using GAGE sound playing neither mp3 files or to play sounds in loop mod I've considered using "Jouvieje's" java wrapper to FMod. BUT my implementation of streaming a mp3 file slows down my game by far, making it unplayable. Has anyone any clue on how to make the two API's work together. All FMod initialization is made prior to the game's main loop, and I dubt the game rendering i written in such poor fashoin that there will be no more CPU left to play the sound. If anyone could give me a small snippet of code to give me a hint ?, or if nesseseary I could post a pseudo/example of my implementation. I use GAGE to render at a fixed 60 FPS rate.   
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.

TehJavaDev (17 views)
2014-08-28 18:26:30

CopyableCougar4 (26 views)
2014-08-22 19:31:30

atombrot (39 views)
2014-08-19 09:29:53

Tekkerue (36 views)
2014-08-16 06:45:27

Tekkerue (33 views)
2014-08-16 06:22:17

Tekkerue (22 views)
2014-08-16 06:20:21

Tekkerue (33 views)
2014-08-16 06:12:11

Rayexar (67 views)
2014-08-11 02:49:23

BurntPizza (45 views)
2014-08-09 21:09:32

BurntPizza (36 views)
2014-08-08 02:01:56
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

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!