Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (600)
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 ... 31
1  Game Development / Newbie & Debugging Questions / Re: String in the Middle off player Depending on String Length! on: 2014-11-30 11:00:34
Try having a look at font.getStringBounds() and use half of the width to offset your position.
2  Discussions / Miscellaneous Topics / Re: How memory works? on: 2014-11-15 13:04:31
AFAIK, the escape analysis is there and it is possible to determine whether an object could be stack allocated, but I am yet to see a JVM that actually does it.

Am I missing something?  I was under the impression that this was enabled by default since 2009!  persecutioncomplex  OK, technically this is scalar replacement not stack allocation, but in this context (not user defined) what would be the difference?  What benefits are missing?
3  Discussions / Miscellaneous Topics / Re: simplifying getter/setter classes on: 2014-11-07 23:09:28
If your setters are doing that much stuff you are doing it wrong.

Yes, better file a bug, 'cause there's loads of classes in the JDK doing all those things! Tongue

In fact, firing events and validating values are kind of a key part of the JavaBean standard - see PropertyChangeListener, VetoableChangeListener, etc.

JFTR, it's not that I'm a great fan of the JavaBeans getter / setter pattern - I prefer fluent interfaces - but just using public fields unless we're talking proper value objects .. yuck!  Wink
4  Discussions / Miscellaneous Topics / Re: simplifying getter/setter classes on: 2014-11-07 12:09:07
public fields.

a good IDE can track write access, so it's as good as tracking the "usage" of a setter.

Did you read my second paragraph?!  Tongue  This is about run-time tracking changes, which an IDE ain't much use for.  Wink
5  Discussions / Miscellaneous Topics / Re: simplifying getter/setter classes on: 2014-11-07 11:25:15
Or better yet, since you're not writing a long lifetime public API used by thousands that are hampered by API changes...don't use getter/settters.

This is getting a lot of medals!  Wink I'm intrigued what your suggested replacement is?

There seems to be an assumption here that setters just set a variable and getters just return a variable.  The majority of uses of setters in my code do much more than that - validate values, fire listeners, invalidate caches, etc.  Even for those minor cases that it is a 'pure' setter, I'd rather leave the option open to add these things in without massive refactoring - even in a private codebase that's still more of a PITA than writing a few setters!

2c  Grin
6  Games Center / WIP games, tools & toy projects / Re: Praxis LIVE v2 - live visual / coding env on: 2014-11-06 21:18:15
Sick. I really need to invent a project to do that involves the use of this.  Pointing
Thanks!  You seen this?  It's what I use it for, anyway.  Grin

And hey, I have that lenovo too!
Awesome laptop, and means I can test on Intel and Nvidia easily.
7  Discussions / Miscellaneous Topics / Re: simplifying getter/setter classes on: 2014-11-06 21:11:18
Still quite a lot of front-end Java work around as far as I can see, though not as much.

Judging from NetBeans RCP mailing lists, etc. there's no shortage of enterprise desktop applications being developed.  I assume other platforms (Eclipse?) may be similar. (my usage of the NetBeans platform for Praxis LIVE is definitely atypical usage. Wink )
8  Games Center / WIP games, tools & toy projects / Re: Praxis LIVE v2 - live visual / coding env on: 2014-11-06 16:10:24
A slightly belated update that a new alpha release is now available, which finally brings distributed hubs into Praxis LIVE.  There are two primary reasons for this - running pipelines in different local processes to reduce GC timing effects (eg. on low-latency audio), and running and working with pipelines running on different machines across a local network.  Read more about it in this blog post.

Here's me editing Java & GLSL code on one laptop while it runs on another laptop.



 .. which does give me one idea that might be useful around here - live-coding GLSL shaders on multiple machines at the same time to test on different graphics cards / OS?

Get it while it's hot,
Praxis LIVE v2.0a3-141101 Download | Release notes
9  Discussions / General Discussions / Re: Give me a topic.. on: 2014-10-23 10:41:03
Avoid strawberries.

(just checking changelog for latest OpenJDK release - Avoid strawberries in LogRecord - WTF?  Clueless )
10  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Announce Pure Java HIDAPI on: 2014-10-22 13:43:24
And of course it uses some native libraries, there is no other way AFAIK, but the native libraries are included in your favourite OS.

JNA is not included in the OS though!  That was the crux of my issue before (not the stoopid "pure" argument  Wink ), but making sure people were clear it needs JNA, which is a native library.  Just linking in the JNA jar works most of the time, but there can be issues with the automatic extraction of the native libs.  Don't get me wrong, I like JNA and have made some minor contribution to it, but it's not always headache free to bring into a project.

Incidentally, on some Linux (eg. recent Ubuntu's), installing things like VisualVM will bring in an old version of JNA to the OS that would stop your code working unless it's setting jna.nosys.  OTOH, forcing extraction won't work on some systems.  NetBeans actually uses a renamed JNA native lib to get around both those issues.
11  Games Center / WIP games, tools & toy projects / Re: Meeting Point (2014) on: 2014-10-21 08:36:37
How does one market such a frivolous yet expensive setup? Which parties are willing to spend 5K to entertain a few dozen bystanders? Festivals seem to be a better, more fitting and lucrative market than the street art shown in the video. I imagine 'build it and they will come' doesn't apply here? So how do you do it? Smiley

The initial development was commissioned by a (UK) lottery-funded festival, but in terms of the future we're also looking at involving commercial sponsors and also festivals in the way you mean (there are a lot of festivals that do "street art").  In terms of doing things out on the street, which we enjoy doing (where else can you get young families and street drinkers interacting positively?), then this isn't actually that expensive.  "Frivolous" is a case of perspective - frivolity is a good thing - games are frivolous!  Wink

As for "a few dozen bystanders", that's at any particular time.  This project ran for ~4 hours a night for 4 nights in a busy public square - it was seen by 1000's and 100's of people had a go!
12  Games Center / WIP games, tools & toy projects / Meeting Point (2014) on: 2014-10-20 18:56:01
So, just over a year ago I posted information on a project Digital Prisoner's built called Meeting Point.  Earlier this year we were commissioned to update the project, and we've finally got around to putting up a video of it so I thought I'd share it with you all.  Hope you enjoy!  Grin

<a href="http://www.youtube.com/v/9D3cJDRF6Do?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/9D3cJDRF6Do?version=3&amp;hl=en_US&amp;start=</a>

EDIT - Changed video for short promo version - full video here.

About

At Digital Prisoners we're interested in creating interactive things for people to play with out in the real world.  Meeting Point is a large-scale interactive projection designed for an urban public space. It uses two infra-red cameras mounted at opposite sides of the space, custom computer software and a large-scale projector.  The work allows the two participants to interact with each other and, through motion detection, with the other audio and visual elements of each section.  For example, the record scratching section allows them to control the spin on screen and the sound of the record by moving from side to side.

Technical Details

Yes, it's Java-based and built using Praxis LIVE (see recent thread).  More details of the technology are in last year's thread.

As you'll see, it's developed quite a lot.  I'm hoping to get some of the GLSL video FX up in the Praxis LIVE sub-graph repo soon.

And I still think it qualifies as a game!  Wink  Mind you, if you want to play with you'll need a large space and ~¬£5k.

13  Game Development / Newbie & Debugging Questions / Re: Best way to iterate through ArrayList? on: 2014-10-16 16:38:01
That thread ended up with an even simpler implementation using no extra space and very cache-friendly, and also has the ability to allow new things to be added to the list while it's iterating:

Ah, nice, I'd forgotten or not read that bit!  Smiley

Quote
1  
// This next bit could be implemented more efficiently probably if the list had some sort of truncation method

Subclassing ArrayList and using removeRange(..) might be slightly more efficient?
14  Game Development / Newbie & Debugging Questions / Re: Best way to iterate through ArrayList? on: 2014-10-16 10:15:13
About the loops: GoToLoop's (heh) is better than Cero's for ArrayList simply because it avoids large copies.

If order isn't important to you! In fact, @Cero's answer would also be problematic if order was important.  I remember someone (think @princec) posting a technique in an old thread on this using two ArrayLists, and ping-ponging valid values between them, which avoids most large array copies and retains the ordering.

As I said in my answer above, there is not really a way to answer the OP's question without context, and for that matter the question may be incorrect assuming ArrayList answers that problem in the first place.  One rarely iterates ArrayLists just for the hell of it!  Wink
15  Game Development / Newbie & Debugging Questions / Re: Best way to iterate through ArrayList? on: 2014-10-15 09:47:50
Just as a note, I will be iterating through it a lot so what is actually the best way which is easiest and the best?

What about modifying it a lot?  Do you need to modify the list while iterating it?

Both those questions may impact on the right solution.  In Praxis LIVE I have various 'collections' which are iterated often, modified rarely and occasionally modified while iterating.  I'm actually using arrays and this simple class which handles adding or removing an item and returning a copy of the array.  It's basically externalising some of the functionality of CopyOnWriteArrayList.  It has the added benefit of allowing to use the enhanced-for loop without creating an iterator.
16  Discussions / General Discussions / Re: Pico Boards in Java? on: 2014-10-13 20:39:46
This might be a start?  Looks interesting - may have to have a play myself.
17  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-10-13 18:11:44
I can also count the number of times I've tried to move the mouse pointer across laptops on more than one hand!  Roll Eyes
http://www.inputdirector.com/

Got to be a Linux equivalent somewhere!  Cool
18  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-10-13 18:06:20
Finished the initial implementation of distributed hubs in Praxis LIVE. Having fun editing code (Java & GLSL) on one laptop and watching it seamlessly compiled and inserted in a running video patch on another laptop.  Grin

I can also count the number of times I've tried to move the mouse pointer across laptops on more than one hand!  Roll Eyes
19  Game Development / Networking & Multiplayer / Re: Using UDP and TCP? on: 2014-10-13 10:58:33
I tried that but there was lag problems...

You set TCP_NODELAY?

Anyone here tried using SCTP? - http://www.oracle.com/technetwork/articles/javase/index-139946.html
20  Discussions / Miscellaneous Topics / Re: Something like libgdx for business logic on: 2014-10-10 09:58:14
The same gamesmay fit into a smartphone screen and a huge desktopscreen, but the same won't work for business programms.

I don't think that's true.  Given at least the link I posted is about rendering to HTML as the display, you want to look into responsive design - it's quite possible to make business applications that work across multiple form factors.
21  Java Game APIs & Engines / OpenGL Development / Re: [LWJGL] GLSL Link fails with no error on intel graphics on: 2014-10-10 09:06:36
Thinking about why the similar shaders linked fine and this one didn't helped though. Smiley

Could even be the same reason - should have been more generic in my answer!  Wink  Looking at something like this ( http://stackoverflow.com/a/12031821 ) arrays of samplers are not valid below 1.30.  Are you using a #version pragma?

According to the GLSL spec ( https://www.opengl.org/wiki/Core_Language_%28GLSL%29#Version )

Quote
If a #version‚Äč directive does not appear at the top, then it assumes 1.10, which is almost certainly not what you want.

What I've found is that AMD & nVidia cards seem to allow features above version to work, whereas Intel cards seem to follow that spec and fail.  The int <> float thing is not the only time I've fallen foul of this, but just the one I keep repeating!  Roll Eyes
22  Discussions / Miscellaneous Topics / Re: Something like libgdx for business logic on: 2014-10-10 08:56:27
This might be worth a read too - http://www.infoq.com/articles/dukescript  Talks about RoboVM for iOS, but also use of Bck2Brwsr & TeaVM for running in the browser (both translate Java bytecode into JS).
23  Discussions / Miscellaneous Topics / Re: Who's using RoboVM? on: 2014-10-09 12:15:57
Especially would love to see a solid solution for Java on the web. As plugins are no longer cool, maybe some thing like RoboVM -> Emscripten/Asm.js.

You looked at TeaVM or Bck2Brwsr?  I know they exist - I have no idea whether they are a "solid solution".  Wink
24  Java Game APIs & Engines / OpenGL Development / Re: [LWJGL] GLSL Link fails with no error on intel graphics on: 2014-10-09 12:02:12
Hi, I am using similar code to

What is "similar"?  One thing that I've found fails on Intel but not other cards is using integers where you mean floats (eg 1 rather than 1.0).  I think the Intel behaviour is actually correct unless you specify #version but it's the one that always seems to bite me.  persecutioncomplex
25  Discussions / General Discussions / Re: Why are people jerks? on: 2014-10-08 09:09:03
I already addressed that.  If you want GPL like coverage there's the choice an equivalent licence.  There's no rejection of an idea.

Yes, because license proliferation is such a good idea  persecutioncomplex  Copyleft as a principle is useful for many reasons completely anathema to RS - rejecting the leading license to achieve that seems pointless.

I refuse to empower RS in any way.  FSF/RS have a tendency to claim (in a way) all GPLed software.

Yes, people say all kinds of crap - you must love hanging around on a Java forumTongue

Thout shalt be called GNU/Linux should come to mind here.  Also notice a software that RS really worked on:  emacs.

Except that the whole GNU/Linux thing has nothing to do with your argument because they're not claiming that name because of the GPL Linux kernel, but because the OS contains a load of stuff the GNU project really worked on.  You know the slash is there precisely not to claim Linux is GNU.  Which is not to say it isn't daft  Grin

My point remains, jerks are associated with or benefit from things we benefit from everyday.
26  Discussions / General Discussions / Re: Why are people jerks? on: 2014-10-08 00:01:15
If someone doesn't want to buy any (say) Nestle products as a statement that's their business. ... Too bad, tell RS to stop being a dick if you care in the slightest ... So screw him and anyone that supports him and his deeds.

Boycotting a company because you find their practices abhorrent I get, boycotting a person too.  But boycotting an idea or invention because of it's association with a person or group that's abhorrent - where do you stop with that?  You'll have nothing left!  Someone using a GPL license because it suits their purposes doesn't necessarily support RS or his deeds, any more than someone flying in a jet aircraft supports ... (damn Godwin  Wink )

Assholes are fine.  I'm an asshole.

Assholes are fine.  I'm an asshole.  Grin
27  Discussions / Miscellaneous Topics / Re: What are possible front ends for a java audio library? on: 2014-10-07 09:44:19
He is also intrigued by JQuery/HTML5, but I am not seeing a clear path to connecting from there to functions presented in a Java .jar file without going through some very high latency steps. Perhaps the only way that might work as a front end is if the Java .jar file is converted to Android or JavaScript? I'm not clear if these languages are fast enough to handle audio processing at a reasonable latency.

To do that, you'd probably want to port your stuff to web audio.

Check these out (in a decent browser!)

http://webaudiodemos.appspot.com/midi-synth/index.html
http://www.audiosauna.com/studio/
28  Discussions / General Discussions / Re: Why are people jerks? on: 2014-10-07 09:35:54
As I mentioned before I refuse to help any GPLed project, other than bug reports, because R.S. is a hateful person in his public persona.  Pretty much feel the same about Eric R. as well.

That's a really weird black and white attitude to take!  Most people writing GPL software probably couldn't care less about RS.  If you're going to have a blanket ban on technology that some asshole may have been associated with, you're going to be living in the stone age.  And if you never want to deal with an asshole, you'll be living as a hermit.  Good people and evil people are found in folk tales (and seemingly the internet) - real life is usually a lot more complicated than that.

<3  Grin
29  Discussions / General Discussions / Re: Why are people jerks? on: 2014-10-03 15:11:45

Is that from the first draft of The Empire Strikes Back?    persecutioncomplex
30  Game Development / Networking & Multiplayer / Re: Kryonet threading on: 2014-10-02 13:52:44
always always always always process network on the game thread
if offloading it to another thread would be more expensive. Pointing

No, if it might block offload to a different thread.  There is no way to measure the expense of that because there may not even be one where you're profiling it.

I agree with you the "never, never" post is false if not explained.

ofc we'd have to deal with timeouts and possible stalls if we'd send directly from the game-thread, it's just not wrong to do so, generally.

Well, of course, if you're happy with the thing freezing for a few seconds, you should have said ...  Tongue
Pages: [1] 2 3 ... 31
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (29 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (40 views)
2014-12-09 22:41:13

BurntPizza (75 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (50 views)
2014-12-03 16:27:13

CopyableCougar4 (47 views)
2014-11-29 21:32:03

toopeicgaming1999 (113 views)
2014-11-26 15:22:04

toopeicgaming1999 (100 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
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

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
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!