Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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] 2 3 ... 7
1  Game Development / Newbie & Debugging Questions / Re: [noob] hows a "map" like? on: 2009-08-15 07:10:36
what I use is an ArrayList of line segments as platforms. That way I can have sloped tiles in any direction I want. Good luck
2  Game Development / Newbie & Debugging Questions / Uninstalling java web start applications? on: 2009-05-16 06:05:31
Ok I've been trying to uninstall the 200+ java web start apps I've downloaded.. first I tried to uninstall it from Control panel but it didn't work. So then I started googling for a program uninstaller, but that didn't work either. In the end, I went to regedit.exe and started deleting the keys for the JWS applications, but when I restarted my computer they just reappear back there! Is there a way to uninstall them? They are lagging my system to death..

Thanks
3  Game Development / Newbie & Debugging Questions / Re: Swear filter.. on: 2009-04-27 12:30:11
I would do it both on the sending and receiving of the client.
Both to make it harder for people to view swear words and on the client to take the load off the server.
Our forums have been fine, though we have warned people not to abuse it. But the real test when we add it in game which be soon hopefully.

It also has made the forums a friendlier place and less fighting when small insults are replaced like: noob to newbie, ass to bottom, crap to cream, etc.

I like to share a quote of a post(hidden in our bad post area) which has been filtered which I found really funny  Wink


awesome idea, now I just need a list of those words looooooooooooool
4  Game Development / Newbie & Debugging Questions / Swear filter.. on: 2009-04-27 07:44:08
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  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
public class GeneralChatHandler extends AbstractPacketHandler {
    public static String[] swearWords = {
        "f.*?u.*?k",
        "s.*?h.*?t",
        "bi.*?h",
        "bas.*?d",
        "m.*?f.*?",
        "c.*?nt",
        "as.*?s",
        "s.*?ck",
        "w.*?nk",
        "co.*?on",
        "wo.*?g",
        "ni.*?g.*?r",
        "c.*?c.*?k",
        "penis",
        "vagina",
        "c.*?um",
        "p.*?i.*?s",
        "p.*?orn",
        "ar.*?se",
        "nexon",
        "ho.*?r.*?ny",
        "dil.*?do",
        "doggystyle",
        "cl.*?it",
        "fann.*?y",
        "ho.*?re.*?",
        "kn.*?ob",
        "mastur.*?",
        "****",
        "hitler",
        "n.*?uts",
        "sob.*?",
        "shag.*?",
        "sl.*?ut.*?",
        "testi.*?",
        "t.*?wa.*?t",
        "viagr.*?a",
        "wil.*?ly",
        "wil.*?lie",
        "jism",
        "dog.*?gy",
        "donkeyri.*?b",
        "breas.*?t",
        "bl.*?wjo.*?b",
        "b.*?b",
        "beastiality",
        "an.*?al",
        "cawk",
        "pus.*?s.*?",
        "rim.*?m",
        "ejaculate",
        "ejakulate",
        "er.*?ct",
        "horni",
        "horna",
        "se.*?x",
        "se.*?ck",
        "ga.*?y",
        "fk",
        "we*?nis"
    };
   
    @Override public void handlePacket(SeekableLittleEndianAccessor slea, RenoriaClient c) {
        String text = slea.readRenoriaAsciiString();
        if (!CommandProcessor.executeCommand(c, c.getMessageCallback(), text.split(" "))) {
            c.getPlayer().getMap().broadcastMessage(PacketCreator.getChatBubble(c.getPlayer(), filter(text), c.getPlayer().isGM()));
        }
    }
   
    public static String filter(String in) {
        for (String swearWord : swearWords) {
            String stars;
            Pattern pat = Pattern.compile(swearWord, Pattern.CASE_INSENSITIVE);
            Matcher mat = pat.matcher(in);
            while (mat.find()) {
                char[] haha = new char[mat.end() - mat.start()];
                for (int i = 0; i < mat.end() - mat.start(); i++) {
                    haha[i] = '*';
                }
                stars = new String(haha);
                in = mat.replaceFirst(stars);
            }
        }
      return in;
   }
}


I'm using RegEXP to make the swear filter, but now I have 2 problems:

1) Ass is a swear word, but saying Assassin is blocked out too.

2) If I want to say "f**k", I can just say "fucl(".

any way around these problems?
5  Game Development / Newbie & Debugging Questions / delete on: 2009-04-27 07:42:00
whoops accidentally double posted..
6  Game Development / Newbie & Debugging Questions / Re: How do I trace this error..? on: 2009-04-23 14:36:52
thanks for the tip. changed it to:

1  
2  
3  
4  
5  
6  
        if (showInfo.size() > 5) {
            int sz = showInfo.size();
            for (int i = 0; i < sz-5; i++) {
            showInfo.remove(i);
         }
        }
7  Game Development / Newbie & Debugging Questions / Re: How do I trace this error..? on: 2009-04-22 18:18:42
I fixed that ages ago, I made this class when I was n00b at coding o.o
8  Game Development / Newbie & Debugging Questions / Re: How do I trace this error..? on: 2009-04-22 18:09:34
Hmm my code is here: http://pastebin.com/m54a9151c

I think that line 624-626 was causing it..

because it rapidly calls paint2D over and over when a ConcurrentModificationException occurrs, i'm still in the process of profiling it though XD
9  Game Development / Newbie & Debugging Questions / Re: How do I trace this error..? on: 2009-04-22 17:51:08
I've just went and profiled my application, should I post the results?
10  Game Development / Newbie & Debugging Questions / Re: How do I trace this error..? on: 2009-04-22 17:32:21
try this:

void killVM() {
 List<Object> list = new ArrayList<Object>();
 while (true) {list.add(new Object());}
}
11  Game Development / Newbie & Debugging Questions / Re: How do I trace this error..? on: 2009-04-22 16:52:13
but it doesn't.....

I posted like 1/100 of the stacktrace because it was longer than 1000 characters :|
12  Game Development / Newbie & Debugging Questions / Re: How do I trace this error..? on: 2009-04-22 15:55:57
I just did a search for sublist(..) in my project and found 2 results:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
        msgz.clear();
        for (MessageEntry m : messages) {
            msgz.add(m);
        }
      int l = showMessages;
      if (messages.size() < l) {
         currentMessageScroll = 0;
         l = messages.size() - 1;
      }
      if (l >= messages.size()){
         l = messages.size() - 1;
      }
      if (currentMessageScroll + l > msgz.size()) {
         currentMessageScroll = msgz.size() - l;
      }
        if (msgz.size() > showMessages)
            msgz = msgz.subList(currentMessageScroll,
               currentMessageScroll + l);
      Collections.reverse(msgz);
        g.setColor(new Color(25, 25, 25));


1  
2  
3  
4  
5  
6  
        
        showInfo.add(new ShowInfoEntry(message));
        if (showInfo.size() > 5) {
            int sz = showInfo.size();
            showInfo = showInfo.subList(sz - 5, sz);
        }


any idea?  Huh
13  Game Development / Newbie & Debugging Questions / Re: How do I trace this error..? on: 2009-04-22 15:50:23
Any way to debug?  Sad
14  Game Development / Newbie & Debugging Questions / How do I trace this error..? on: 2009-04-22 15:20:31
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  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
        at java.util.ArrayList.add(ArrayList.java:370)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)
        at java.util.SubList.add(AbstractList.java:633)


I keep getting that error.. how do I trace it?
15  Game Development / Newbie & Debugging Questions / ProGuard problem on: 2009-04-18 05:13:09
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
ProGuard, version 4.3
Reading program jar [C:\Users\David\Documents\NetBeansProjects\AutoPatch\dist\AutoPatch.jar]
Reading library jar [C:\Program Files\Java\jre1.6.0_03\lib\charsets.jar]
Reading library jar [C:\Program Files\Java\jre1.6.0_03\lib\deploy.jar]
Reading library jar [C:\Program Files\Java\jre1.6.0_03\lib\javaws.jar]
Reading library jar [C:\Program Files\Java\jre1.6.0_03\lib\jce.jar]
Reading library jar [C:\Program Files\Java\jre1.6.0_03\lib\jsse.jar]
Reading library jar [C:\Program Files\Java\jre1.6.0_03\lib\local_policy.jar]
Reading library jar [C:\Program Files\Java\jre1.6.0_03\lib\management-agent.jar]
Reading library jar [C:\Program Files\Java\jre1.6.0_03\lib\plugin.jar]
Reading library jar [C:\Program Files\Java\jre1.6.0_03\lib\resources.jar]
Reading library jar [C:\Program Files\Java\jre1.6.0_03\lib\rt.jar]
Reading library jar [C:\Program Files\Java\jre1.6.0_03\lib\US_export_policy.jar]
Warning: javax.swing.JFrame: can't find superclass or interface javax.swing.TransferHandler$HasGetTransferHandler
Warning: there were 1 unresolved references to classes or interfaces.
         You may need to specify additional library jars (using '
-libraryjars'),
         or perhaps the '
-dontskipnonpubliclibraryclasses' option.
Please correct the above warnings first.


I get this error in proguard.. but I never even referenced that class in my project..

any help?

Thanks
16  Game Development / Newbie & Debugging Questions / Re: URL.openStream() very slow.... on: 2009-04-16 10:57:35
Try URL.openConnection().getInputStream()? or a new thread
17  Game Development / Newbie & Debugging Questions / Re: Applet security.. on: 2009-04-14 12:46:31
I think he got some totally different security Exception (when setting the thread's name), and then tried to remove the security manager with System.setSecurityManager(null).



It shouldn't be a problem to set the name of a Thread in its constructor.

yeah thats exactly what happened.. Apache MINA tries to set the name of a thread and it gave an exception. I can't go and edit the MINA libraries..
18  Game Development / Newbie & Debugging Questions / Applet security.. on: 2009-04-14 05:55:23
1  
2  
3  
4  
5  
6  
7  
8  
9  
java.security.AccessControlException: access denied (java.lang.RuntimePermission setSecurityManager)
   at java.security.AccessControlContext.checkPermission(Unknown Source)
   at java.security.AccessController.checkPermission(Unknown Source)
   at java.lang.SecurityManager.checkPermission(Unknown Source)
   at java.lang.System.setSecurityManager0(Unknown Source)
   at java.lang.System.setSecurityManager(Unknown Source)
   at drc.Main.init(Main.java:74)
   at sun.applet.AppletPanel.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)


I keep getting that. Even if I try to change a thread's name I get that error. Any workaround?
19  Game Development / Newbie & Debugging Questions / Re: EasyOGG volume on: 2009-04-11 20:18:30
ahh nevermind I mixed your class with kev's class and it worked  Cool
20  Game Development / Newbie & Debugging Questions / Re: EasyOGG volume on: 2009-04-11 19:37:18
hmm.. loop won't work for me, I edited the class.
21  Game Development / Newbie & Debugging Questions / Re: EasyOGG volume on: 2009-04-11 19:31:24
ok thanks it works like a charm  Grin
22  Game Development / Newbie & Debugging Questions / Re: EasyOGG volume on: 2009-04-11 19:04:31
I wrote a OggClip that you can find here:

Improving EasyOgg

It has linear volume and 1 is unchanged. In EasyOgg 1 will increase the volume of the original file.

hmm.. can you volume change while the ogg is playing?
23  Java Game APIs & Engines / Java Sound & OpenAL / Re: EasyOGG doesn't work in Jar? on: 2009-04-11 17:38:27
use getClass().getClassLoader().getResourceAsStream("song.ogg")
24  Game Development / Newbie & Debugging Questions / Re: EasyOGG volume on: 2009-04-11 17:32:49
Try setGain(0.5**f?**);

 Huh
25  Java Game APIs & Engines / Java Sound & OpenAL / Re: EasyOGG doesn't work in Jar? on: 2009-04-11 16:46:33
what do yo mean "inside"
26  Game Development / Newbie & Debugging Questions / EasyOGG volume on: 2009-04-11 12:58:15
How do I set the volume on EasyOGG? I tried setGain but all it does is mutes the music even if I use 1.0f..
27  Game Development / Newbie & Debugging Questions / Re: java.util.ConcurrentModificationException on: 2009-04-10 17:45:55

Unfortunately, that will become extremely slow when your lists get bigger. Every item you remove, will have to be searched throughout the whole list, and on average located in the center of the list. Every remove will also be very slow in an ArrayList (it has to shift all references after the index, to the left - a LinkedList is much faster, but slower to build).

When you're removing lots of items, or removing few items on a large list, it will become a serious performance bottleneck.

The alternative it so copy everything into a list that you keep, as apposed to remove. Adding to an ArrayList is very fast, and you never have to remove an item.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
List items = new ArrayList();
List retain = new ArrayList();

for(Object item: items)
{
    if(needed(item))
    {
        retain.add(item);
    }
}

items.clear();
items.addAll(retain);


That was what I used to do, and it created 1 linkedlist every 20 millseconds therefore lagging the game out.
28  Game Development / Newbie & Debugging Questions / Re: java.util.ConcurrentModificationException on: 2009-04-10 16:57:43
Ahh I see. Thanks for the help.
29  Game Development / Newbie & Debugging Questions / Re: java.util.ConcurrentModificationException on: 2009-04-10 16:30:40
Will that cause memory leaks coping it every 20 millseconds?
30  Game Development / Newbie & Debugging Questions / Re: java.util.ConcurrentModificationException on: 2009-04-10 16:06:26
what if I HAVE to modify it, for example its removing the monster from the map but the panel is still iterating through the paint method..?
Pages: [1] 2 3 ... 7
 

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

The first screenshot will be displayed as a thumbnail.

Dwinin (21 views)
2014-09-12 09:08:26

Norakomi (55 views)
2014-09-10 13:57:51

TehJavaDev (66 views)
2014-09-10 06:39:09

Tekkerue (33 views)
2014-09-09 02:24:56

mitcheeb (54 views)
2014-09-08 06:06:29

BurntPizza (38 views)
2014-09-07 01:13:42

Longarmx (24 views)
2014-09-07 01:12:14

Longarmx (30 views)
2014-09-07 01:11:22

Longarmx (28 views)
2014-09-07 01:10:19

mitcheeb (37 views)
2014-09-04 23:08:59
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!