Java-Gaming.org Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (555)
Games in Android Showcase (148)
games submitted by our members
Games in WIP (601)
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: Java Swing / AWT Sounsd on: 2015-02-19 19:14:27
TinySound
2  Discussions / General Discussions / Re: Paint.NET alternative for OSX on: 2015-02-18 12:38:58
No idea if it's any good, but came across this last week.

http://apps.pixlr.com/editor/
3  Discussions / General Discussions / Re: Do you sometimes skip braces? on: 2015-02-08 18:03:41
I took a lot of line breaks away to make the post smaller, let me adjust and see if you still agree :p lol.

 Grin

It's like asking a British English speaker (me) to read American English.  I mean, it kind of looks like it should make sense, but still ends up feeling like you're reading gobbledygook.  Tongue
4  Discussions / General Discussions / Re: Do you sometimes skip braces? on: 2015-02-08 17:15:47
Never, never, never, never, ... and never!   Grin  IMO, shouldn't even be valid syntax.

I do do what @Yemto mentions earlier, though, and use ternary operations fairly frequently.

Kind of avoided braces right?

Looks a lot nicer than:
...code...

And yet, I find your latter example easier to understand.
5  Discussions / Miscellaneous Topics / Re: Git GUI tools for Windows on: 2015-02-08 17:06:06
In the spirit of @ags1

Erm... NetBeans?

eg. https://netbeans.org/kb/docs/ide/git.html#diff
6  Discussions / General Discussions / Re: Old Forum Stuff on: 2015-02-03 17:22:53
I started the forum in 2001 ...

Yes, where's ChrisM at the top of JGO's most awesome members?  I mean, Markus?  Where would Minecraft have got without JGO?!  Tongue
7  Discussions / General Discussions / Re: Schemes to teach the masses to code on: 2015-01-29 17:30:16
I guess we have to agree to disagree, because I (respectfully) disagree with pretty much every point here.

I'm not saying we need to teach 6 year olds the intricacies of advanced computer science. I'm saying we should introduce some of the most basic, fundamental concepts, such as logic and problem solving ...

Absolutely on your side of that argument!  Wink

What's missing from your argument IMO is logic / problem solving and creativity - taking it beyond fundamental concepts and allowing young people to apply logic / problem solving to the creation of something that interests them.  The best of these schemes are all about getting beyond the abstract and making something fun - nothing beats applying knowledge to a real-world application, but that's what's missing in 95% of education.

There was a woman who brought her 9 year old daughter down to our hackspace a while back.  Her daughter had had her own Pi for a few weeks, and had been involved with one of these schemes.  She'd started off making stuff in Scratch, and by then spent the evening sitting in the corner programming a game in Python.  I'll argue with anyone who thinks that's not awesome, and it would not have happened without schemes like this.  Grin
8  Java Game APIs & Engines / OpenGL Development / Re: Fill Ellipse from a fragment shader on: 2015-01-18 14:22:23
If you want to do this in a fragment shader, wouldn't you be better using texture coordinates rather than gl_FragCoord and your uniforms?
9  Java Game APIs & Engines / Java 2D / Re: Draw BufferedImage to panel on: 2015-01-03 17:24:28
Also, you probably don't want to be loading the image in every call to paintComponent()!  Wink  To start with, make the image a field and load it once (eg. in the constructor).
10  Game Development / Newbie & Debugging Questions / Re: Using enum, how does this work? on: 2015-01-03 12:57:07
It looks like you're thinking of bitflags, but have it all garbled up.
...
or to use an EnumSet. But I don't know of any magic wildcard enum trick.

Yes, use EnumSet, which is already backed by bitflags underneath.

eg.

1  
2  
3  
4  
5  
6  
7  
EnumSet<Day> mwf = EnumSet.of(Day.MONDAY, Day.WEDNESDAY, Day.FRIDAY);
EnumSet<Day> weekdays = EnumSet.range(Day.MONDAY, Day.FRIDAY);
EnumSet<Day> all = EnumSet.allOf(Day.class);

mwf.contains(Day.TUESDAY); // false
weekdays.contains(Day.TUESDAY); // true
all.contains(Day.TUESDAY); // true


11  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.
12  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?
13  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
14  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
15  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
16  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.
17  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 )
18  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
19  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 )
20  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.
21  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!
22  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.

23  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?
24  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
25  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.
26  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.
27  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
28  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
29  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
30  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.
Pages: [1] 2 3 ... 31
 
BurntPizza (18 views)
2015-02-27 06:09:35

BurntPizza (17 views)
2015-02-27 05:56:17

Riven (9 views)
2015-02-27 02:34:15

Riven (15 views)
2015-02-27 01:47:26

Riven (15 views)
2015-02-27 01:46:04

BurntPizza (11 views)
2015-02-27 00:52:04

BurntPizza (14 views)
2015-02-27 00:50:29

Riven (33 views)
2015-02-26 23:38:45

Riven (10 views)
2015-02-26 23:37:24

BurntPizza (26 views)
2015-02-26 21:13:04
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!