Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (777)
Games in Android Showcase (231)
games submitted by our members
Games in WIP (856)
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 , 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

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]
hadezbladez (290 views)
2018-11-16 13:46:03

hadezbladez (160 views)
2018-11-16 13:41:33

hadezbladez (291 views)
2018-11-16 13:35:35

hadezbladez (72 views)
2018-11-16 13:32:03

EgonOlsen (2152 views)
2018-06-10 19:43:48

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

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

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

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

nelsongames (2274 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 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!