Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (522)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (590)
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 11275 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?"
Online Jimmt
« League of Dukes »

JGO Kernel


Medals: 138
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?"
Online Jimmt
« League of Dukes »

JGO Kernel


Medals: 138
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?"
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.

trollwarrior1 (28 views)
2014-11-22 12:13:56

xFryIx (70 views)
2014-11-13 12:34:49

digdugdiggy (49 views)
2014-11-12 21:11:50

digdugdiggy (43 views)
2014-11-12 21:10:15

digdugdiggy (37 views)
2014-11-12 21:09:33

kovacsa (61 views)
2014-11-07 19:57:14

TehJavaDev (65 views)
2014-11-03 22:04:50

BurntPizza (63 views)
2014-11-03 18:54:52

moogie (79 views)
2014-11-03 06:22:04

CopyableCougar4 (78 views)
2014-11-01 23:36:41
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

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!