Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (489)
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] 2
1  Game Development / Networking & Multiplayer / Re: http sniffer on: 2011-06-05 16:43:25
thank you!
2  Game Development / Networking & Multiplayer / http sniffer on: 2011-06-01 10:01:05
I need to acquire a trace of all incoming http requests at a web server. Unfortunately, webservers only log incoming requests that were actually processed, so there's no log of requests that were, either explicitly or implicitly, denied (due to traffic load or other reasons).

Maybe there exists some OS utility to do that? My project currently runs on Windows 7. Or maybe some free software that does?

If not, then I have to use an inverse proxy between the internet and the webserver, to log the request and then forward it. However, this adds a whole new level of complexity, affects the webserver's efficacy, changes the incoming request distribution (as they are filtered by the proxy) and the quality of the proxy's implementation affects the user-perceived webserver responsiveness. Moreover, the http response (and all subsequent communication) will have to be channeled through the proxy as well.

This is a solution I want to steer clear if possible, a typical case of observer affecting the measurements. Or make it as lightweight as possible. Any advice?
3  Java Game APIs & Engines / Java 2D / Re: "Stuttering" in windowed mode using Java2D on: 2011-03-24 09:16:15
... when windowed, my animation although most of the time smooth, when going across the screen can appear to "stutter".

What do you mean "going across the screen"? Dragging the window around with the mouse?
4  Discussions / General Discussions / Re: Tutorials on: 2011-03-15 17:14:04
Thanks! Appreciated!
5  Game Development / Game Mechanics / Re: Specialized Data Structure on: 2011-03-04 14:18:33
I want to use a data structure with a very specific behavior. The general idea is that it acts as an array, but the objects have a permanent location. For example, if three objects were added, they may be assigned the indexes 0, 1, and 2. If object 1 is then removed, the other two objects can still be found at 0 and 2. Once an index is empty, a new object can be reassigned to that index (this is not required though).

The performance requirements are O(1) amortized insert, O(1) delete, O(1) find (by index), and iteration should be O(n) in the number of elements (with a constant factor at least as good as a linked list, preferably closer to array iteration). Most of these requirements would be taken care of by a hash map with carefully chosen keys, but the iteration cost would still be dependent on the capacity, not the actual number of elements.

A double linked list, with two forward and two backward links: one for *any* next/previous element and one for next/previous *non-null* element if the element is non-null (else it could refer to the *null* previous/next).
If you need to fast refer to *any* elements by index, then have also an array pointing to them as well.
The tricky part on those links would be to update them when null becomes non-null and vice versa (although that's when the array can come handy as well, by sequentially scanning forward and backward from updated location/index).
6  Game Development / Game Play & Game Design / Re: RPG on: 2011-02-25 15:14:11
You could help with JCRPG http://jcrpg.blogspot.com   Wink
7  Discussions / General Discussions / Re: Humble Indie Bundle on: 2010-12-18 13:47:06
Bought one as well.

Impressive >125k bundles purchased so far!

Merry Christmas  Grin
8  Discussions / General Discussions / Re: Hey, I'm relatively new to Java. on: 2010-12-15 07:53:43
You could start here http://www.cokeandcode.com/tutorials
9  Game Development / Newbie & Debugging Questions / Re: Help on GUI - Quick Start on: 2010-10-18 10:11:03
http://download.oracle.com/javase/tutorial/uiswing/
10  Game Development / Newbie & Debugging Questions / Re: Network sent Vector only updates once in client? on: 2010-09-29 05:51:50
I remember I've had some problems with serializing Vector objects over the Object streams as well.
Maybe serializing and deserializing the Vectors through Data streams will solve the issue.
11  Discussions / General Discussions / Re: Google AI contest about to start. on: 2010-09-12 13:13:08
I have joined. I'm using text editor and command line for the bots, it feels like going back to school  Tongue

The source code of the server is available http://code.google.com/p/ai-contest/source/browse/trunk/planet_wars/viz/Engine.java and it seems that it only has a time limit per turn, not per client - so it may be your bot that timed-out because you were left with too few msec in that turn by your opponent(s).

delt0r, what would you propose for best optimization in that loop?
12  Game Development / Newbie & Debugging Questions / Re: Does anyone have a good way of creating a copy of a class? on: 2010-07-13 19:21:57
what do you mean clone,duplicate,contructors fail?

Is it something like:

MyClass b = a.clone(); or a.duplicate();  or new MyClass(a);

then a == b fails?

try to override equals() (and maybe hashcode as well),
I think you'll find the problem there...
13  Discussions / Miscellaneous Topics / Re: I'm Married on: 2010-06-25 16:52:16
Congratulations! Welcome to the club  Wink
14  Games Center / Featured Games / Re: Minecraft on: 2010-06-24 10:24:40
I try to play the game (both in survival and creative mode) but while all packages load ok, in the end I get the message alert:
org.lwjgl.LWJGLException: Pixel format not accelerated
and the applet won't work any more.

I run this on a low-end p4 (2.Cool 500MB RAM winxp-sp3 machine with a simple VGA graphics driver.
15  Game Development / Newbie & Debugging Questions / Re: Scrolling 2D Image problem on: 2010-06-18 07:07:19
Put a panel in your frame (and set layout null) then put a canvas in that panel and setIgnoreRepaint(true) and have the canvas createBufferStrategy(2) and then request focus.
That solved all flickering issues I've had.
16  Game Development / Newbie & Debugging Questions / Re: Problem creating a timeline GUI on: 2010-05-11 16:38:46
if you're using System.currentTimeMillis() to get the timestamps (as you probably are seeing that they are milliseconds) then you should be using longs (instead of ints) to hold them.
17  Discussions / General Discussions / Re: Geting started in game programming on: 2010-05-05 09:06:49
Kev's coke&code is the best place to start imho.

http://www.cokeandcode.com/tutorials
18  Games Center / WIP games, tools & toy projects / Re: The Chipped Dagger 2D MMO -- Alpha Testing on: 2010-04-29 12:50:03
@adon

Did you get this error more than once?  It appears it timed out.  I haven't had any other reports of this issue.

Yep, I get it each and every time I start the game.
19  Games Center / WIP games, tools & toy projects / Re: The Chipped Dagger 2D MMO -- Alpha Testing on: 2010-04-27 17:19:10
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  
java.net.ConnectException: Connection timed out: connect
   at java.net.PlainSocketImpl.socketConnect(Native Method)
   at java.net.PlainSocketImpl.doConnect(Unknown Source)
   at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
   at java.net.PlainSocketImpl.connect(Unknown Source)
   at java.net.SocksSocketImpl.connect(Unknown Source)
   at java.net.Socket.connect(Unknown Source)
   at java.net.Socket.connect(Unknown Source)
   at sun.net.NetworkClient.doConnect(Unknown Source)
   at sun.net.www.http.HttpClient.openServer(Unknown Source)
   at sun.net.www.http.HttpClient.openServer(Unknown Source)
   at sun.net.www.http.HttpClient.<init>(Unknown Source)
   at sun.net.www.http.HttpClient.New(Unknown Source)
   at sun.net.www.http.HttpClient.New(Unknown Source)
   at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
   at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
   at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
   at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.getJSFileFromURL(Unknown Source)
   at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.init(Unknown Source)
   at com.sun.deploy.net.proxy.DynamicProxyManager.reset(Unknown Source)
   at com.sun.deploy.net.proxy.DeployProxySelector.reset(Unknown Source)
   at com.sun.javaws.Main.initializeExecutionEnvironment(Unknown Source)
   at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
   at com.sun.javaws.Main$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

 
I get this error in the console before the game starts. Then the login screen appears and login happens normally.
20  Game Development / Newbie & Debugging Questions / Re: Synchronization : online game on: 2010-04-19 09:33:17
Maybe this article will be of use:

http://gafferongames.com/game-physics/fix-your-timestep/
21  Game Development / Networking & Multiplayer / Re: Farewell Project Darkstar on: 2010-02-04 07:37:05
It seems Jeff won't let it die:

http://www.projectdarkstar.com/forum/?topic=1544.msg10441

 Smiley Smiley Smiley
22  Game Development / Networking & Multiplayer / Re: mmorpg engine on: 2010-02-03 16:29:16
Just a heads up, Oracle is discontinuing the Project Darkstar (http://www.projectdarkstar.com/forum/?topic=1540.0;topicseen)   Sad
23  Game Development / Newbie & Debugging Questions / Re: Why doesn't this work again?? on: 2009-11-22 08:25:36
I think that in the way you're doing it, you are hiding the parent data member with a child data member, of which the parent has no knowledge, so parent's data member is called instead in parent's method.

Try this instead, using parent's data member to hold the information:
1  
2  
3  
4  
5  
6  
public class Enemy extends Combatant{
   public Enemy() { name = "Dragon"; }
}
public class Player extends Combatant{
   public Player () { name = "Hero"; }
}
24  Game Development / Networking & Multiplayer / Re: Single sign-on for jsp-website and applet on: 2009-10-27 08:48:18
@steveyO:
OK, got it now.
There may be a security issue here, I wonder how can jogre just validate against the username.
side-note: Isn't the serverhost param superfluous? I mean applets are not allowed to connect to sites other than the ones that downloaded them, right?

@Karmington:
Appler is just a class in a jar, couldn't it have been loaded from outside the private context?
As from a saved in browser offline content?
So I assumed that on init() the applet will offer credentials again, instead of considering 'any' connecting applet to the server as 'trusted'.
I guess your proposal chimes with steveyO's, right?

On the IP issue: The IP is updated with each succesful jsp login, so no problem with dynamic IPs.
Cookie: how can an applet read one?
25  Game Development / Networking & Multiplayer / Re: Single sign-on for jsp-website and applet on: 2009-10-27 06:21:41
@Karmington:
Browsers remember things like that with cookies (but users have the option to disable them).
And how can an applet read the cookie?

@SteveyO:
So you just echo back to the client, in the html code that initiates the applet, the username/password that was initially entered?
Is this secure?
26  Games Center / WIP games, tools & toy projects / Re: Space prototype thing on: 2009-10-25 16:42:40
Works fine - no glitches or pauses. Good work!
27  Game Development / Networking & Multiplayer / Single sign-on for jsp-website and applet on: 2009-10-24 21:41:53
I have developed a jsp website (runs on tomcat) and the user logs in/out.
A part of the protected content involves a client/server minigame that runs on an applet and custom (nio) server.
They both share the same backend mySql database.

I'd like to have the player only login once, at the jsp login - then the applet should know who's playing and where to store the results etc.

The only way I've come up for doing it, is to have tomcat store the opened logined session in the database:
<username><password><status:logined><since:19239048566><ip:1.2.3.4>
When the applet loads, it connects on the custom java server, which looks up the IP info in the DB, and if status is 'logined' then the minigame starts.
If not, then it denies access to the applet and updates the record in the db (for web server's update).

Can anyone think of something better?
28  Game Development / Newbie & Debugging Questions / Re: Activating Keyboard Input on: 2009-10-19 14:50:14
(For those that don't read the manuals)

Use requestFocusInWindow() instead of requestFocus().
"The focus behavior of this method can be implemented uniformly across platforms..." while the other's "...focus behavior is platform-dependent".

If it won't work in the constructor,
Quote from: Demonpants
...call it every single timestep for good measure.
29  Game Development / Newbie & Debugging Questions / Re: Java superposition problem on: 2009-10-19 06:05:58
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
class FenetreLabel extends JLabel implements MouseListener {
   private FenetreFrame myOwner = null;
   public FenetreLabel(FenetreFrame frameowner) { myOwner = frameowner; }
   //MouseListener methods
  public void mouseClicked(MouseEvent me) { ; } //Invoked when the mouse button has been clicked (pressed and released) on a component.
   public void mouseEntered(MouseEvent me) { ; } //Invoked when the mouse enters a component.
   public void mouseExited(MouseEvent me) { ; } //Invoked when the mouse exits a component.
   public void mousePressed(MouseEvent me) { ; } //Invoked when a mouse button has been pressed on a component.
   public void mouseReleased(MouseEvent me) { //Invoked when a mouse button has been released on a component.
      int sensitiveareaLeftX = 100,sensitiveareaRightX = 200,sensitiveareaTopY = 150,sensitiveareaBottomY = 50;
       if (me.getButton() == MouseEvent.BUTTON1) { //Capture left mouse button only
         if ((me.getX() >= sensitiveareaLeftX)&&(me.getX() <= sensitiveareaRightX)&&
             (me.getY() >= sensitiveareaBottomY)&&(me.getY() >= sensitiveareaTopY)) {
                //release was inside sensitive area
               //do whatever needs doing
               if (myOwner != null) { myOwner.sensitive_area_was_clicked(); }
          } // else {} the other sensitive areas...
      }
    }
}

Then you instantiate this new class instead:
1  
2  
3  
FenetreLabel label = new FenetreLabel (this);
Image image = Toolkit.getDefaultToolkit().createImage("background.gif");// nouveau JLabel backgound
label.setIcon(new ImageIcon(image));

and somewhere in the frame you implement the called method:
1  
public void sensitive_area_was_clicked() { System.out.println("Sensitive area!"); }//do whatever needs doing
30  Game Development / Networking & Multiplayer / Re: Small online 2d RPG game, single vs. multithread server? on: 2009-10-18 08:25:38
Non-blocking I/O is just blocking, with the threads I mentioned spawned in the background.
Not much easier to use or control concurrency, than the blocking home-brewed version I described.

I think DzzD's approach is the most scalable thread-wise.
Pages: [1] 2
 

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 (18 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 (70 views)
2014-08-11 02:49:23

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

BurntPizza (38 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!