Java-Gaming.org Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (565)
Games in Android Showcase (151)
games submitted by our members
Games in WIP (606)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2 3 ... 10
 1 
 on: 2015-03-31 20:28:42 
Started by DrakosKai - Last post by DrakosKai
I probably shouldn't respond any further on this thread.  But I feel like most people are focusing on each line of my post independently of the others and thus taking my point out of context. So I will state and then be done.

The model of the disruptor is a very good example of how to implement a non-locking threading algorithm in Java.  Personally I made a completely different version of it that also combines in with a work stealing queue.  Well, by "made" I mean "is mostly done and currently testing and tweaking".  

The reason I have faith in this pattern is because it is used in successful game engines already(Thanks id Software for sharing).  id uses a similar pattern to the disruptor--

http://fabiensanglard.net/doom3_bfg/threading.php

https://github.com/id-Software/DOOM-3-BFG

--however, this is in C++ so that's where the source to the disruptor comes in. Personally, I think if taken in context, these two pieces of information are gold as far as Java gaming is concerned.

 2 
 on: 2015-03-31 19:35:34 
Started by BurntPizza - Last post by Longor1996
I was bored and have a headache... so I wrote a tiny template library.
Its only 150 lines of code and does exactly what I want and nothing else.

It turns this:
1  
Hello, %{name}! How are you? I am %{feel}.


Into this:
1  
Hello, You! How are you? I am fine.


Within (edit)0,0003 seconds 2 ms. Not that bad for a first try!

(edit): And now you can look at the nightmare of code I created (just for fun)! http://pastebin.com/QHTbPAys

 3 
 on: 2015-03-31 19:30:36 
Started by BurntPizza - Last post by basil_
i did enjoy jetty without the fiddly xml files. look for jetty embedded .. like https://wiki.eclipse.org/Jetty/Tutorial/Embedding_Jetty.

just a public static main() and the server.

 4 
 on: 2015-03-31 19:04:09 
Started by BurntPizza - Last post by opiop65
Delved into Apache Tomcat, and the wide world of Servlets. I feel a little lost, but I'm making headway!

If anyone has any good blogposts or explanations of Servlets or Tomcat, I would definitely throw you a medal Wink

 5 
 on: 2015-03-31 18:46:54 
Started by Cero - Last post by nsigma
Well, the video playback libraries I've seen so far haven't exactly been crossplatform. Having more 3rd party dependencies isn't really a good thing, and native code seems to be a lot more tricky to get right.

GStreamer is cross platform, and work is ongoing to get the Java bindings supporting v1.x, though v0.10 works well (try out Praxis LIVE!  Wink )

VLC is cross platform, though Java bindings could be a license issue.

FFMPEG / libAV is cross platform, and there are various bindings, including ... ^^ thanks for the link @basil_ - that looks really interesting.  EDIT - And AGPL!  Emo

 6 
 on: 2015-03-31 18:31:17 
Started by Cero - Last post by theagentd
Mind you, if you're using OpenGL, why would you want to do video decoding in Java?!
Hmm? Why not? I want prerendered cutscenes, tutorial movies, etc.

That's not the answer to my question!  Tongue

If you're using OpenGL, you're already using native code.  So, why not use a native video library?  A native video library running on the CPU is likely to perform better, and also not bring all that data into Java memory if you're uploading directly to OpenGL.  And given the right library, you might even be able to get GPU video decoding.

So, my question was not why you might want to play videos, but why you want the decoding done in pure Java?
Well, the video playback libraries I've seen so far haven't exactly been crossplatform. Having more 3rd party dependencies isn't really a good thing, and native code seems to be a lot more tricky to get right.

 7 
 on: 2015-03-31 18:11:08 
Started by MrPork - Last post by BurntPizza
Instead of sampling in Cartesian space (x,y coordinates), try polar. Random angle between 0-2π, random radius (distance from center of cluster) between 0 and whatever the radius of your cluster is. That will give a circular cloud of uniform density, and you can play with probability distributions to get non-uniform densities.

Alternatively take your rectangular clusters and trim them into whatever shape you want. (i.e. filter by distance from center, perhaps with a soft threshold) This would actually be easier.

 8 
 on: 2015-03-31 18:02:58 
Started by Cero - Last post by basil_
a couple weeks ago i was looking on https://github.com/artclarke/humble-video .. which looks promising. not pure java.

 9 
 on: 2015-03-31 17:46:21 
Started by BloodShura - Last post by Longor1996
Try to use a Octtree for this: http://en.wikipedia.org/wiki/Octree

You frustum cull against the octree, only drawing the nodes of the tree with actual content that are inside the frustum.

Edit:
A grid could also work, but since you said your 'objcts' can be bigger than '1' that probably means that they can overlap the cells of the grid, which might be a problem.

 10 
 on: 2015-03-31 17:28:10 
Started by DrakosKai - Last post by Riven
Disruptor was developed for a system dealing with financial transactions, where messages are tiny and abundant, and microsecond latency can cost a fortune. Their core logic is single threaded on 1 node. Their bottlenecks are not usually found in game-engines, where typical tasks take a lot longer than mere micro-seconds.

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.

Pages: [1] 2 3 ... 10
 
ags1 (13 views)
2015-03-31 10:55:12

theagentd (13 views)
2015-03-27 23:08:20

wxwsk8er (54 views)
2015-03-20 15:39:46

Fairy Tailz (47 views)
2015-03-15 21:52:20

Olo (29 views)
2015-03-13 17:51:59

Olo (32 views)
2015-03-13 17:50:51

Olo (39 views)
2015-03-13 17:50:16

Olo (44 views)
2015-03-13 17:47:07

ClaasJG (58 views)
2015-03-10 11:36:42

ClaasJG (42 views)
2015-03-10 11:33:01
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

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27
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!