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   
Pages: 1 [2]
  ignore  |  Print  
  Hexara -- work in progress  (Read 12512 times)
0 Members and 1 Guest are viewing this topic.
Offline bobjob

JGO Knight


Medals: 10
Projects: 4


David Aaron Muhar


« Reply #30 - Posted 2011-12-11 09:56:04 »

Side issue, I'm hoping (perhaps in vain) that I can use some of this sound programming expertise in android. But I haven't really looked closely enough at Android yet. Most of the books and tutorials I've come across just cover some simple ways to do sound, nothing low level.
If you ever want quick android assistance, like copy and paste code snippets and such. Feel free to add me to MSN (msn contact link is under my image on the forum post).

My Projects
Games, Webcam chat, Video screencast, PDF tools.

Javagaming.org with chat room
Offline nsigma
« Reply #31 - Posted 2011-12-11 12:27:01 »

Anyway, I've got the "windchime" chime patch pretty well nailed this week, and aspects of the drone working as well. The bigger gongs are yet to do. The drone will need a flanger, but I think that will be doable. I'm told flangers are not much more complicated than an echo with a very short delay time (that varies), and I managed an echo on the Theremin project.

If you can use GPL with CPE code, there's a chorus in Gervill you could extract (it has a flanger mode - a flanger basically being a chorus with attitude and tattoos   Wink ).  I'm just in the process of forking this out myself for JAudioLibs - basically need to change the parameter calculations to be something sensible as opposed to MIDI values.

If that license is no good for you (or you just want the fun of coding it yourself), then it's basically a delay where the delay time is controlled by an LFO.  You'll need a delay where the delay time changes on a per sample basis - once per processing block would probably sound odd.  They're also usually done with a delay on either stereo channel with the LFO's out of phase with each other to give that "thicker" sound.

Sorry if that's going over what you'd already been told.

Best wishes, Neil

Praxis LIVE - open-source intermedia toolkit and live interactive visual editor
Digital Prisoners - interactive spaces and projections
Offline philfrei
« Reply #32 - Posted 2011-12-11 21:39:01 »

@bobjob -- Again, thanks! I probably will, sooner rather than later.
@nsimga -- Also, thanks! I think the flanger is going to be fun.

You've inspired me to start a thread on public software licenses. "Yet Another..." discussion on this contentious issue.

"It's after the end of the world! Don't you know that yet?"
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline philfrei
« Reply #33 - Posted 2013-07-27 05:37:26 »

Request: Move to "in progress" area. [NOTE: link to project is on the start of the thread.]

I've restarted work on this project after a long break. Unfortunately, I think I'm overtaxing the cpu with the result being that the sound occasionally breaks up, sometimes stuttering rather badly for an extended period. I have a pentium 4, 3.2 GHz, 3GB of RAM. This was purchased almost 10 years ago, so maybe most other folks won't have the problems I'm having? The game usually is consuming from 60%-80% of my home computer cpu.

I have questions about possible strategies for optimization:

How much of a pickup might there be, going from passive (currently) to active rendering, using Java2D? Should I instead go straight to Libgdx or Lwjgl?

I'm wondering if maybe the Java2D can still be made to work and leave enough cpu for smooth audio. There are a few things that I'm doing that may be needlessly adding stress:

(1) separate drawImage() methods for the stars, there are 600--though StumpyStrust tutorial (http://www.java-gaming.org/topics/java2d-clearing-up-the-air/27506/msg/246444/view.html#msg246444) suggests that this shouldn't be too much of a problem until you get to 4k image particle systems and the like. (Could just print as a single graphic, but I don't want to lose the twinkling animation if I can avoid it.)

(2) redrawing the "scrolls" every frame with their vibrating Simplex textures.

(3) There is a fair bit of drawing over existing drawings--hitting some pixels two or three times when only the last will show.

Thoughts? Encouragements? Thanks!

"It's after the end of the world! Don't you know that yet?"
Offline Jimmt
« League of Dukes »

JGO Kernel


Medals: 139
Projects: 4
Exp: 3 years



« Reply #34 - Posted 2013-07-27 05:53:59 »

Moved to WIP Smiley
Offline philfrei
« Reply #35 - Posted 2013-09-28 00:17:23 »

Progress report: The applet loads quickly. (To load, see first post on this thread.) ALL the sounds are now procedurally generated instead of being loaded from .wav files. The file size went from about 18MB to under 400KB. Smiley But it takes about 5-10 seconds to get going while the audio clips are built. It's close to time to figure out how to code a proper splash screen.

I am having a problem with some occasional garbage appearing on the "scroll panels". They are animated via a Perlin algorithm, but for some reason the smooth "energy patterns" get messed up. Maybe it has to do with the refresh rate? My game loop is set to run relatively slowly, as the animation needs are low.



I have some code in place monitoring the game loop time, how much is consumed, how much is slept. As far as I can tell, I never overrun the amount of available time for a game loop--there is always some sleep occurring every iteration.

My next task is to switch over to active rendering. Maybe that will eliminate this graphics problem.

"It's after the end of the world! Don't you know that yet?"
Offline philfrei
« Reply #36 - Posted 2014-11-10 21:58:06 »

[A long time ago, I started making a puzzle game called Hexara. That thread is now locked and I don't have the admin rights to unlock it. Would it be possible to have it unlocked? This post could be moved to that thread.]


http://www.java-gaming.org/user-generated-content/members/27722/hexaragamesoundtester.jar

There's going to be a seminar on composing music for games at the SF Conservatory of Music and I'm hoping to have a working jar with the game and score for their Nov. 16th deadline (seminar is a week after that). The sound here is all procedural, no wav or ogg files involved.

This "tester" was made for profiling a newly upgraded procedural sound engine. My goal is to keep the cpu usage under 5% even when the sound is most active.

OPERATION:
The "in/out" tells the audio mixer whether or not to even bother reading the track.
The subtracks of the chimes synth (its polyphony--the number of chimes that can play at the same time), can also be tweaked. Changing that number (have to hit enter to complete) requires the mixer be programmatically stopped and restarted which results in an audible pause.

The "Tension Level" is going to be linked to the number of "scrolls" that are completed  in the puzzle. Completion of a scroll triggers a gong. When all the scrolls are solved the "gong completion" cue plays.

An increase in "tension" (as more scrolls complete) has the following effects:
(1) increases the density of the chimes,
(2) makes their volume/timbre a little brighter,
(3) makes the flanger modulation on the drone tone sweep more quickly.
 
Am considering other things to change (e.g., add new or slightly more discordant pitches to be played by the windchime).

This stuff hasn't been fully implemented in Hexara itself yet. First tests show that it can still stutter, but only very occasionally. The Java2D graphics badly need a rewrite and I suspect doing so will reduce cpu enough to clear that up.

I think it might be worthwhile putting a bunch of volume/pan/timbre controls in this "tester" to help with the design and with making sure the volumes don't overload (currently possible). But my first priority was to just make sure I had a way of testing the cpu usage.

RESULTS OF PROFILING / QUESTIONS:
Profiling, using JVisualVM, or even just using Windows Task Manager, gives somewhat inconsistent cpu % readings. This morning, I ran it full out (at Tension 5, all tracks on, completion cue playing) and it stayed below 5% the entire time. Grin But while running the same file at other times, the cpu sometimes spikes at 15-20%, . These spikes are weird though in that they don't consistently follow the duration of the 'completion cue'. For example, it can hit a high and drop back down below 5% for a majority of the time the cue is playing, and the spike can come in the middle or the end of the cue (as the notes are fading away).

Is the cpu usage a reasonable gauge? I finally figured out that some usage is caused by my cursor interacting with the Swing controls (about 5-6%). Also, it seems if FASTFIND or some other program starts running in the background, that increases the likelihood of the program's tendency to spike. What is that about? Can it be dealt with?

My computer is circa 2004, so maybe this is all moot for new computers. However, I do want this engine to be able to run on Android, so keeping the cpu usage low is important.

"It's after the end of the world! Don't you know that yet?"
Offline Jimmt
« League of Dukes »

JGO Kernel


Medals: 139
Projects: 4
Exp: 3 years



« Reply #37 - Posted 2014-11-10 23:56:28 »

Unlocked and moved.
Wonder if smf will provide a way to merge through url, though. Took a while to find this post Tongue
Offline philfrei
« Reply #38 - Posted 2014-11-12 19:50:46 »

I got a nice little opening animation working. Goal--have something minimal going on while resources are being manufactured in the background. Am pleased: the graphics are being cued off of the sound starts (using a Listener), and an envelope I wrote for the synths also works for the alpha control of the glow.

I think it is okay that the same Perlin graphic animation is being reused. It might be nicer if each was unique, but it would be significantly costlier. The graphic is a 64 x 128 image and stretched to 96 x 288 (another dodge to reduce cpu).




Run this jar to see/hear in action: http://www.java-gaming.org/user-generated-content/members/27722/hexaraopening.jar

Could be improved, but I'm trying to get a simple version of the game done for a "Demo Derby" on game audio, deadline Sunday midnight. Next step, (cross-fade?) to the main screen which should have had time to finish building all its resources.

"It's after the end of the world! Don't you know that yet?"
Offline philfrei
« Reply #39 - Posted 2014-11-25 00:47:42 »

http://www.java-gaming.org/user-generated-content/members/27722/hexara141124.jar

http://www.java-gaming.org/user-generated-content/members/27722/hexara141130.jar

Some new sounds (shimmer for new puzzle, dinks for mouse-overs, stereo chorus added to this and that) and graphic effects added, as well as some cleanup of transitions.

Two concerns:

(1) I've loaded up too much sound processing and the audio will start experiencing dropouts. If you try the game and this does or doesn't occur, I'd appreciate finding out! My PC is so old that I don't know if the dropouts that I hear are going to occur for others. I'm  puzzled by a lack of consistency in the profiling.

(2) It started crash on Macs for reasons that I have been unable to figure out. Last night a friend reported a screen freeze just as a puzzle is completed, but the audio continued. Weird! I generally don't have access to Macs. I did add a few more console lines to help with diagnostics. If you have a crash, a screen shot of the console out would be helpful and appreciated.

BASIC RULES: Light up a panel by placing icons in the center so that the neighbor relations are maintained. Light up all the panels at the same time to solve the puzzle.

I'm trying to come up with ways to have a 'tension level' that changes while working on the puzzle. Tension level is defined as the number of panels that are solved (0 to 5, 6 is a win).

What happens/changes with the tension level?
 - the panels light up
 - smoke now gets more active
 - chimes get more insistent
 - sweep on flanger of the drone speeds up and becomes more prominent.

Other ideas? Thx.

"It's after the end of the world! Don't you know that yet?"
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline thedanisaur
« Reply #40 - Posted 2014-11-25 10:35:00 »

Hey, just d/l and played your game, still going actually, my crit is that at first I had no idea what I was doing. It wasn't until I did a medium level puzzle that I started to understand how to play the game, the first three puzzles I did didn't teach me how to play, I just put random things in and it worked. I didn't feel it was complex enough to register what was going on.

Just my two cents....

anyway now that I get it I'm really digging the game. Also, the music is awesome, nice ambiance.


edit: just played the 5th bronze puzzle, from the left, and that was a good easy one. I think I would've understood what was going on there, but idk

Every village needs an idiot Cool
Offline philfrei
« Reply #41 - Posted 2014-11-25 20:40:35 »

Hey, just d/l and played your game, still going actually, my crit is that at first I had no idea what I was doing. It wasn't until I did a medium level puzzle that I started to understand how to play the game, the first three puzzles I did didn't teach me how to play, I just put random things in and it worked. I didn't feel it was complex enough to register what was going on.

Just my two cents....

anyway now that I get it I'm really digging the game. Also, the music is awesome, nice ambiance.


edit: just played the 5th bronze puzzle, from the left, and that was a good easy one. I think I would've understood what was going on there, but idk

Really valuable observation! I've been struggling with how to present the puzzles. Earlier, I was told they were too hard, but I have now seen a couple people do the random thing and not learn anything from the ones that are too easy. (Originally the first silver one was my "easiest".)

Making the puzzles is tricky. I do have a utility that allows me to test to verify the solution, and shows if there are multiple solutions--a couple of the easy ones are that way.

This is the biggest challenge of this puzzle game: communicating how the puzzle works.

I take it the sound is not breaking up. That would be good. It might also be possible if things got too busy for the volume to get too loud, which makes a nasty noise, rather than a hiccup.

"It's after the end of the world! Don't you know that yet?"
Offline thedanisaur
« Reply #42 - Posted 2014-11-25 23:12:10 »

Yeah the first silver was was pretty difficult, cause I didn't understand how to play the game, but there was a distinct change from random to meaningful so it's a good puzzle. I actually continued playing and solved all the silver and bronze ones before I fell asleep so I think you're on the right track.

and yeah no sound problems to report from my end.

Every village needs an idiot Cool
Offline Longarmx
« Reply #43 - Posted 2014-11-26 05:27:07 »

I tried to run the game, but all I got was the splash screen. Then, I was left with the "perlin animations" for over ten minutes until I closed it.

Offline philfrei
« Reply #44 - Posted 2014-11-26 20:16:48 »

I tried to run the game, but all I got was the splash screen. Then, I was left with the "perlin animations" for over ten minutes until I closed it.

Are you on Mac or PC or Linux? Any error messages on the console?

This sounds similar to  SHC's crash: http://www.java-gaming.org/topics/java-jar-file-rejected-by-folks-at-need-mov-asap/34855/msg/329380/view.html#msg329380. I visited a friend with a Mac and he was able to get past the splash screen, but crashed when a puzzle was completed.

I have to arrange for Mac access for testing. I'm totally mystified what is going on, and am wondering what I'm doing in Java 7 that is making Macs bug out. I don't think I'm pushing things that hard, but who knows.

"It's after the end of the world! Don't you know that yet?"
Offline Longarmx
« Reply #45 - Posted 2014-11-26 20:19:13 »

Windows 7 64-bit
There aren't any messages in the console.
I think that I should again point out that the animation still plays, so it doesn't crash.

Offline pjt33
« Reply #46 - Posted 2014-11-27 23:47:02 »

If both source and dest are already placed then they should switch positions instead of clearing the source.
I concur. The clicking on a line thing isn't something I discovered by just playing the game.

It IS a difficult puzzle, like the last half of a good hard sudoku. I was envisioning it being something where one would only tackle one a day, and it would take a pleasant part of an hour to solve.
I've solved all but a couple of gold ones in 20 minutes.

Still, it seems I should make some more examples that are easier to solve, to give folks some practice and a leg up. Having been at this a while, my perspective on difficulty is skewed.
That's always a problem with puzzle game development. (And with most game development, in fact).

This is the biggest challenge of this puzzle game: communicating how the puzzle works.
Instructions are a good first step until you have time to work on a detailed walk-the-player-through-the-level tutorial. I would say something like:

Each vertical banner contains a sequence of tiles which must be present somewhere on the board. The sequence may be present in a straight line, or bend all over the place. Arrange the tiles so that all six sequences are present.

I haven't had problems with sound dropping out. One feature that I would prioritise is a way to give up on a level and go back to the list of levels. I'd also add the text "Choose a level" to the level selection screen, because it's not immediately obvious that it's a level selection screen. I thought at first that it was just a splashscreen. And I would find it helpful to be able to hover over a tile on a banner and see the other instances of that tile, rather than just getting that highlight when I hover over a tile on the board.
Offline philfrei
« Reply #47 - Posted 2014-11-28 00:46:32 »

Windows 7 64-bit
There aren't any messages in the console.
I think that I should again point out that the animation still plays, so it doesn't crash.

Interesting. That's the first Windows complaint. Are you by chance using Java 8? The Mac computers that were having troubles are all Java 8.

I wonder what it means when a program has a single thread freeze like that. Maybe there is something going in the multithreading or concurrent processing where the spec has changed slightly. Classically, there is either an infinite loop occurring or a deadlock. I wrote this to make no use of Synchronization, though. I guess there could be a Swing conflict?

Something similar happened once before during version upgrades, in the audio: it used to be you could create an AudioInputLine from an InputLine in Java 6. Then, there was a slight change in how underlying lines where ordered or something obscure like that and the code "broke" in Java 7. Actually, it didn't exactly break, the test for "Markability" just started to fail where it hadn't in practice before, and a lot of us didn't know audio line input often isn't 'markable".

I did a search earlier on java 8 mac bugs. I'll try searching on Java 7 to 8 transition bugs.

[EDIT: not finding anything suggestive. But maybe it is time to download Java 8. I guess I could run it separately, rather than out-and-out replace Java 7 just yet.]

@pjt33 Good suggestions! I like the text you wrote. May I use it or a slightly edited version? I used to have a menu bar with the ability to "RESET" a puzzle or give up. It may be time to bring the bar back, and include an instruction screen as well as choices for abandoning. I was thinking a Menu bar could also allow a way to load additional puzzles (sell a set of 24 or 48 at your choice of difficulty level for $1 or 0.50 cents or something). or maybe just have a row of buttons along the bottom. You are the second person to request the additional highlighting--I probably should go ahead and do it.

Happy Thanksgiving! (to those who celebrate it)

"It's after the end of the world! Don't you know that yet?"
Offline Longarmx
« Reply #48 - Posted 2014-11-28 00:57:12 »

Are you by chance using Java 8?

I actually am. I could try to install Java 7 tomorrow to see if that fixes it.

Offline Agro
« Reply #49 - Posted 2014-11-28 01:44:37 »

y u no use java 7

Offline pjt33
« Reply #50 - Posted 2014-11-28 09:31:50 »

I like the text you wrote. May I use it or a slightly edited version?

Sure.
Offline philfrei
« Reply #51 - Posted 2014-11-28 14:08:52 »

y u no use java 7
An Oracle website has a time line where they have scheduled discontinuing Java 7 updates in April 2015. That's coming up pretty quick.
http://www.oracle.com/technetwork/java/eol-135779.html

@Longarmx -- Are you using Eclipse, too? I always hesitate to jump forward to a new release. I'm still using Juno. Seems like it is time for Kepler + Java 8.

New theory on the crashes: I may be exposing myself to Swing multithreading problems, and these are more likely to go off on Java 8 than 7 for some reason. I am rereading about scheduling things on the EDT. (Book is open right next to me.) Have generally been kind of relaxed about this, as cluttering the EDT hurts performance, and haven't ever gotten in trouble prior to this.

"It's after the end of the world! Don't you know that yet?"
Offline Longarmx
« Reply #52 - Posted 2014-11-28 16:36:14 »

@Longarmx -- Are you using Eclipse, too? I always hesitate to jump forward to a new release. I'm still using Juno. Seems like it is time for Kepler + Java 8.

I never used Juno...I skipped straight from Indigo to Kepler. Wink

Offline gzuzboey
« Reply #53 - Posted 2014-11-28 17:31:43 »

@Longarmx -- Are you using Eclipse, too? I always hesitate to jump forward to a new release. I'm still using Juno. Seems like it is time for Kepler + Java 8.

I never used Juno...I skipped straight from Indigo to Kepler. Wink

Speaking of Eclipse, Mars is out Grin


YA BOI
Offline philfrei
« Reply #54 - Posted 2014-11-28 20:59:01 »

Java 8 installed, along with Eclipse LUNA.
I copied Hexara and PFAudio in, and yes, they are crashing (the audio is working fine, its the Swing stuff that seems to be crashing in test programs written for PFAudio).

And that is good news. Something to debug!

[EDIT: And the bad news is, it seems to be due to a bug in the Java 8 implementation of ConcurrentSkipListSet, a vital piece of the audio scheduling system. There is a bug listed:
http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8060435

Now what? Maybe will have to try and program a work-around.

Stuff like that isn't supposed to break!!]

[EDIT #2: embarrassment. The error was with a faulty compare method I wrote implementing the Comparable used by the ConcurrentSkipListSet.]

"It's after the end of the world! Don't you know that yet?"
Offline philfrei
« Reply #55 - Posted 2014-12-01 02:14:26 »

Am ready to try again. I am pretty confident the bug that caused hangs has been identified and fixed. The following two programs should work with Java7 or Java8, on Mac or PC or Linux.

http://www.java-gaming.org/user-generated-content/members/27722/hexara141130.jar
http://www.java-gaming.org/user-generated-content/members/27722/hexarasoundtester141130.jar

There is a collection that I was relying on: ConcurrentSkipListSet, for scheduling audio events. I used a ">=" where there should have been a ">" in a compareTo method, and while it worked in Java 7, a new implementation of the collection exposed the sloppy compareTo and would start to spin in place. Had I been more rigorous in the compareTo, following the requirements in the JavaDoc, this would never have happened. Sad

Anyway...it will be nice getting back to making progress instead of fixing broken things.

It will be a little difficult taking the time to "finish" the game. Am going to try and stick with it, especially after having been given some good suggestions. But a lot of my brain is occupied with wanting to test out the implementation of more game scoring techniques with the audio library. And there is a little matter of pending contract work that needs to be done to pay the rent.

"It's after the end of the world! Don't you know that yet?"
Offline Longarmx
« Reply #56 - Posted 2014-12-01 02:18:25 »

I can confirm that it now works!

Pages: 1 [2]
  ignore  |  Print  
 
 

 

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!