Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (753)
Games in Android Showcase (228)
games submitted by our members
Games in WIP (842)
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 ... 54
1  Game Development / Newbie & Debugging Questions / Re: Deploying a Java game on Steam on: 2018-04-22 17:23:45
I couldn't figure JSmooth out. Gave up and decided to give the Java 9/JLink path a go.

Migrating to Java 9 was easy. I don't have any external jars, just Java, with Swing front end on this one.

If I can't get the deployment to work, maybe I'll go back to trying JSmooth again, but I'll be asking a lot of questions here! I don't seem to have some of the background knowledge needed to make it work.
2  Game Development / Newbie & Debugging Questions / Re: Deploying a Java game on Steam on: 2018-04-22 02:44:09
What about working with the Java 9 Deployment Guide?

I just worked through an article on Modules, which is kind of important to know something about, to make this path work. Also was able to make a JLink example work. Am hoping to give this a try in the next week or so.

It is kind of a pain in that a lot seems to be done at the command line level, and the file structure needed for Modules makes Eclipse Oxygen see red. But it also seems to be what Oracle is suggesting as the way to go for distribution of a Java program as an .exe. The resulting Modular JRE included in the self-contained deployment is supposed to be smaller and faster.
3  Game Development / Game Mechanics / Re: Thinking about data formats - would appreciate opinions. on: 2018-04-10 16:55:32
My view is pretty simplistic. I don't have to load any new libraries in order to use XML. Also, my programs are not pushing any envelopes (at most, just trying to ensure sufficient efficiencies for good audio processing).

I would think JSON would make the most sense in scenarios where one is either interacting with the JavaScript world or sending/receiving information from non-local URLs. If it is well integrated into LibGDX, that could also be a good reason to go for it, since overhead for handling the code is there anyway.

I agree it is nice to have the data that is saved/loaded in an easily readable form.
4  Java Game APIs & Engines / Java 2D / Re: improving game loop on: 2018-04-06 23:52:13
I recommend using the AnimationTimer from JavaFX. It reliably defaults to 60 fps, afaik, and is easy to use.

As an alternative (if not otherwise using JavaFX) using a ScheduledThreadPool with the game loop being contained in a Runnable. Goetz "Java Concurrency in Practice" (pg. 123). A util.Timer is not unreasonable as an alternative--and has an advantage of being possible to schedule to run TimerTasks at absolute time intervals, not just relative time intervals.

There is an interesting alternative structure for a game loop in a comment by @beeaware at the end of the JavaFX tutorial (which itself has a basic example). I would link to it directly but there doesn't seem to be a way to do this, so you will have to scroll down. beeaware makes use of Timelines, and integer counters, and seems to work fine with the game that beeaware showed recently in the showcase.
5  Games Center / Showcase / Re: Bee Aware! on: 2018-03-27 20:53:21
I think my previous post suggestions were not very good. There was a lot I missed. For starters, you're posting in Showcase, not WIP.

Second, it makes no sense to "thicken" up the bee sound, since it is a single bee, not a swarm.

Third, the music is good. I happen to particularly like the opening sine-wave sort of sounds in the first cue and have notions of musical compositions being built with them--would like to hear more of that sort of thing. I let that prejudice short circuit my judgment. I don't know what I was thinking, mentioning "Tubular Bells" as this is mostly acoustic instruments and samples, not electronics, and yes, very dated, and not the right mood at all.

I don't know what I was thinking. Wish there was some way to edit the prior comment to appear less of a space cadet.

Anyway, the "appreciation" is genuine. You have accomplished a lot here and I wanted to register that I was impressed.
There's this thread on appreciation.
6  Game Development / Newbie & Debugging Questions / Re: Reactive Games? on: 2018-03-27 17:31:11
I'm thinking this just refers to React, a very popular JavaScript library.

I don't know about specific issues that arise when using this library.

It seems to me that a player "reaction" is a necessary condition for a game.

7  Games Center / Showcase / Re: Bee Aware! on: 2018-03-25 21:38:07
Congratulations on getting this up and running!

I also prefer JavaFX to Swing.

Is everything "set" at this point? Are you still tinkering? Being a sound person, I have a couple ideas on possible refinements on the sound effects. For example, I wonder if it would be possible to take the bee swarm SFX and process it a little to be more stereo and less obviously a loop. I previously made a "slice-streamer" for myself that could possibly be adapted to work, by building on top of AudioCue. (The version I have runs on a less efficient one-frame-at-a-time audio engine.)

For my own tastes in music, I find the initial mixes that you picked most interesting when they are straight-up electronic, a la Terry Riley's "Rainbow in Curved Air" or parts of Mike Oldfield's "Tubular Bells" work (really dating myself here), but they start to seem more generic to me, though still quite acceptable, when all the parts enter (drums, especially). If you are using cues from a royalty-free library, what you have makes good sense in terms of expense and effort involved. I could see where it would be difficult to budget original music.

May I ask what software you used to run your program as an executable? I started poking at Launch4J and have hit some snags trying to get it to work.
8  Game Development / Newbie & Debugging Questions / Re: java 2d Game its working in windows but on mac or linux is slow on: 2018-03-21 22:10:23
Usually frame rates are similar on all platforms, as far as I know. There might be something special about your game structure that is slowing things down. Can you tell us more about your game, what demands it makes on the OS?
9  Discussions / Miscellaneous Topics / Re: What I did today on: 2018-03-20 19:08:42
First ever receipt of a donation for software I posted on GitHub, this morning!
10  Discussions / Business and Project Management Discussions / Beta (?) testing for ToneCircleDrone on: 2018-03-18 23:41:22
I am wondering if there is a "musician" (amateur okay) Java coder willing to volunteer time to help beta test a program that I wrote and hope to release soon on The emphasis would be to check over the GUI.

Tone-Circle-Drone is a tool to help develop one's intonation skills, but also can be used as an accompanying sound source for practicing or playing.

It's scope includes:
> teaching the ability to pick out (hear) harmonics from a complex tone, especially the fundamental from the overtones;
> teaching the ability to distinguish equal-temperament intervals from "perfect" and well-tempered intervals;
> using as a practice tool, with many features beyond current tools used for drone practice.

The tunings incorporated include:
> equal temperament
> "Just" intonation (integer ratios)
> Pythagorean
> "first matching harmonic"
> Well-Temperaments used in period music:
      > Werckmeister
      > Vallotti
> Indian shruti system

I'll be checking folks in music theory and ear-training domains for much of the testing and review. But I think it would be really helpful to have someone with a good feel for GUIs (Swing in this case) to give it a go.

Please reply or message me if you are interested.
11  Discussions / General Discussions / Re: VR motion sickness on: 2018-03-18 20:05:11
I wonder if motion sickness is most likely a problem if there is a mismatch between the view and one's body position. If the scene makes it look like you are moving, when you aren't personally moving, that is when the problems are most likely?

It is okay to see scenary moving outside a car window because you have the frame of the car as a steady reference. Similarly, if the 3D motion is framed by a console or window frame (e.g., you are jet pilot, car driver, etc.) things will probably be okay?

But maybe and exception to that would be if the horizon line is bobbing about and you are stationary, as the horizon line strongly implies gravity's direction and its movement implies momentum/acceleration.

Part of the problem of using a WASD or joystick is that it allows motion to occur that does not match body movements. Hence this is more likely to cause motion sickness?

I was working on a VR/AR where we wanted to have a mousing option for desktop users (have the app work in both headset and as desktop). I ran into trouble in "teleports" between scenes if the head angle wasn't maintained from scene to scene--but it was more a coding issue than a motion sickness issue. Each teleport that went to a standard straight on view (even if the previous view was at an angle) would cause an accumulation of mismatch between internals that track and limit up/down to +/- 90 degrees, and portions of the ceiling or floor would become unviewable.
12  Discussions / General Discussions / Re: Gun violence in video games: Donald Trump meets with video game execs on: 2018-03-11 02:56:52
I liked this Tweet. More on topic than a lot of our own discussion.

42% Of Americans Play video games for at least 3 hours per week.

Research shows that only 20% of Mass Shooters showed any interest in video games.

Call me crazy, but perhaps we need more video games...
13  Discussions / General Discussions / Re: Gun violence in video games: Donald Trump meets with video game execs on: 2018-03-10 06:32:39
Americans come up with insanely irrational ways to keep having more guns.
The majority of Americans want more regulations. You are mistaking a loud and well organized few for the majority. This happens all the time, including here, where the loudness helps intimidate and wear down any pushback. I'm wondering, in fact, this might be a good case study in how an unpopular position can still dominate in a democracy.

The gun violence in videogames is what we call, in italian, a "white rabbit", something you throw at the people to catch to keep them busy and avoid them thinking about what's the real problem is here
Neat. Is this also a reference to "going down a rabbit hole" and Alice and Wonderland?
I've also heard the terms distraction, squirrel, deflection. I think there are other terms as well. But yes, in the greater scheme of things, I don't see "reforming" or restricting video games as something that is going to do very much in the way of lowering the number of people getting mowed down by weapons that can kill so many people with such ease.

You would need to regulate all kinds of firearms, "scary" looking guns aren't more dangerous.

But maybe you should start with fixing everything around the education system first
I'm not so concerned about arguments on terminology, whether something is automatic, semi-automatic, or a rifle or whatever. It seems to me that the distinction that matters the most is the degree of deadliness, the speed and ease with which people can be killed by a given weapon. If there is regulation, it should be tailored to a "deadliness" classification, imho.

The argument that we should fix something else "first" is often spurious. Usually there is no reason one can't work to reform or improve multiple things at the same time.

Then you also need to realise that feeding the gun lobby is gun culture. Gun culture absolutely, totally pervades every aspect of American life.
I think this an exaggeration, but not by a whole lot! Please keep in mind that there is a huge number of people here that would really, really like there to be less guns, but the aggressiveness of those supporting guns is intimidating and hard to counter. I do think the gun lobby (NRA) helps promote this and gives platforms/megaphones in support of anything that helps their ability to make a profit. Would be really great if their financial political support turned 'toxic'.

The pushback initiated by the high school kids at the last shooting has been remarkable and may help turn this around. One of the kids, I think it might be Emma Gonzalez, in a couple weeks gained more Twitter followers than the NRA. There is a huge hunger by a large population for some sensible regulations and roll backs.

Quote from: princec on 18 hours ago
Quote from: jonjava on 18 hours ago
You're all talking as if restricting civilian access to guns will solve the problem. Without actually defining, stating or talking about the actual problem that you're supposedly trying to solve.
Is not the actual problem that actual people keep using actual guns to kill actual children en masse all the time?

I'm not a fan of that sort of thing, to say the least.

But what makes you so sure that restricting civilian access to guns will solve the problem?

Have you made a detailed analysis? What will be the pro's and con's of attempting such a feat?

Will it be a net positive in the short term and in the long term?

Good intentions alone does not result into a positive outcome. It's much easier to break things than it is to fix things.
I think princec answered jonjova's question here, even though jonjova didn't explicitly acknowledge it. I'd add, we also have a more general problem with the firepower that can be brought to bear against people at any large gathering, but the most heinous aspect has to be our collective failure to deal with the killing of school children.

As for the "requires further study"--I don't see why we need to put the brakes on high-polling, common sense notions: for example universal background checks and waiting periods, including gun show sales.

In this instance, I would say that if for some reason a new regulation turns out to be a problem, it will be relatively easy to reverse. Bear in mind that even if some of the more vociferous proponents of gun control want to get rid of them all, quite a few (including the aforementioned Emma Gonzalez) are not pushing that far. This is the opposite of a slippery slope situation. There is a large "centrist" contingent on this issue that will prevent going to extremes.

The problem with calling for "studies" is that NRA and the politicians that are aligned with their positions have been instrumental in cutting off funds for studies! When Center for Disease Control last did some studies, congress cut their budget by the amount used to pay for this research. Message received! It argument about needing more studies reminds me of the old joke about the kid that murders his parents and the lawyer pleads for mercy because the kid is an orphan. More studies would be great. We'd probably do a better job of decreasing fatalities from guns if we had more of them. Of course, as soon as we start getting results that curtail gun manufacturers profits, we will likely hear them screeching once again about researchers being biased, and other smokescreens. For this reason, a lot of people simply don't believe the argument about needing more study is sincere, and assume it is being used as a delay tactic.

Could you please try and re-articulate it in such a way that even a person like me would be able to understand it?
I am trying my best.

I think we can both agree that making all guns disappear from the entire world is practically impossible.

However, I see your point is perhaps that we could try and restrict access through legislative power, yes?

Perhaps make them illegal, even?

But couldn't that create an imbalance between criminals and civilians? Criminals would still be able to access guns.
Are you familiar with the term: "Perfect is the enemy of the good"?

The more obstacles to something happening, the less likely it will happen. That is a simple principle of nature, practically.

With more hoops to jump through, an individual would have to be that more more organized and be of clear intent, as opposed to caught up in an emotion or having a disorganized, irrational mind, or prone to lashing out or having poor impulse control. I don't think criminals are the best at dotting i's and crossing t's. The ones that are capable of this probably aren't particularly suicidal, as most mass murderers seem to be.


One last thought--it seems to me a good side benefit of having fewer highly deadly weapons in play is that our police would be in less danger, overall. Of course, it would remain a dangerous job, but maybe there would be fewer instances where police would panic and shoot first. Wouldn't that be a nice little plus to add on to not having to worry about children being slaughtered?
14  Game Development / Networking & Multiplayer / Re: trouble reading from a NodeJS URL on: 2018-03-06 04:12:45
I have to make use of the data flow path that already exists, tap in where I can. Since I can now use WebSocket to read from a C++ program called PNTransformer, I don't have to worry about signal transformations or servers downstream from that point.

@KaiHH, can a plain Java Socket class be used connect and read from a JS 356 type WebSocket? I tried a bunch of ways to connect to PNTransformer, which uses the URI "localhost:9000/service" but couldn't figure out any way to connect or get information from there with Socket. However, I am able to read from it with a WebSocket client.

@princec -- Yes, I read about the tendency to block custom networking in the "Java Network Programming" PDF. Since WebSocket is a form of HTTP, though, it probably isn't blocked? Or am I misunderstanding?

It seems (so far) like the Tyrus library is not a burden. There were seven or eight jar files to add to the project which doesn't feel like a lot, and the basic commands (@OnOpen, @OnMessage) have been simple enough. I have to scramble to get a couple tools built for the next rehearsal--am looking forward to exploring this further later in the week.
15  Discussions / Miscellaneous Topics / Re: use FitBit game feedback? on: 2018-03-06 03:48:21
Might work in combination with a rotatable treadmill?
16  Discussions / Miscellaneous Topics / use FitBit game feedback? on: 2018-03-05 01:00:42
Stray thought, was wondering if anyone has tried getting data from a player wearing a FitBit?

Possible uses:
for development, to measure response about what is exciting, boring
for play, to modulate some aspect, perhaps a level of difficulty, depending on the "stress" measured.

I suppose for a game like one where you are physically active (e.g., that one where a person is supposed to stomp on squares on the floor) it might make more sense.

And if there was a game design that would make sense, how would you get at FitBit data? Does it broadcast or stream at all?
17  Game Development / Networking & Multiplayer / Re: trouble reading from a NodeJS URL on: 2018-03-04 07:33:19
OK! Back to making progress.

This tutorial: Creating Binary WebSocket Connections with Java EE 7 and JavaFX, is excellent. In it, you build both a Server and a Client that make use of the WebSocket API (JS 356).
The WebSocket protocol, which was developed as part of HTML5, enables full-duplex and real-time communication to a Web server. The server and client can send and receive data at any time by using a single connection. WebSocket connections are started by using an HTTP request that enables the connection to change to the WebSocket protocol. These connections take advantage of all features of the HTTP protocol. Switching the connection allows for little overhead communication because only one HTTP handshake is performed for all exchanged messages.

Important "plus," the tutorial works! I had a frustrating time with one I tried before this, which uses an HTML/CSS/JS client: Java EE 7: Building Web Applications with WebSocket, JavaScript and HTML5 For whatever reason, I could not get the Server to respond. It just lies dead in the water. The JS call to the Server executes (verified with console.log()), but none of the System.out.println()'s I put in the Java Server code print out. Whatever. For my needs, I don't care so much about debugging the Server. It's Java Clients that I want to be able to understand and code.

You don't need Java EE to make a Client. The Client only really requires the library/projects files from Project Tyrus, and as far as I can tell, you aren't required use JavaFX. Swing should also work for the GUI. In any event, a link in the tutorial will get you to a zip with the required files for the Client.

This seems like a really excellent resource for game networking! Are people here making use of it? (This is my first foray into Networking. I am pretty "talented" at putting on blinders and not noticing or listening to what others are doing.)

I'm noting that the WebSocket address makes use of a string as part of the URI. I was confounded by the presence of a String being given as part of a web address. I thought a web address should only have a URL with a Port. I don't seen anything in the "Java Network Programming, 4th Ed." PDF I downloaded about WebSockets API. I guess that goes to show the danger of free PDF's being obsolete (part of why they are free). It was published in 2014.
18  Game Development / Networking & Multiplayer / Re: trouble reading from a NodeJS URL on: 2018-03-01 08:04:28
It is starting to look like the issue is that the WS package makes a WebSocket, and a plain Java Socket isn't going to work. I did find an Oracle tutorial on WebSockets in the Java EE realm, but I have to weigh figuring that out added to the additional task of parsing whatever form the data has been transformed into by the time it reaches that point, versus, reading the binary BVH stream into text form a couple of stages earlier in the chain.

I must say I'm very tempted to attempt the latter. I don't fully understand the spec, but I do have the C++ code that performs the read from the binary stream. (Identifying the exact spot is tricky.) Most of a given record is 6 floats per 50-something bones (can't recall exact fig. while typing this). There is also a couple header fields and there must be some sort of demarcation for a new record. I guess the issue with binary is to get your starting point correctly aligned? From there, one can do a known series of getFloat() or whatever?

The things we put ourselves through for art.

UPDATE: The code which reads the binary BVH file calls a .dll.
19  Game Development / Networking & Multiplayer / Re: trouble reading from a NodeJS URL on: 2018-02-26 19:28:16

Thank you both. I won't get a chance to test it until next Sunday.  Tongue  Wishing I had thought of the obvious yesterday while there with the programmer who put the rig together and gave me the URL.

The Axis-Neuron application that connects to the motion capture suit broadcasts data continuously, and I made the assumption that downstream would continue in the same manner. But it makes perfect sense that if the Socket registers as connected but doesn't supply any data, that it would need a call.

I did manage to get a parser library for BVH data to work last week. And, successfully ran a simple test where X-position controls a theremin pitch. Getting the live data has been the missing link.
20  Game Development / Networking & Multiplayer / trouble reading from a NodeJS URL on: 2018-02-26 01:25:15
A JSON file of Motion Capture data is being broadcast from a URL powered by a NodeJS package called WS.

I've been given the URL and Port. I'm able to connect a Socket: socket.isConnected() returns true.

When I try to create an InputStream and an InputStreamReader, the isReady() function of InputStreamReader returns false. Attempts to read a single int hang.

I also tried DataInputStream just to see if there was anything and available() function of DataInputStream returns false. Attempts to read a single int hang.

I'm new enough at this that there could be something really basic that I am missing. Any thoughts? Also, I am at a loss as to how to proceed to troubleshoot this.

      Socket socket = new Socket();
      InetSocketAddress socketAddr = new InetSocketAddress("", 9100);
      socket.connect(socketAddr, 10_000);
      System.out.println("socked connected:" + socket.isConnected());
      System.out.println("             URL:" + socket.getInetAddress());
      System.out.println("            port:" + socket.getPort());
      InputStream inRT = socket.getInputStream();
//      InputStreamReader isrRT = new InputStreamReader(inRT, "UTF-8");
//      System.out.println("ISReader is ready:" + isrRT.ready());
//      int n =;
      DataInputStream disRT = new DataInputStream(inRT);
      System.out.println("DIS available:" + disRT.available());
      int n = disRT.readInt();
      System.out.println("n:" + n);


socked connected:true
DIS available:0

An elaborate work-around might be possible. It would involve tapping into the broadcast from the application that reads the MoCap data (Axis-Neuron). I can read data from this application if the motion data is sent out as text, but another user needs the data broadcast as binary, and only one broadcast is available. To use the binary, I would have to find and code from a spec--which maybe will be necessary if I can't connect to the location streaming the JSON data.
21  Game Development / Newbie & Debugging Questions / Re: JavaFX: How do I access the methods of an object owned by a pane? on: 2018-02-20 05:03:14
I can't figure it out from your description. I'm going to make a guess this has more to do with issues pertaining to the different forms of classes (static inner classes versus using a regular class in its own file), than to JavaFX.

If you are getting a null on your example in line one, I'm assuming it is the "player" instance that has not been initialized yet. That would be a normal (happens all the time) cause of a NPE. Can you show where your player instance is initialized? Can you also show that you are not attempting to access any of its properties before the constructor code has finished?

Also, are we sure the variable that you initialized is the same as the one being referenced later?

A general notion (probably you already know, so more a reminder): when making changes, it is helpful to not try and do more than one or two things with each update, and test. That way one finds problems more quickly, and there is a narrower range of theories to test and investigate. For example, if you were able to go back to all inner static classes, and made just one of the classes its own file, that might be easier to troubleshoot.
22  Discussions / Miscellaneous Topics / Re: Is My Portfolio Frighteningly Underwhelming? on: 2018-02-17 00:59:23
Code reading is hard. Very few are going to attempt it. I can easily imagine a situation where a company is hiring to fill a need and they don't have the internal expertise to evaluate code that might pertain.

Recruiters are kind of pesky and rarely coders. If they could actually code, they'd probably be doing that rather than recruiting.

The code you write and present on GitHub is still important, though. And it can lead to work opportunities if the library is one that people actually download and use.
23  Java Game APIs & Engines / Java 2D / Re: Java2D game loop stuttering on: 2018-02-11 02:38:12
The way the code is written we could have either of the following two scenarios (depending upon the values of unprocessedTime and _updateCap):

  • multiple tick() calls without intervening render() calls
  • multiple render() calls without intervening tick() calls

Could this cause the stuttering? Seems like that would be the likely result if the two need to alternate in order to preserve continuity.

I'd try moving timing stuff to after the update and render. They should just be run directly in sequence unless there is a good reason not to.

      while (this._gamePanel.isRunning())

           timeDiff = Systerm.currentTimeMillis() - beforeTime;
           sleepTime = PERIOD - timeDiff;   // I would imagine  PERIOD = 16 for just slightly better than 60fps?
           sleepTime = Math.max(sleepTime, 1); // even if lagging, sleep a little
           Thread.sleep(sleepTime);  // will need to be in try/catch or add exception handling
           beforeTime = system.currentTimeMillis();

This code is slightly modified from "Killer Game Programming".

I happen to think using a util.Timer or an ExecutorService (even better is the AnimationTimer provided in JavaFX) is the best way to go in terms of setting a steady FPS for a "game loop" rather than manually handling sleep times. But a lot of people will disagree, and there is no need to argue about it. Just do what works.
24  Discussions / Miscellaneous Topics / Re: What I did today on: 2018-02-08 08:40:13
Been cramming Java Networking the last few days. My knowledge of the subject prior to this would have to be described as rather shallow. Had to buckle down and read, from the beginning, taking notes as if there was going to be a test, the first four chapters of this online text: Java Network Programming, before I was able to start skipping ahead to the stuff needed for this particular networking task.

A goal was achieved today: I coded a Java Socket that reads motion capture data being broadcast from an application called Axis Neuron. This is the tool/gear being used by KineTechArts (Meetup group of collaborating techies and dancers). The Axis Neuron program has broadcast capabilities. I was able to hook into its broadcast via an InputStream, receiving space-delimited, BVH format Strings.

Next step, parse the data (X, Y, Z, X-rotation, Y-rotation, Z-rotation) to the individual bones. Looks like there are a couple dozen sensors and the data is incoming roughly at 60 fps, but I don't know specifics on frame rates or capabilities yet. I was just thrilled to get readable data after a couple days of thrashing ignorantly and at best getting 501 error messages.

Next, next step: filter the data for use as control lines for various parameters of audio tools that will respond to the dancers' motions.
25  Discussions / Miscellaneous Topics / Re: What I did today on: 2018-01-25 19:48:05
Last night, somewhat nervously showed off some of my Java audio to a Meetup group (Kinetech Arts, a group of dancers and techies interested in collaboration). Response was pretty enthusiastic. A favorite was the Shepard Chord, and the group did an improv with me running several Shepard Chords as sound accompaniment.

Coolest thing: several of the members are very strong developers, for example, working in data visualization field and with web coding. They are motivated to help with getting data from dancers (with wearable devices that track positions of hands/feet/etc, or even if just carrying phones) to my applications so that the applications can alter the sound output in response. When I was coding these Java tools to be on a scale that allows them to be responsive to "game state" I definitely had in mind the goal that could also be used live with incoming data streams as well, and was hoping some sort of collaboration like this would be possible.

It was a gamble, trying to focus on coding good sounds and leaving interconnection issues for later. One person only has so much bandwidth. Glad/relieved to find that others with complementary/needed skills are motivated to collaborate.

The day had some good coding results as well. I continue the long slog to make an application called "Tone Circle Drone" ready for commercial release. One of the issues has been trying to manage a JDialog/JPanel popup written for "Options" handling. Slowly, I had been figuring out how to deal with its position (keeping it relative to the main application when main was being dragged), and with not remaining "on top" when leaving app to look at web browser. The last straw was when I realized that the popup had its own slot in the Windows "Alt-Tab" list of running applications. At this point, I remembered the "CardLayout" and recoded the Options panel as a "card" that appears over the Main panel "card".

All behavior problems solved. Lots of code discarded(e.g., WindowListener, ComponentListener no longer needed). That combination is one of the most satisfying to have as a coder.
26  Java Game APIs & Engines / Java Sound & OpenAL / Re: How do I get frequency data from a .WAV? on: 2018-01-04 19:09:58
An excellent, free resource for learning about the FFT is the following eBook:

Scientist and Engineer's Guide to Digital Signal Processing

It starts with the basics, and also contains excellent info about various filtering methods.

The code examples are in BASIC, so you would have to get your Java implementation elsewhere, or build on from the BASIC examples. Perhaps someone at JGO (@nsigma?, @Catharsis?, @ShannonSmith?, others?) has a recommendation or code to share?

It you have difficulties with any part of the text, I've found that a good place to ask questions is the
Signal Processing section of Stack Overflow.

[When asked earlier in a PM, I recommended the OP make a public post, so anyone else that has a similar question could use the answers provided as a reference. We are also requesting this thread be moved to the Java Sound section, if that is not too much trouble.]
27  Discussions / General Discussions / Re: HappyNewYear! on: 2018-01-01 14:42:42
I failed on my first resolution made at the start of 2017: to complete Hexara.

I wrote a web article and it was published on the Georgia State University HyperPhysics site (about acoustics/physics of the oboe).

I managed to write and post AudioCue to help with coding sound for Java games.

Worked on various sound ideas, such as a wind-in-ears affect where the turbulence hits the two ears at different times depending on the direction the head is turned relative to the wind, and a program that slices and reassembles thunder samples to make unique thunder occurrences. The latter could use some improvements still.

Installed and got somewhat familiar with Unreal and basics of C++, but unfortunately the project/person that this was for didn't pan out. Learned a fair bit in process, can count it as "perspective".

Started taking JavaScript/HTML/CSS more seriously (working through web courses) and learning AFrame for doing WebVR. Unclear if the funding on this project is going to stay afloat or not. Learned enough that I have written a web app where you can jump around between various 3D/panoramic photos taken in and on the USS Hornet.

Am closing in on completing "Tone Circle Drone" in Java which I am targeting for being my first published commercial software on

So, maybe even if the main resolution from last year was a bust, some useful stuff was accomplished. Even so, there always seems to be the feeling of spinning wheels and lack of traction. Maybe that has mostly to do with barely even achieving "ramen success" with all this, financially.
28  Game Development / Newbie & Debugging Questions / Re: Panel - Redrawing panel didn't seem to be working! on: 2017-12-28 20:55:43
If I understand what you wrote, it works with a single image, but not as a loop.

Have you stepped through the loop using a debugger?

Sometimes when loops seem to be where things break down, there is a problem such as the same object being used multiple times when you think you have a unique instance. This sort of thing usually pops out really quickly as an issue when you step through and verify the contents of the variables.

When I was doing graphics with Swing, I would normally use the Graphics2D object provided by the JPanel's paint or draw method (can't recall exactly which it was). When drawing images contained in other classes, I would provide that Graphics object to those images as a parameter, so everything gets drawn on the same Graphics object. It's just a thought, but if you are drawing to different Graphics objects, that could cause some confusion. Pure speculation on my part, and it doesn't account for a single image working but looped images not working.
29  Game Development / Newbie & Debugging Questions / Re: Panel - Redrawing panel didn't seem to be working! on: 2017-12-27 22:11:13
[Editorial comment: This would be so much easier to do with JavaFX, the newer GUI for Java. You just update the location properties of the items involved and drawing pretty much takes care of itself. It kind of hurts my head, trying to remember all the rules pertaining to managing redrawing with Swing.]

For those looking at the above code, it's helpful to know that at least some of it is quoted code is from here.

Also, the two classes mentioned are both extended JPanels.

I recommend to the OP trying to make a more simplified example that illustrates the problem, as a way of increasing the odds of getting a good solution (or finding one in the process).
30  Game Development / Newbie & Debugging Questions / Re: Mouse directed attack with 4 possible outcomes and animation based on attack. on: 2017-12-21 20:37:11
Slightly more compact form. Not sure if this makes intention clearer or not. For this sort of thing, performance differences are minute compared to the impact of code on readability, so coming up with easiest form for reading 6 months from now (i.e., "after you have forgotten what the code is doing") should be the priority.

    if (angle < -135) rightSlash()
    else if (angle < -45) downSlash()
    else if (angle < 45) leftSlash()
    else if (angle < 135) upSlash()
    else rightSlash();
Pages: [1] 2 3 ... 54
ivj94 (586 views)
2018-03-24 14:47:39

ivj94 (49 views)
2018-03-24 14:46:31

ivj94 (383 views)
2018-03-24 14:43:53

Solater (63 views)
2018-03-17 05:04:08

nelsongames (110 views)
2018-03-05 17:56:34

Gornova (159 views)
2018-03-02 22:15:33

buddyBro (704 views)
2018-02-28 16:59:18

buddyBro (93 views)
2018-02-28 16:45:17

xxMrPHDxx (494 views)
2017-12-31 17:17:51

xxMrPHDxx (734 views)
2017-12-31 17:15:51
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!