Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (578)
games submitted by our members
Games in WIP (499)
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: Getting Started on: 2008-01-22 14:23:18
All native libs in one folder, that's what I'm doing, but I have not got the chance to test it yet on operating systems other than Win XP
2  Game Development / Newbie & Debugging Questions / Re: Getting Started on: 2008-01-22 06:20:25
Well there should not be problems with that as all those properties and added classpaths are stored in .classpath file with is a xml file with data.

Example of lwjgl native location entry in .classpath
   <classpathentry kind="lib" path="lib/lwjgl.jar">
      <attributes>
         <attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="krajina/lib/natives"/>
      </attributes>
   </classpathentry>

I did not check if it works on linux but I can't see why it shouldn't.
3  Game Development / Networking & Multiplayer / Re: Tunneling a ServerSocket on: 2008-01-21 21:17:04
Yes I've read it, but I did fast and did not catch all the stuff.  Well you explained it now, you're using a public computer that has port forwarding or some kind of public access and it's connected to backend server with no port forwarding and no public access.
4  Game Development / Networking & Multiplayer / Re: Tunneling a ServerSocket on: 2008-01-20 17:30:15
I don't get one thing, if you have a computer (server) behind router, the router must forward the traffic on some port to the computer. Why not just use that port and connect to router (that will forward data to server) directly?
5  Game Development / Newbie & Debugging Questions / Re: Getting Started on: 2008-01-20 00:47:46
that error means you haven't got the native libraries configured properly (try step 4 again). Make sure the path is correct. Also remember if on windows to use ; instead of : in the path.

where do you use ; instead of : in windows path!?

anyway, as you are working with eclipse, just find lwjgl.jar library in your project and expand it, select natives and select a directory where natives are (usually you need to extract natives-windows/mac/linux as they are in a .jar file and you must point to a directory with files unpacked)
6  Games Center / Archived Projects / Re: Great Gunner on: 2008-01-16 09:57:39
Other then that ill tweak speeds a bit try to add a high score online so everyone can brag (btw you beat my score and any idea how to do that would help. i thinking a .txt file online that i download, edit and upload)

Simplest way is to game connect to a script on some hosted server that will update the high scores in database... there is a good tutorial from our own woogley here:
http://www.woogley.net/misc/Highscore/
7  Games Center / Archived Projects / Re: Great Gunner on: 2008-01-15 20:53:14
put in a pause also

EDIT: just to brag a little, I've made 14769 score Smiley ... I hope there was a submit high score option Smiley
8  Games Center / Archived Projects / Re: Great Gunner on: 2008-01-15 17:08:15
totally agree with the island thing, clouds also would be nice

It is also kind of fun killer when you die and in next second you die 5 more times... if a formation of planes hit you you respawn and just hit another plane in formation, or if multiple rapid shots are fired and you hit one....

Also, it would be nice if some planes move faster/slower then others, player would need to think more and improve skill more.
9  Game Development / Newbie & Debugging Questions / MiniMap in tile games on: 2008-01-15 14:42:51
Hello.
I'm wondering what is the best way to do a minimap in tiled games? I would like a minimap like in starcraft for example, a small box in the corner of the screen that shows layout of the world.
I'm using Slick as game engine. Rendering whole world and scaling down is not a option. So far I have idea that for every terrain area tile I designate a color, then in minimap for every tile I render the color of the tile. I think this would be very slow, what is the best way to do a minimap? Thanks.
10  Games Center / Archived Projects / Re: Great Gunner on: 2008-01-15 02:21:43
you're missusing lists somewhere, after I pressed enter to restart once I got

java.util.ConcurrentModificationException
   at java.util.AbstractList$Itr.checkForComodification(Unknown Source)
   at java.util.AbstractList$Itr.next(Unknown Source)
   at java.util.AbstractCollection.removeAll(Unknown Source)
   at Game.gameLoop(Game.java:900)
   at Game.main(Game.java:1114)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at com.sun.javaws.Launcher.executeApplication(Unknown Source)
   at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
   at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
   at com.sun.javaws.Launcher.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
11  Game Development / Newbie & Debugging Questions / Re: Using add/remove on Collections in enhanced for loops on: 2008-01-12 21:24:55
If it can't be solved with refactoring, loop over a copy of the original collection. Then any modifications to the original collection will not affect your loop.

brilliant, I think I'll go for this rather than queue removal or adding

EDIT:
Although in code I just duplicated the list itself, I do not think collections are that slow:
1  
2  
List<E> loopList = new ArrayList<E>(originalList);
for (E e : loopList) {....}
12  Game Development / Newbie & Debugging Questions / Re: Using add/remove on Collections in enhanced for loops on: 2008-01-12 19:07:06
Yes that would work Riven if I did not have to enter object.update() methodes inside the loop, where I need to call object.die() where it removes itself from the list... and I don't have iterator there (and don't plan to pass iterator everywhere)

I've written a small class that queues objects to be added / removed from any list. I know probably it could be written much more efficient (like I'm using 3 lists...), but I just want to game to work now, I'll optimize it later.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
/**
 * Provides static methodes for queueing add / remove stuff from
 * Collections as you can't do it inside enhanced for loop.
 * @author: Kova
 * 2008.01.12
 */

public class CollectionQueue {
    private static List<Boolean> actions = new ArrayList<Boolean>();
    private static List<Object> items = new ArrayList<Object>();
    private static List<Collection> collections = new ArrayList<Collection>();
   
    /**
     * Queue adding object to collection.
     * @param object
     * @param collection
     * @author Kova
     */

    public static void add(Object object, Collection collection) {
        actions.add(true);
        items.add(object);
        collections.add(collection);
    }
   
    /**
     * Queue removing object from collection.
     * @param object
     * @param collection
     * @author Kova
     */

    public static void remove(Object object, Collection collection) {
        actions.add(false);
        items.add(object);
        collections.add(collection);
    }
   
    /**
     * Execute stuff that is queued. You can call it whenever you
     * are not in enhanced for loop of collection that is in this queue.
     * @author Kova
     */

    public static void execute() {
        Iterator<Boolean> iterator = actions.iterator();
        for (int i=0; i<actions.size(); i++) {
            if (actions.get(i))
                collections.get(i).add(items.get(i));
            else
                collections.get(i).remove(items.get(i));
        }
        actions.clear();
        items.clear();
        collections.clear();
    }
   
}
13  Game Development / Newbie & Debugging Questions / Re: Using add/remove on Collections in enhanced for loops on: 2008-01-12 17:12:29
that totally sucks, what was designer thinking Roll Eyes

Well since I'm updating entities in my game I won't pass iterator around in every update so I can remove them (they die for example).
I think I will just create a singleton class for queueing addition and removal of stuff from the list, and then execute all of that at the end of game primary update. We'll see if that works.
14  Game Development / Newbie & Debugging Questions / Using add/remove on Collections in enhanced for loops on: 2008-01-12 16:27:04
Hello.
I'm using Collections for storage of many stuff. I have a lot of trouble making elegant code as when you loop in Collections with a enhanced for loop you are not supposed to change them, ConcurrentModification Exception is thrown. It is quite irritating, how do you guys deal with this problem?
For example, I have a list of items in player class. I have also a removeItem(item) and addItem(item) which adds or removes the item in the item list. These are useless if I call them when looping through items... like if I go through all items and detect broken ones, I cannot call removeItem(), I cannot even use the enhanced for loop. I must use ugly Iterator loop if I ever wanted to remove something from the list. So how to deal with this?
15  Discussions / General Discussions / password recovery not working on: 2008-01-02 13:15:46
Hello.
In short, I forgot the password for my account "Kova"... I never get the email from password recovery system, could anyone send it to me manually?
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.

xsi3rr4x (27 views)
2014-04-15 18:08:23

BurntPizza (24 views)
2014-04-15 03:46:01

UprightPath (39 views)
2014-04-14 17:39:50

UprightPath (21 views)
2014-04-14 17:35:47

Porlus (37 views)
2014-04-14 15:48:38

tom_mai78101 (61 views)
2014-04-10 04:04:31

BurntPizza (120 views)
2014-04-08 23:06:04

tom_mai78101 (220 views)
2014-04-05 13:34:39

trollwarrior1 (187 views)
2014-04-04 12:06:45

CJLetsGame (194 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!