Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (581)
Games in Android Showcase (162)
games submitted by our members
Games in WIP (632)
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 ... 294
1  Discussions / Jobs and Resumes / Re: Composer / Producer / Guitarist - Available on: 2015-05-25 13:43:12
At the very least tell us what was updated Pointing
2  Game Development / Networking & Multiplayer / Re: NitroNet - New, High-Level Networking Library on: 2015-05-25 12:31:53
I'm way too busy to turn my semi-rant-style into proper educational material. Pointing
3  Game Development / Networking & Multiplayer / Re: NitroNet - New, High-Level Networking Library on: 2015-05-25 12:01:28
... and the advantage would be blocking behaviour, for both reads and writes.

The code complexity increases quickly, even for trivial cases, like prefixing a length to a payload.

With a blocking API, it would be along the lines of:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
public void writePacket(byte[] payload, OutputStream out) {
   if(payload.length >= 64*1024)
      throw new IllegalArgumentException("payload too big");
   dos = new DataOutputStream(out);
   dos.writeUnsignedShort(payload.length);
   dos.write(payload);
}

public byte[] readPacket(InputStream in) {
   dis = new DataInputStream(in);
   int len = dis.readUnsignedShort();
   byte[] payload = new byte[len];
   dis.readFully(payload);
   return payload;
}


With a non-blocking API, you'd be looking at state machines, keeping track of various things, including whether you've read too few or even too many bytes, timeouts, etc. With blocking IO you can just shove a BufferedInputStream/BufferedOutputStream in the middle to minimize jumping into kernel-space too often. Reproducing that behaviour with NIO will mean writing a few hundred lines of code, that will be horribly broken, if written by a novice. When using non-blocking IO as a novice, you pretty much have to resort to network libraries that do the heavy lifting for you, even for the most trivial case like the one described above.

As long as many JGO members get confused by terms as buffer.flip(), buffer.rewind(), buffer.clear(), NIO would be way beyond their capabilities, at that point in time.
4  Discussions / General Discussions / Re: Four hour downtime as mysql tumbled on: 2015-05-25 10:49:56
I do not use uptimerobot, I use Pingdom, which can be configured to check for specific words in the http-response. This 'JGO check' has been active since 2010, I forgot about it - yesterday I connected it to my smartphone & email.



http://stats.pingdom.com/1iyt8llwhe3z

I case you're wondering where the dreaded 4 hour gap is: I added the http-response check only yesterday. It shows the 3min down-time, as I took MySQL down, eventhough Apache was still up. I set it up to check for availability every minute, and get notified when 5min consecutive checks fail.
5  Discussions / General Discussions / Re: Four hour downtime as mysql tumbled on: 2015-05-24 15:14:40
I took JGO down for 3 minutes to check whether the down-alert emails/SMS/app-notifications were properly harassing me. Next time JGO goes down I'll know. Trust me, I'll know.
6  Game Development / Networking & Multiplayer / Re: NitroNet - New, High-Level Networking Library on: 2015-05-23 22:52:16
Looking at it from a totally different perspective, I'm mainly concerned about baked in SQL support. It seems absurdly out of place. There hasn't ever been a use case for this, nor will there ever be. Server-applications have no issue accessing an SQL server, and client-applications should never ever talk to a database directly, no matter how precisely user-privileges are configured. It leaves me a tad mystified as to why, and to me it poorly reflects on the library as a whole, as in Layman's terms: it makes no sense!

It's like a smartphone with advertised support for playing a specific YouTube video. I wouldn't buy it, as it makes me wonder about the process that has led to this.

</nay-sayer>
7  Discussions / General Discussions / Re: Four hour downtime as mysql tumbled on: 2015-05-23 22:42:07
That was purely coincidental. I walked in my bedroom for the first time that day and saw a Skype message. It's as if the universe was trying to tell me something. True story.
8  Discussions / Miscellaneous Topics / Re: I just want to say thank you. on: 2015-05-23 20:02:00
Your donations will be gladly welcomed other there:
http://www.java-gaming.org/content/donate
9  Discussions / General Discussions / Four hour downtime as mysql tumbled on: 2015-05-23 19:59:09
The MySQL server was janked from underneath JGO, giving you the opportunity to finally getting around to do some coding, for once. I'm sorry it took so long for me to notice a skype message by theagentd informing me of these matters, as I was drilling holes in walls and ceilings, and working on my upper body strength as I was attaching curtains to rails and moving them around for a bit.

Having learnt my lesson, I will probably setup some notification mechanism to signal my phone in case JGO goes belly up. I mean, with all the money flowing in from arguably distasteful to downright obscene ads, that's the least I could do, right? Okay!
10  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-05-23 10:25:32
There is no other way than to delete directory structures recursively.
11  Game Development / Performance Tuning / Re: LibGDX Draw with Anti-Aliasing to a non-default FrameBuffer on: 2015-05-20 21:53:54
If everything else fails, you can always do it manually. Render to a texture that is a multiple of the size desired. Then let the GPU generate mipmaps and copy that mipmap layer into a texture, or downsample it yourself. It's much more computationally expensive than proper AA, but as it's part of a pre-rendering effort, you can probably get away with this simple workaround.

Don't forget you can also simply use the draw-(frame)buffer to compose these pre-rendered textures/sprites: clear buffer, draw sprite content, copy to texture, clear buffer, start rendering actually visible content. This is how everybody did it prior to FBOs / pbuffers.
12  Discussions / Miscellaneous Topics / Re: Rust 1.0 has been released on: 2015-05-18 17:17:06
(offtopic) @BurntPizza: eventually every runtime environment is virtualized/abstracted for programmer convenience, why not nanobots. persecutioncomplex




... then again, nanobots would fight rust. (dadum.... tsssh) Emo
13  Game Development / Newbie & Debugging Questions / Re: Ok to assume Instrumentation#retransformClasses(Class....) is synchronous? on: 2015-05-17 18:38:59
I was already a tad confused about your code snippet... Smiley I proposed the pending-list/map as your current approach was pending-item, and needed support for out-of-order invocations.

Either way, I'm still not sure a couple dozen MB warrants any optimisation. If it somehow does, however, GZ and/or serialize to disk. That should be enough of a scare to reconsider your tactics Smiley
14  Game Development / Newbie & Debugging Questions / Re: Ok to assume Instrumentation#retransformClasses(Class....) is synchronous? on: 2015-05-17 17:48:24
A 'massive' increase in bytecode footprint sounds like a misnomer. It's doubling a number that's typically tiny compared to the application. There is also no need to keep it all in memory. Once the class has been transformed, you can remove it from your collection of bytecodes that are loaded-but-not-redefined yet. With this approach it would be surprising to have more than a dozen 'pending' classes at a time in memory, on even the worst behaving VMs. So either way it seems trvial to support this - were reduction of memory footprint seems just as trivial, yet highly likely premature optimisation.
15  Game Development / Networking & Multiplayer / Re: How to properly benchmark server performance. on: 2015-05-17 10:33:24
First of all you instantly jumped into the thread
How else can one join a thread but 'instantly'.

... assuming that I was using a buffer per client setup, and went to deep lengths to explain why said setup wouldn't work. That's great and I'm sure that the information will be useful to someone else in the future that's attempting to use a buffer/client setup.

However, with your assumptions you also opted out the options for any other networking setup, such as pooled (Shared) buffers and stateless connections. While I had stated in my thread that we were testing with Netty 5 that does not mean that we did not have other alternatives available, either.
I'm not talking about application managed buffers, but OS managed buffers - see my remark about socket.setReceiveBufferSize(). You cannot pool/recycle these. I'm only talking about OS level sockets, not even addressing Java, libraries or business logic like pooling buffers. As said, it's telling that even routers will not support this use case without modifications. If you have long-term idle TCP connections, a stressed router will drop idle tcp-sessions, after a minute or so. Look at the big boys, their long-polling sessions rarely idle over 45s. You will need to actively send and receive keep-alive packets, and monitor these connections for timeouts. A rough estimate would be that you're performing 350K/45s=7777 keep-alives per second, meaning at the very least ~30,000 tcp packets per second (2x DATA, 2x ACK) and that's just idling overhead. Add chat functionality, which means 1 client's packet (chat message) being replicated towards N clients, and you'll easily find yourself dealing with hundreds of thousands, to millions of tcp packets per second, for the 350,000 concurrent connection use case. It is unlikely a single server (with the hardware you described) is able to handle this, not to mention you will easily saturate your network's bandwidth.

The suggestion to piggyback on existing IRC server software / client libraries, is serious - they solve complex problems, and allow you to worry about the actual service you are building, of which chat is probably a small-subset of desired functionality.

As to answer your original question: benchmarking is the easiest part: just open connections from other peers, like Keith said, simulate some traffic. By pointing out technical challenges of the setup, instead of telling you to open connections - thereby sidestepping the original question, I actually tried to be more helpful. Oh well, given your rather bold response, I'll let others inform you about these matters.
16  Game Development / Networking & Multiplayer / Re: How to properly benchmark server performance. on: 2015-05-16 22:26:04
Why reinvent the wheel. There are, say, open source IRC server & client libraries. Such IRC servers scale almost linearly with cluster size. They are built for this exact purpose.

Anyway, you're in over your head. Hire people with experience on the matter, or it will fail, exactly when the damage of an outage would be worst: when people are flooding in... they won't come back.
17  Game Development / Networking & Multiplayer / Re: How to properly benchmark server performance. on: 2015-05-16 16:42:29
A serversocket can hold at most 64K connections. You'll need a lot of NICs to handle 350K connections on a single server. Also keep in mind each socket has at the very least 8K of buffers (you can safely assume 256K), as your calls to socket.setReceiveBufferSize/setSendBufferSize will be ignored by the OS when passing small values. So let's say 256K (2*128K) per socket times 350K connections; which amounts to 90GB of RAM for socket buffers. Even when you can shave off an order of magniture, by tweaking the OS, that's still 9GB of socket buffers, and the need for NICs to support all connections... To put this in perspective, Twitter had modified (not just tweaked) Linux, put together a monster of a machine with very specific enterprise level hardware and managed 1 million concurrent connections, for which the switches had to be modified too.

My understanding is that with quite some effort, a novice in this area might be able to get 10,000 connections, before it all grinds to a halt.

Long story short: cluster servers, you need that anyway, if you want to create a reliable service. Having only one server to handle everything is a rookie mistake.
18  Discussions / Miscellaneous Topics / Re: What are your habits while you're programming? on: 2015-05-14 09:47:52
Make sure you interrupt yourself every few hours. You mind gets single-tracked after a while, losing the ability to make 'creative cross references'. Leaving your chair to grab a drink, walk around a bit, for a few minutes, and ideas/solutions will pop into your head. Let the subconscious to its tricks, don't suppress it by consciously thinking about the problem.

This is how I roll through life persecutioncomplex
19  Java Game APIs & Engines / Java Sound & OpenAL / Re: Getting TinySound to play .oggs in a .jar on: 2015-05-11 18:25:21
when you make the jar, are you adding another level of compression to the oggs? This *might* have an effect.
It most certainly will not break anything. Worst case would be that the GZ compressed OGG will have grown a tad in size.
20  Discussions / General Discussions / Re: Contacted by a publisher to be a technical reviewer on: 2015-05-11 14:47:29
It's their first offer, probably not their final offer. Do some negotiating, at least $100 should be in it for you. If they refuse, it's obvious they don't value your effort.
21  Discussions / Miscellaneous Topics / Re: Most unusual/weird syntax features in non-joke languages on: 2015-05-10 17:47:27
Javascript:
undefined = 42;
, which is why we all persecutioncomplex are forced to use
if(typeof x === 'undefined')
as opposed to the more concise form:
if(x === undefined)
22  Discussions / Miscellaneous Topics / Re: Most unusual/weird syntax features in non-joke languages on: 2015-05-10 14:36:06
Offtopic: SMF has negative karma. ChrisM enabled it for a brief period and people got pissed off, aggresive, spiteful, insecure, etc. etc. Did you ever see a thriving social network featuring negative feedback? (StackOverflow doesn't count, as it's not much of a community, more of an ego-boosting KB)

Ontopic: <nothing>
23  Game Development / Game Mechanics / Re: Using delta time messes up movement on: 2015-05-08 08:01:06
except the 'rate' variable should be renamed to 'interval', or the logic should be changed.
24  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-05-06 12:12:12
Hm... all ads are configured to be "Safe for Work", I reported the ad to ProjectWonderful. Thanks for the heads up!
25  Game Development / Newbie & Debugging Questions / Re: Setting pixels make blur around pixel!!! on: 2015-05-05 19:59:47
Line 7 and 11 show you don't have a clue about bit logic. On line 7 you are basically ANDing RGB channels into 8 bits, which will contain something meaningless. On line 11 you do the same, but lose most of the relevant bits when left-shifting, and only retaining the least significant bits, effectively ending up with Zero. Luckily the operations on line 7 are disregarded on line 9.

Why would you possibly perform X*Y times the exact same operation if you want to set the color of (X, Y) ??

That you get a nice blurry blob is nothing short of a miracle.

What you are looking for is:
1  
2  
3  
public void setPixel(int x,int y, int col){
   image.setRGB(x,y,col);
}

 Roll Eyes
26  Java Game APIs & Engines / Java Sound & OpenAL / Re: EasyOgg nowhere to be found. on: 2015-05-04 19:59:03
@BurntPizza: apparently it has been fixed... nice. I haven't tried it in over a year.
27  Game Development / Newbie & Debugging Questions / Re: How to order the way in which objects are rendered? on: 2015-05-04 16:12:05
Sort every frame. Optimize only when profiling shows sorting takes longer than, say, 1ms.
28  Java Game APIs & Engines / Java Sound & OpenAL / Re: EasyOgg nowhere to be found. on: 2015-05-04 15:59:13
Major issue with TinySound is that it cannot stream from the audio source, which means it decompresses the entire file during init (can add significant delays), and holds all uncompressed samples in memory throughout playing the file (this can easily be hundreds of MBs).
29  Discussions / Miscellaneous Topics / Re: What do you define as a programming language? on: 2015-05-02 12:00:50
The question whether a programming language is Turing complete, implies that there are programming languages that are not Turing complete.

On a side note: Little Man Computer is a Von Neumann architecture, with opcodes, for which there is an assembly language, which is a programming language. Due to the inherent limitations of the architecture and its opcodes, it is not Turing complete.

On yet another side note: CSS is Turing complete, but nobody would deem it a programming language.
30  Game Development / Newbie & Debugging Questions / Re: Getting errors in CMD on: 2015-05-02 11:53:25
Then your main class is: com.hansi.pong.Game, not Game
Pages: [1] 2 3 ... 294
 
MrMapcom (16 views)
2015-05-23 20:26:16

MrMapcom (22 views)
2015-05-23 20:23:34

Waterwolf (29 views)
2015-05-20 15:01:45

chrislo27 (36 views)
2015-05-20 03:42:21

BurntPizza (72 views)
2015-05-10 15:53:18

FrozenShade (56 views)
2015-05-07 09:11:21

TheLopais (219 views)
2015-05-06 13:36:48

TheLopais (202 views)
2015-05-06 13:35:14

TheLopais (207 views)
2015-05-06 13:33:39

TheLopais (228 views)
2015-05-06 13:32:48
List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00
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!