Show Posts
|
|
Pages: [1] 2
|
|
2
|
Game Development / Networking & Multiplayer / http sniffer
|
on: 2011-06-01 12: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?
|
|
|
|
|
5
|
Game Development / Game Mechanics / Re: Specialized Data Structure
|
on: 2011-03-04 15: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).
|
|
|
|
|
14
|
Games Center / Featured Games / Re: Minecraft
|
on: 2010-06-24 12: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 acceleratedand the applet won't work any more. I run this on a low-end p4 (2.  500MB RAM winxp-sp3 machine with a simple VGA graphics driver.
|
|
|
|
|
19
|
Games Center / WIP games, tools & toy projects / Re: The Chipped Dagger 2D MMO -- Alpha Testing
|
on: 2010-04-27 19: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.
|
|
|
|
|
23
|
Game Development / Newbie & Debugging Questions / Re: Why doesn't this work again??
|
on: 2009-11-22 09: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 09: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?
|
|
|
|
|
27
|
Game Development / Networking & Multiplayer / Single sign-on for jsp-website and applet
|
on: 2009-10-24 23: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 16: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, ...call it every single timestep for good measure.
|
|
|
|
|
29
|
Game Development / Newbie & Debugging Questions / Re: Java superposition problem
|
on: 2009-10-19 08: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; } public void mouseClicked(MouseEvent me) { ; } public void mouseEntered(MouseEvent me) { ; } public void mouseExited(MouseEvent me) { ; } public void mousePressed(MouseEvent me) { ; } public void mouseReleased(MouseEvent me) { int sensitiveareaLeftX = 100,sensitiveareaRightX = 200,sensitiveareaTopY = 150,sensitiveareaBottomY = 50; if (me.getButton() == MouseEvent.BUTTON1) { if ((me.getX() >= sensitiveareaLeftX)&&(me.getX() <= sensitiveareaRightX)&& (me.getY() >= sensitiveareaBottomY)&&(me.getY() >= sensitiveareaTopY)) { if (myOwner != null) { myOwner.sensitive_area_was_clicked(); } } } } } |
Then you instantiate this new class instead: 1 2 3
| FenetreLabel label = new FenetreLabel (this); Image image = Toolkit.getDefaultToolkit().createImage("background.gif");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!"); } |
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|