Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (521)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (589)
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 ... 35
1  Discussions / General Discussions / Re: [Resolved] java jar file rejected by folks at "Demo Derby", need .mov ASAP on: 2014-11-19 22:44:20
I took a look at the Fraps site. Looks like a good product.
OBS doesn't seem to be available on Windows XP. Maybe when I get the alleged new computer.
I'll check out virtual dub.

Just managed to swing a couple short term projects on a long-standing contract. Will be busy for a while, but at least making some reasonable money for the rest of the month. Counting eggs before they hatch: use it for paying down CC or for a new computer?? (Rhetorical question.)
2  Discussions / General Discussions / Re: [Resolved] java jar file rejected by folks at "Demo Derby", need .mov ASAP on: 2014-11-19 20:41:18
I took the MP4 that basil_ made and converted it to MOV via Zamzar. But I didn't have any way to test the result before giving SFMC the link. SFMC was unable to open the resulting MOV file.

I also tried editing the MP4 to cut it down to under 2 minutes, but ran into problems with VLC's editor, and converting to WMV and using the Windows Movie Editor damaged the audio (added high silvery noise--probably due to 44100 vs 48000 fps issues).

The deadline has passed and the issue is now moot, at least as far as participating in the "Demo Derby" this time. I still plan show up, schmooze, and show anyone that has a laptop that can run Java the actual jar file. I'm also going to see if Mike Moravsky (Valve composer, involved in Portal II amongst other games) will take a look. We exchanged a couple emails a year or so back after another talk he gave. He is on the Panel that will discuss game composing, but wasn't going to be part of the Demo Derby.

Big thanks to everyone who helped or offered to help out!!

And the MP4 file that was made was great feedback in its own right. We should do video trials and send them back to the programmers as a regular thing, perhaps.

I need to solve this issue. I'm afraid my computer may not have enough cpu to run a screen capture AND play the game at the same time. Need to buy a new computer! I have been saying this for over a year now.

I'm going to perhaps make the next task (instead of further polishing Hexara) be making the audio engine available. I'm not sure what form this will take. I'm thinking there should be two version, a simple system and one with more features. The only way I can think to do this, though, is to have two GitHub projects running in parallel. I also have to make sure that the API for the stripped version will be a pure subset of the fancier version's.

Regardless, I think the performance and size can potentially compete with TinySound (which is pretty cool already), offering a slight performance boost and some additional features but with a slight addition of complexity and a prejudice against decompressing resource files as part of the critical inner loop of the engine.

OK enough talk, time to put up or shut up!!
3  Discussions / General Discussions / Re: java jar file rejected by folks at "Demo Derby", need .mov ASAP on: 2014-11-19 03:52:50
I wouldn't push them to do stuff they don't want... that tends to make judges biased. Why can't you cut it? Would take 5 minutes max.

Good point.

My brain is kind of stuck. I do have a Windows program that can edit video files, even though it doesn't support screen capture. I'm not sure it supports the format I have. But I will definitely look into it.
4  Discussions / General Discussions / Re: java jar file rejected by folks at "Demo Derby", need .mov ASAP on: 2014-11-19 00:26:44
Bah.

The file may be too long. NOW they tell me: 1-2 minutes max. The file is 5 minutes.

I sent a request asking if they could go ahead and take the file (it's 36MB) and just cut it short in presentation. I don't know if they are set up to be able to do that.

We shall see.
5  Discussions / General Discussions / Re: java jar file rejected by folks at "Demo Derby", need .mov ASAP on: 2014-11-18 22:30:54
@basil_

Yes, a video with instructions would be awesome! I want to do a bit more work on the game first.

Thank you ags1! I wonder if the folks at SFMC are going to think so as well. It's more new-age/sound-score than something that sounds like "composed music." But this seems appropriate for this game, and that should always be the first consideration for any score, imho.

The video indicates that the playback of the audio was smooth. No interruptions to the sound! I was having terrible problems with dropouts in previous iterations. The new improved mixing and FM synths are much tighter now.

I don't know if folks realize that the sound is being generated and mixed live. No wav files. No ogg files. I am pretty close to releasing the audio engine on JGO. All the help I've been getting from this community just increases my wanting to share this work!   Smiley Kiss Cool
6  Discussions / General Discussions / Re: java jar file rejected by folks at "Demo Derby", need .mov ASAP on: 2014-11-18 21:48:25
The file plays great! It is terrific feedback for me also, to see how someone approaches the puzzle, trying to figure out WTF the rules are for solving it, especially since I didn't provide any instructions. (No I'm not a sadist, really!)

I'm going to see about converting this to .mov. There's a free service online called zamzar. Probably it will take a spell, since I have slow uploading. Maybe I can give them your URL below.
7  Discussions / General Discussions / Re: java jar file rejected by folks at "Demo Derby", need .mov ASAP on: 2014-11-18 21:04:56
I have a registered copy of fraps. Could record with that, you're using opengl right? I think fraps is capable of detecting any opengl context. Unfortunately I am in class right now, but I will check it out if you want me to when I get home in ~3 hours.

I'm downloading basil_'s video. Am going to grab a sandwich and come back. Will let you and basil_ know if this works or not, and whether more help is needed.

All the animation is Java2D, believe it or not. Actually, why not? Some of the glow effects are pretty sketchy--trying to just give the general idea, not finished product, for this deadline.
8  Discussions / General Discussions / Re: java jar file rejected by folks at "Demo Derby", need .mov ASAP on: 2014-11-18 20:54:36
I just woke up. Good timing!

Let me see if my nice new copy of VLC can play your file.

9  Discussions / General Discussions / Re: java jar file rejected by folks at "Demo Derby", need .mov ASAP on: 2014-11-18 17:35:20
I am able to record with VLC and playback the file. I'm selecting the option:
Video for MPEG4 720p TV/device

It seems to me that is what they asked for in the specs.


BUT, it doesn't seem to be recording sound. I check the audio tab and it is finding the correct line on the sound card. Am stumped. I'm going to see if it can record just audio, and see if there are any questions on the topic in their forum.

Meanwhile, once again, if there is someone willing to make a recording, that would be awesome. If the recording is to an AVI file, I think I can handle the conversion. There seem to be online converters available.

[EDIT: tried recording as ogg from the jar, but resulted in file length of 0
trying to register with VLC forum, not getting confirm email, must take a nap--pinkies are starting to go numb from lack of sleep! Will try to check in again in a couple hours. SFMC asked for ASAP, but I don't know how strict they are going to be.]

[EDIT: @basil_ hope you see this and are still available!]
10  Discussions / General Discussions / Re: java jar file rejected by folks at "Demo Derby", need .mov ASAP on: 2014-11-18 17:01:26
@SHC
Thanks for trying. I don't know what to make of that error message.

The next console line should have been: "GameFrame.noteRelease" for when the last gong note of the title is sent a "release" command. At that point it launches a drone tone.
Then, there's a console line: "GameFrame.noteEnd" at which point I launch a command to change the JPanel that is displaying on the parent JFrame.

But it seems we don't even get to the "release" of the 7th gong sound.

Very puzzling. I'll have to spend some time working on testing the jar on a Mac and figure out what is going wrong.

Meanwhile, I found some instructions on VLC capture--am going to try that route again.
 Tongue Huh Clueless Sad Angry
11  Discussions / General Discussions / Re: java jar file rejected by folks at "Demo Derby", need .mov ASAP on: 2014-11-18 16:33:05
am unable to figure out how to capture video with VLC. It seems to be geared for playback. There was a spot for displaying screen contents in the player, but unclear how to record. All I could find was a question with a complicated command line for an answer and another comment saying that command line was deprecated. maybe I downloaded the wrong VLC product...

Am going to try OBS.  Nope. XP doesn't have DirectX 10 features that they use. Not supported.
12  Discussions / General Discussions / Re: java jar file rejected by folks at "Demo Derby", need .mov ASAP on: 2014-11-18 16:04:45
[EDIT: screen position is top left corner, width = 808, height = 612. I think about 2 minutes should do.]

@SHC -

That would be awesome if you could do a record!

I'd like to record the filling in of the first (on the left) silver (middle row) puzzle.

There aren't any instructions on the puzzle. It's a matter of dragging and dropping icons into the center grid. Here is the solution:



One last icon (the bullseye) has not been dragged into place yet. I'd like you to pause before doing so, so that folks have a chance to hear how the sound is different when the puzzle is almost complete vs when just starting. (The drone 'sweep' is quicker, there are more chimes.)

On the front screen (desert sky plus buttons) a quick mouse-over on the buttons will demo the click sound.

After completing the puzzle, the screen fades and returns to the desert sky. Perhaps select one more puzzle and load it, to hear the fade-on shimmer again? Then you can end the video.

That would be awesome!!

@basil_  Really great of you to also offer!! If SHC is unable to get to this, and I'm unable to do it on my own, you are my backup!!!

@kpars - Thank you, too! I'll put OBS on the queue, I'm trying VLC next (just downloaded).

Had to take a moment to uninstall effing ENTERDIGITAL crapware that came with CamStudio.  
13  Discussions / General Discussions / Re: java jar file rejected by folks at "Demo Derby", need .mov ASAP on: 2014-11-18 14:32:18
Crap, CamStudio.org download seems to have included a bunch of ads popping up. This, despite opting out on the downloads.

Also, it is having trouble detecting my sound card. If I can't get the sound card thing to work with this software, I'll give VLC a try next.
14  Discussions / General Discussions / [Resolved] java jar file rejected by folks at "Demo Derby", need .mov ASAP on: 2014-11-18 13:26:57
[EDIT: Am downloading CamStudio -- ]

There is an upcoming conference on game music called "Games Up!" at the San Francisco Conservatory of Music, and they had a call for submissions for a Demo Derby. I scrambled and got a working "Hexara" jar file and sent that in by the deadline (Sunday midnight) but got a rejection email.

Logical, yes? Give them an actual working game with sound/music? But no, they want .mov files!

Would someone be willing to help me out by making a short .mov of Hexara? This is just a matter of having the right screen capture software, yes? I would think 90 seconds of the game would work. I might need to give some hints as to which puzzle and how to solve it. I don't mean to ask anyone to do something that wouldn't take them more than a few minutes to accomplish.

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

Alternatively, advice on what software to install to do this myself would be helpful. (Give a person a fishing pole...) I'm running Windows XP still though and have no budget to speak of. Anything spent is coming off of a credit card, adding to debt load. And hopefully it will be easy to learn to operate.

Quote
Thank you for your submission. Unfortunately it is not in the format we need. Please read the guidelines below and re-submit ASAP:

1. Score an open source game clip of your choosing (available through Archive.org, Videogamer.com, Gameclips.com, or YouTube). Video clips should be .mov files, and at least 720p.
2. Add your music to the video clip, make sure it is stereo and the sample rate is at least 44.1k.
3. Send your video to ...
15  Game Development / Newbie & Debugging Questions / Re: ANDROID Perlin Noise clouds & CPU-Usage & Bitmaps on: 2014-11-15 05:53:04
The fisheye thing could be pretty cool, but the 3D approach also works for a blooming effect. Yes, it is slower than 2D. Have to keep the size down and limit to 3 octaves.
Click to Play

(Made with SiVi, adding only z-axis animation to a cloud texture.)
16  Game Development / Newbie & Debugging Questions / Re: Perlin Noise clouds & CPU-Usage on: 2014-11-14 21:32:03

Thanks for all the help but I am still stuck with the Perlin Noise question, how can you really have cloudy effects (I am just shifting the x and y value). Like the effects that make the perlin noise clouds look like they are 'blooming'..

-RoseSlayer

Use the z-axis (use 3D noise).
17  Games Center / WIP games, tools & toy projects / Re: Hexara -- work in progress on: 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.
18  Game Development / Newbie & Debugging Questions / Re: Perlin Noise clouds & CPU-Usage on: 2014-11-12 08:23:04
It turns out that drawing a smaller Perlin animation at a larger size doesn't look half bad! I'm taking a 64 x 128 image and stretching it to 96 x 288. I had to tinker a bit with the scaling used inside the Simplex call to make the texture a bit busier, not a big deal.

First attempt, drawing a 50 x 100 image at size 100 x 300 was too much. Some of the stepping became visible. Maybe results will vary on different screens?

The resulting image is used 6 times, 3 of them in reverse orientation. It seems like this is a viable way to cover a fair bit of screen with a reasonable cpu cost.
19  Game Development / Newbie & Debugging Questions / Re: Perlin Noise clouds & CPU-Usage on: 2014-11-11 20:18:25
The Perlin noise implementations I have used have all imposed high cpu costs.

You can try variants like these, and profile them:
*  write into an array vs writing directly into the BufferedImage via a Raster, then place the array into the image via a single operation
* try using a single values for all the colors & alpha merged into one value vs setting each channel separately.
* make a new image each time vs editing an existing image.

Unfortunately, my memory is hazy as to the how much effect any of this had. My best recollection is that there may not be a whole lot to be gained here relative to the processing time of each Noise lookup.

BurntPizza gave the main strategies. I'd add: use the lowest dimension noise that works. 3D noise is significantly more costly than 2D. And on using fewer noise layers: I wonder if sometimes people get stuck on sticking with "octaves" for multiple layers when a different scaling would suffice.  It may be possible to get a good-enough looking graphic by leaving off some of the octaves or using scalings other than powers of 2.

Classic case:
1/2 Noise(x * (baseFactor / 0.5), y * (baseFactor / 0.5)
+ 1/4 Noise(x * (baseFactor / 0.25), y * (baseFactor / 0.25)
+ 1/8 Noise(x * baseFactor / 0.125), y * (baseFactor / 0.125)  
+ ... for as many channels as visible within the screen resolution.

This gets to be expensive, and maybe better suited for non-realtime situations, where you make a graphic in advance and save the data for later use.

But one could also skip every second line, or progress via a different fraction, e.g., via 1/3rds instead of 1/2.
SiVi is helpful for trying out different formulations. You can bring up the classic cloud from the "Gallery" and then mess with the scaling settings, with quick visual feedback. The example uses 5 channels, but one can get pretty nice clouds with just three. (I'm happy to help with instructions for using this tool, if you have questions. Just IM me.)
http://www.java-gaming.org/user-generated-content/members/27722/sivi.jar

I'm not clear on the second question. Yes, the alpha channel affects all the other channels equally. Do you want the result to have three alpha steps? I tend to make a Map beforehand, and have the noise value serve as a lookup into the Map. That in itself can help reduce the amount of processing, if you are using calculations to get to each R, G, B, and A value.

I've also tried things like making a smaller area and reusing the data via reflections or some other transform. There is also the possibility of making a smaller image and scaling it to a larger size in the drawing process via
1  
g.drawImage(x, y, width, height)

I haven't tried this yet. Just brainstorming. It might look like crap or require specific RenderingHints to make it work. But if you could double the size of the graphic and still use it, that cuts the Perlin processing to 1/4 of what is otherwise needed.
20  Games Center / WIP games, tools & toy projects / Re: Hexara -- work in progress on: 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.
21  Games Center / WIP games, tools & toy projects / Re: VERBAL - the fast-paced thinking word game on: 2014-11-04 02:42:33
I can't run the app because I only have Java desktop.  Sad  Are the ripples animated? That would be quite cool, I imagine. You wrote on another post about means of animation that were less cpu-intensive than Perlin's, so I'm wondering if this is one of those cases.

I am animating a panel in Hexara, using Perlin/Gustavson's Simplex 2D, and economizing by using the same area data six times at once (using a reflection for three of them). But if you have a cheaper method to share, I'd be interested in learning more about it. (Am also wondering about finding a cheaper way to get cloud effects used in the tuning/drone app I'm working on.)

If the word had been glissando, I bet I would have found it! I had to look up glissade to find out what glissader meant.
22  Game Development / Newbie & Debugging Questions / Re: Calling all Experienced Java Programmers.... on: 2014-11-02 05:59:57
Are you saying that you are struggling with the basics of animation? We have several decent tutorials on 'game loops' on the site, if you check out our Resources or Tutorials links (just below the mast head).

Simple example (nothing is simple the first time?), using Swing: place a JPanel in the JFrame. (Or use a JComponent, if you don't plan to put any other components in the area.)

Then, you can draw in the JPanel or JComponent by overwriting the method "paintComponent(Graphics g)". There are many methods of drawing using the Graphics variable g, such as g.drawRect() or g.drawImage(), or even more drawing methods if you cast the Graphics variable into a Graphics2D variable. There is a Java tutorial on Java2D worth checking out: http://docs.oracle.com/javase/tutorial/2d/index.html

Once you have a feel for drawing, check out the "game loop" tutorials. In a game loop, we calculate something, such as the location of a bouncing ball, then draw it, in a loop. One key is calling the repaint() method of the JPanel or JComponent. This will automatically call the paintComponent() method mentioned above.

That is the basic idea, anyway. There are a couple different ways to get the loop going. It can be a while loop, or it can be a Timer's "TimerTask" that is scheduled to repeat. (See util.Timer for more info on that.)
23  Games Center / WIP games, tools & toy projects / Re: VERBAL - the fast-paced thinking word game on: 2014-11-02 05:31:53
Is digressal a word?

I like the smoke rings. The other effect looks pretty subtle from the screen shot, but is probably a lot easier to see with animation. Moving things tend to catch the eye.
24  Game Development / Newbie & Debugging Questions / Re: Think im rendering wrong womehow (isometric) on: 2014-10-29 03:48:18
Can you say a thing or two about how your code is failing? For example, is it not drawing at all, or drawing the wrong stuff, or drawing the wrong place, or giving error messages?

P.S. Welcome to JGO!
25  Game Development / Shared Code / Re: Like Simplex Noise but don't like the patent? Introducing OpenSimplex Noise! on: 2014-10-20 23:27:17
@KdotJPG  -- or anyone else that understands these legal issues:

If your "open" implementation makes use of a geometrical "Simplex" for generating gradient noise uses of 3D or more, what exactly is it that you've done that puts this out of the reach of Ken Perlin's patent?

This is an honest question, not an attempt to shoot anything down. I don't have much knowledge of how patent law works in this situation. How is your implementation any more or less restricted than what Gustavson coded?

I'm assuming Simplexes are involved, since they are part of the title of the project.
26  Game Development / Newbie & Debugging Questions / Re: Clean code & Smooth development on: 2014-10-17 01:15:11
I generally keep my code pretty organized, however whenever I struggle on some implementation, it gets messy.

The exact opposite happens to me. The more I am struggling with an implementation or with debugging, the more I I spend cleaning up the messes I have made in order to figure out WTF I just wrote.

I'd try to make methods the most basic unit of cohesion. Whatever is done in a method should be summarized by the name of the method. Then, when you string a bunch of these methods together, what is going on is automatically described and readable (pretty much).

When princec says "Sun's bracket conventions" that means either of the two types that Cero demonstrated, yes? I certainly hope so, as I also prefer what Cero calls the Allman style, and would hate to think this would upset 99% of other programmers. Cero's first example is not exactly correct though, is it? Shouldn't there be more than a single space for the nesting?
27  Game Development / Newbie & Debugging Questions / Re: Best way to iterate through ArrayList? on: 2014-10-15 18:44:31
Here's another.   Wink

1  
2  
3  
4  
try {
    array[idx++];
}
catch(ArrayIndexOutOfBoundsException e){}


Surely that is considered hacky? lol

Yep.

I just found a discussion of the technique:
Quote
try-catch blocks generally use no extra time if no exception is thrown...Throwing an exception and executing the catch block has a significant overhead. This overhead seems to be due mainly to the cost of getting a snapshot of the stack when the exception is created...Generally, the performance cost of throwing an exception is equivalent to several hundred lines of simple code executions...You can reduce the cost by reusing an exception object rather than creating a new one...is two orders of magnitude faster...the sole disadvantage of reusing an exception instance is that the instance does not have the correct stack trace...
From Java Performance Tuning by Jack Shirazi, 2003. (pages 172-176)

It definitely seems like asking for trouble. In chapter 7, Shirazi profiles examples of a few cases where it might eek out a slight performance benefit. The best case that can be made for its use is if the end test is a significant percentage of the looping code (i.e., only a couple statements in the loop) and the number of iterations is really large. Then, perhaps the gain in dropping the iteration-is-done test outweighs the cost (assuming you throw an existing exception rather than generating a new one). But you still have to deal with the inevitable WTF that occurs when looking at the code fresh a few months later.
28  Game Development / Newbie & Debugging Questions / Re: Best way to iterate through ArrayList? on: 2014-10-15 08:20:53
Here's another.   Wink

1  
2  
3  
4  
try {
    array[idx++];
}
catch(ArrayIndexOutOfBoundsException e){}
29  Game Development / Newbie & Debugging Questions / Re: Perlin noise that looks like this on: 2014-10-14 17:02:08
Yesterday I thought I posted another round of playing with this--but I must have bungled it, as the post isn't here. I couldn't resist trying to reverse engineer your example.

Here is the screen shot:


I realize this is over-complicating things a bit, as you are still trying to get the basic function to produce the result on the top right. But I am confident you will get it when you try putting in a scaling factor like I described in the previous post.

In this example, the refinement is that a lower frequency is added (scaled to half of the main track), but I'm first clamping out all the negative values instead of folding them over back into the positives via the ABS function. So, overall, it is providing some nice shading with some "highlights" here and there where the white appears.

The equation for the left side (noiseValueA) in combination with the right side (noiseValueB) would be this:

1  
2  
3  
4  
5  
6  
    noiseValueA = Math.max(0, noise(x * 3 / 256.0, y * 3 / 256.0);
   
    noiseValueB = noise(x * 6 / 256.0, y * 6 / 256.0);
    noiseValueB = Math.abs(noiseValueB);

    noiseValue = (noiseValueA + 2 * noiseValueB) / 3;


Then, transform noiseValue into a meaningful color value, and assign it to pixel (x, y).
30  Game Development / Newbie & Debugging Questions / Re: Perlin noise that looks like this on: 2014-10-14 16:32:53
You might be dividing the x and y by way too much, you want fairly low frequency noise to produce those loops

Actually, I'm guessing the opposite is the case, not dividing by enough.

To get lower frequencies, the rate at which one moves through the Perlin space has to be pretty small. Therefore the increments between one X and the next have to be very small. I'd try dividing X & Y by 64 or 32 to get something in the ballpark of what I displayed.

The "base" scaling factor in my app is 1/256 if I remember correctly, and the example I put up was 6 times that.

So try this:
1  
 noiseValue = noise( (x * 6) / 256.0, (y * 6) / 256.0);  

Or put in a simpler expression like (x / 43.0, y / 43.0);, and be sure and make the division result in a double, don't do integer division.
If you are using Gustavson's SimplexNoise, that should get you pretty close.
Pages: [1] 2 3 ... 35
 

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

The first screenshot will be displayed as a thumbnail.

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

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

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

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

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

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

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

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

CopyableCougar4 (64 views)
2014-11-01 23:36:41

DarkCart (150 views)
2014-11-01 14:51:03
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!