Ok thank you
Type: Posts; User: Bingo90
Ok thank you
What class is it in?
I already did that. I mean the best file writing method for a lot of objects. The output method itself, not the loop.
Well, what's the best way to write each object in an array to a seperate file?
I've got a array of objects and want to write each object in a seperate file. I've tryed to do this with a FileOutputStream and nio but it was too slow. Is there a better way to do this? It should...
Ah thanks, the volatile worked
I don't want to show all my code just for this problem. But the while loop continues indefinitely.
--- Update ---
But strangely when in debug mode in eclipse and suspending the program and...
Actually, this isn't my real code it's just an example. My real code has lots of object updating stuff in it but without an output it doesn't seem to stop.
I've got a thread with a loop, here's my code:
public class UpdateThread extends Thread
public void run()
I'm using the hashmap for a tile based game. I'm converting the map into an array because I update these tiles in an update thread.
I tried synchronised, but it made it too slow. Just one thread modifies the values, the other just read them.
Is it possible to access all values in a hashmap from another thread and changing the content at the same time without getting a java.util.ConcurrentModificationException?
If yes how? I'm getting...
Wow... When programming the problem-showing-program the problem somehow solved itself
Sometimes the result for the chunk-array position is 128 sometimes 64.
It's kind of hard to explain. I'm using chunks in a tile based game. When using a absolute x or y value, it should place it...
I've got a tile based map, which is divided in chunks. I got a method, which puts tiles in this map and with positive numbers it's working. But when using negative numbers it wont work. This is my...
I got a working perlin noise 1D code and it always outputs the same result. I want to add a seed to it, that it only gives the same when using the same seed, but I don't know where I should put it.
So it's absoloutely impossible to change the maximum height without changing the gradient?
--- Update ---
Okay what changes should I make to my code that is works like I want? How do I check if...
When scaling it it would double the x-size of the "hills" but the gradient would still be too rough.
I can't simply scale it because the tiles are stored in an array. I want to change the generation code to generate better hills and drawing shouldn't change.
Okay what should I change to do this?
I'm using 1D Perlin noise to generate a tile-based world. But the hills that generate are too small. I tried changing the values of the parameters of the PerlinNoise1D method (see below), but that...