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 ... 343
1  Game Development / Networking & Multiplayer / Re: NitroNet - New, High-Level Networking Library on: 2015-05-25 12:16:07
You know, I think a wiki page about networking with a Java flavour would be a welcome topic.

Cas Smiley
2  Game Development / Networking & Multiplayer / Re: NitroNet - New, High-Level Networking Library on: 2015-05-25 11:54:44
I'd say you could comfortably handle a couple of hundred clients with normal threads nowadays.

Cas Smiley
3  Discussions / General Discussions / Re: Java 8 - Stream vs Loop on: 2015-05-25 09:02:44
I'd say go with whatever is easiest to understand what it's doing when you look at it. I confess that though I love lambas and use them willy nilly all over the place now that the lambda version hides much of its intent behind API whereas the explicit version shows you clearly what it is doing exactly.

Cas Smiley
4  Game Development / Networking & Multiplayer / Re: Handling both UDP and TCP input. Multithreading? on: 2015-05-25 09:00:13
While you're just getting stuff to work... I'd go for normal IO, and not use UDP at all. That'd leave you with one main server accept-thread, and then two threads per client.

If you must use UDP, you can handle all UDP traffic from all clients on one thread. You might find thought that if you've got any significant communication over both protocols at the same time though that one or both of them will suffer unexpectedly a lot.

Cas Smiley
5  Game Development / Networking & Multiplayer / Re: Handling both UDP and TCP input. Multithreading? on: 2015-05-24 12:00:18
Hm that's true but I wonder if the OP is actually seeing problems where none actually exist. One thread each per TCP and UDP connection is small beans if there's less than a hundred clients, say. More importantly we might wonder why the mixture of TCP and UDP in the first place, as the two rarely coexist nicely.

Cas Smiley
6  Game Development / Networking & Multiplayer / Re: Handling both UDP and TCP input. Multithreading? on: 2015-05-24 09:13:48
Don't use blocking IO; use non-blocking Channels along with a Selector.
It should be just as simple to just use a thread-per-client model with blocking IO... you might want to give your reasons for the advice.

Cas Smiley
7  Discussions / Miscellaneous Topics / Re: Rust 1.0 has been released on: 2015-05-19 11:31:32
Hrmm... no, G1 slashed framerates by half in my latest creation. I've not specified any GC options on the commandline (Java 8, 32 bit, server VM) and get perfect behaviour. What's Java 8 server VM using by default these days?

Cas Smiley
8  Discussions / Miscellaneous Topics / Re: Rust 1.0 has been released on: 2015-05-19 11:04:22
Ah yes, but which one would you say was most useful for games?

Cas Smiley
9  Discussions / Miscellaneous Topics / Re: Rust 1.0 has been released on: 2015-05-19 09:29:22
The best GC in HotSpot for the problem space is being removed.
eh what? What's happening here?

Cas Smiley
10  Discussions / Miscellaneous Topics / Re: Rust 1.0 has been released on: 2015-05-18 10:16:47
- Not having to worry about the GC causing lag.
That's an interesting one esp. on a Java-centric forum like this one where I don't think anyone who's written any serious Java code for the last ... hmm ... 10 years or so has actually ever noticed GC occurring because it's just so fast for almost every use-case it's ever put to. A more pertinent issue with GC based systems is that they tend to require considerably more resources up-front than non-GC systems though it's remarkably tuneable and again, in most places it's deployed, not actually a relevance.

Cas Smiley
11  Discussions / Miscellaneous Topics / Re: Rust 1.0 has been released on: 2015-05-18 10:12:12
Speedwise it's apparently approximately the same as Java/C# JIT code.

Cas Smiley
12  Discussions / Miscellaneous Topics / Re: Most unusual/weird syntax features in non-joke languages on: 2015-05-10 15:05:12
I actually agree, wasn't being serious Wink

On topic: All LISPs qualify for this thread.

Cas Smiley
13  Discussions / Miscellaneous Topics / Re: Most unusual/weird syntax features in non-joke languages on: 2015-05-09 10:22:14
We need some sort of "throw steaming turd" button next to "appreciate"  Grin

Cas Smiley
14  Discussions / General Discussions / Re: What's your day job? on: 2015-05-07 12:21:52
I now work for Seamap, helping to build oxymoronically cetacean friendly oil exploration software. Hopefully the money raised will go towards funding further Battledroid development later in the year.

Cas Smiley
15  Discussions / Miscellaneous Topics / Re: What do you define as a programming language? on: 2015-05-01 10:59:46
 Cranky

Cas Smiley
16  Discussions / Miscellaneous Topics / Re: What do you define as a programming language? on: 2015-05-01 10:12:29
that is, if it's not Turing complete, you might simply consider it "data" instead, to be processed by some other program into something more tangible.

Cas Smiley
17  Discussions / Miscellaneous Topics / Re: What do you define as a programming language? on: 2015-05-01 10:10:02
Turing Complete is a good place to start.

Cas Smiley
18  Discussions / General Discussions / Re: Where can I find fast spatial querying? on: 2015-04-16 08:53:17
For a tower defence game you'll only need a regular cell grid. Well, that's what I've used, and it's plenty fast enough.

Cas Smiley
19  Games Center / Featured Games / Re: [Slick2d] Retro-Pixel Castles > Now on Steam! < on: 2015-04-14 12:13:26
I feel as if I need some sort of additions to the game wrt. attacking/defending. Like soldiers and barracks or something.

Cas Smiley
20  Discussions / General Discussions / Re: Hiring a Java developer on: 2015-04-13 09:27:03
Are you sure we couldn't just answer a few of your questions here?

You could always send some money too of course  Pointing

Cas Smiley
21  Games Center / WIP games, tools & toy projects / Re: RFLEX - A simple, rage-inducing arcade game by Radirius on: 2015-04-07 23:11:45
It's a great concept - similar simplicity and presentation to Super Hexagon, which did rather well.

Cas Smiley
22  Games Center / Featured Games / Re: [Slick2d] Retro-Pixel Castles > Now on Steam! < on: 2015-04-07 22:52:16
Yeeargh, Slick  Pointing Keviiiiiiiiiiiiin!

Cas Smiley
23  Games Center / Featured Games / Re: [Slick2d] Retro-Pixel Castles > Now on Steam! < on: 2015-04-07 22:26:02
Today, I actually had a good sit down this evening and played Retro Pixel Castles for the first time Smiley Can't figure out how to make food! Gah.
While I was playing I had the good sense to profile it, and here is what it produced:
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  
89  
90  
91  
92  
93  
94  
95  
96  
97  
Flat profile of 2278.94 secs (172965 total ticks): main

  Interpreted + native   Method
  0.3%     0  +   258    org.lwjgl.opengl.WindowsDisplay.nGetPbufferCapabilities
  0.0%     0  +    41    org.lwjgl.opengl.WindowsContextImplementation.nSwapBuffers
  0.0%     0  +    32    org.lwjgl.opengl.WindowsDisplay.nResetDisplayMode
  0.0%     0  +    31    java.io.FileOutputStream.close0
  0.0%     0  +    30    org.lwjgl.opengl.WindowsDisplay.nSwitchDisplayMode
  0.0%     0  +    26    org.lwjgl.opengl.GL11.nglGetFloatv
  0.0%     0  +    25    java.net.SocketInputStream.socketRead0
  0.0%     0  +    21    java.net.DualStackPlainSocketImpl.connect0
  0.0%     0  +    21    org.lwjgl.opengl.EXTFramebufferObject.nglCheckFramebufferStatusEXT
  0.0%     0  +    18    sun.nio.ch.FileDispatcherImpl.close0
  0.0%     0  +    14    org.lwjgl.opengl.WindowsDisplay.nDestroyWindow
  0.0%     0  +     9    org.lwjgl.opengl.GL11.nglGetTexImage
  0.0%     1  +     8    org.lwjgl.opengl.GL11.nglGenTextures
  0.0%     0  +     9    org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat
  0.0%     0  +     8    org.lwjgl.opengl.GL11.nglTexImage2D
  0.0%     0  +     7    java.io.RandomAccessFile.close0
  0.0%     0  +     7    java.io.WinNTFileSystem.rename0
  0.0%     0  +     7    org.lwjgl.openal.AL10.nalBufferData
  0.0%     0  +     5    sun.nio.fs.WindowsNativeDispatcher.CreateFile0
  0.0%     0  +     5    java.io.WinNTFileSystem.delete0
  0.0%     0  +     5    org.lwjgl.opengl.WindowsContextImplementation.nDestroy
  0.0%     0  +     4    java.util.zip.ZipFile.close
  0.0%     0  +     4    java.net.NetworkInterface.getAll
  0.0%     0  +     3    java.io.WinNTFileSystem.getLastModifiedTime
  0.0%     0  +     3    java.io.FileInputStream.readBytes
  0.8%    75  +   638    Total interpreted (including elided)

     Compiled + native   Method
  0.4%   375  +     0    rpc.particles.ParticleModule.update
  0.1%   118  +     2    rpc.entities.EntityModule.getMobType
  0.1%    55  +     0    org.newdawn.slick.state.StateBasedGame.update
  0.1%    53  +     0    rpc.utilities.PathFinder.searchForResourceTile
  0.1%    51  +     0    rpc.entities.EntityBase.updateAnimation
  0.1%    43  +     5    rpc.guielements.play.Interface.render
  0.0%    43  +     0    rpc.particles.ParticleModule.render
  0.0%    36  +     2    rpc.utilities.PathFinder.findPath
  0.0%    37  +     0    rpc.entities.EntityBase.combatSearch
  0.0%    32  +     2    rpc.particles.ParticleModule.initController
  0.0%    25  +     0    rpc.entities.EntityReachMap.buildReachMap
  0.0%    23  +     2    rpc.resources.ResourceModule.updateResourceCount
  0.0%    20  +     0    org.newdawn.slick.openal.WaveData.convertAudioBytes
  0.0%    18  +     1    rpc.entities.EntityBase.updateAI
  0.0%    18  +     0    rpc.map.CollisionModule.initController
  0.0%    18  +     0    rpc.objects.ObjectRangeBuilder.createSingleRange
  0.0%    16  +     0    rpc.BackgroundModule.update
  0.0%    13  +     0    rpc.resources.ResourceModule.renderSelection
  0.0%     1  +    10    rpc.LightingModule.addLightStraight
  0.0%     9  +     1    rpc.ShadowModule.initController
  0.0%     7  +     2    rpc.LightingModule.updateLightMap
  0.0%     8  +     0    rpc.utilities.PathFinder.searchForEntity
  0.0%     7  +     0    rpc.entities.EntityModule.update
  0.0%     6  +     0    rpc.entities.essence.EssenceBase.checkTarget
  0.0%     5  +     0    rpc.entities.VillagerUtility.getHarvestingWork
  1.3%  1119  +    62    Total compiled (including elided)

         Stub + native   Method
 56.6%     0  + 52790    org.lwjgl.opengl.GL11.nglGetFloatv
  9.0%     0  +  8399    org.lwjgl.opengl.WindowsContextImplementation.nSwapBuffers
  7.9%     0  +  7382    org.lwjgl.opengl.GL11.nglColor4f
  5.3%     0  +  4962    org.lwjgl.WindowsSysImplementation.nGetTime
  4.4%     0  +  4063    java.lang.Thread.yield
  3.9%     0  +  3677    org.lwjgl.opengl.GL11.nglTexCoord2f
  3.2%     0  +  2968    java.lang.Thread.sleep
  3.0%     0  +  2793    org.lwjgl.opengl.GL11.nglVertex3f
  1.0%     0  +   939    org.lwjgl.opengl.GL11.nglEnable
  0.8%     0  +   765    org.lwjgl.opengl.GL11.nglTranslatef
  0.6%     0  +   528    java.lang.Object.hashCode
  0.5%     0  +   434    org.lwjgl.opengl.GL11.nglBegin
  0.4%     0  +   375    org.lwjgl.opengl.GL11.nglBindTexture
  0.4%     0  +   365    org.lwjgl.opengl.GL11.nglEnd
  0.1%     0  +   106    org.lwjgl.opengl.GL11.nglGenTextures
  0.1%     0  +    68    java.util.zip.Inflater.inflateBytes
  0.1%     0  +    56    org.lwjgl.opengl.GL11.nglCallList
  0.1%     0  +    55    org.lwjgl.opengl.GL11.nglPopMatrix
  0.1%     0  +    51    java.io.FileInputStream.open0
  0.0%     0  +    41    org.lwjgl.opengl.GL11.nglVertex2f
  0.0%     0  +    39    org.lwjgl.openal.AL10.nalSourcef
  0.0%     0  +    38    org.lwjgl.opengl.GL11.nglLoadIdentity
  0.0%     0  +    36    org.lwjgl.opengl.GL11.nglGetError
  0.0%     0  +    34    org.lwjgl.opengl.GL11.nglPopClientAttrib
  0.0%     0  +    31    org.lwjgl.opengl.GL11.nglDisable
 98.0%     6  + 91398    Total stub (including elided)

  Thread-local ticks:
 46.1% 79665             Blocked (of total)
  0.0%     2             Class loader


Global summary of 2278.94 seconds:
100.0% 173043            Received ticks
  0.0%    75             Received GC ticks
  1.9%  3296             Compilation
  0.0%     2             Other VM operations
  0.0%     2             Class loader

 
Note here and there the total lack of any pathfinding code contributing to the CPU usage. In fact notice the total lack of CPU usage. You spend 98% of your time in native code! And half of it is nglGetFloatv, which I can't for the life of me think why you would ever call it.

Cas Smiley
24  Games Center / Featured Games / Re: [Slick2d] Retro-Pixel Castles > Now on Steam! < on: 2015-04-07 21:30:18
Generally the most effective optimisation strategy is discarding the majority of your data persecutioncomplex
... or not doing any optimisation at all, if it's actually fast enough and there's other things to be doing instead Wink

Cas Smiley
25  Games Center / Featured Games / Re: [Slick2d] Retro-Pixel Castles > Now on Steam! < on: 2015-04-07 19:15:24
@Rayvolution: use a PriorityQueue for the open list. It is much faster than inserting values into a sorted array.
Better still, a BinaryHeap. (Source in RotT originally courtesy of pjt33 - still coming in useful to this day!)

Cas Smiley
26  Discussions / General Discussions / Re: Concurrency Library on: 2015-03-31 22:41:39

Sidenote: Why isn't the false sharing issue fixed in ABQ? It seems trivial to add object field padding to force seperate cache lines for these fields.

hmm.. apparently not so trivial after a little investigation. Or at least, not widely known about.

Cas Smiley
27  Game Development / Newbie & Debugging Questions / Re: Best Practise - Quad Trees on: 2015-03-30 15:44:01
Spasi did a nice optimisation and benchmark of a Java quadtree using a structs library in LWJGL.
28  Game Development / Newbie & Debugging Questions / Re: Best Practise - Quad Trees on: 2015-03-30 08:38:24
So, what Roquen was hinting at is that Java might not be a very good language in which to implement a quadtree structure. Of course if you have a box of nails and the only tool you have handy is a hammer,  well, there you are. But why did he say this?

Two aspects of most things in comp sci are the physical structure of things in memory and the algorithms to access them efficiently. Sometimes a thing works really well because the precise way it is laid out in memory makes it extremely efficient to work with, and quadtrees is one of these things. In C, quadtrees are densely packed structures  using pointers to bits of itself, all stored in a contiguous block of memory. It's as efficient as it can possibly be.

In Java, the best you can do is a great big sprawling heap of instances scattered all over memory. Each instance itself has a whole load of extra guff associated with it somewhere else in memory, too. So though on the surface of it, it looks like you've got a neat looking data structure and perfectly simple algorithms, like a swan paddling on a lake it's all serene on top but there's a lot of furious thrashing going on underneath where you can't see it. Then you wonder why it's slower and takes up vast amounts of RAM.

Cas ☺
29  Discussions / Miscellaneous Topics / Re: Python Load Balancing. on: 2015-03-27 14:39:29
Python explodes in flames!

Cas Smiley
30  Game Development / Newbie & Debugging Questions / Re: OSX 10.10 seems to have broken my games on: 2015-03-26 14:42:11
Hm, using 2.9.2 here. Maybe I need to get that updated.

Cas Smiley
Pages: [1] 2 3 ... 343
 
MrMapcom (15 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 (35 views)
2015-05-20 03:42:21

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

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

TheLopais (218 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 (226 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!