…seems like an awfully heavy way to avoid a queue… which would be faster and actually lock free… and simpler. For example, I have trouble finding the code that actually does any updating. I’m not sure what other code is being blocked, what this code is doing all of those “waits” for, etc…
It seems overly engineered and for no real purpose. Really really smart guys wrote the java.util.concurrent package.
@pspeed said:
Are you trying to lock-step two different threads or something?
There are probably better ways to do what you are trying to do.
Block synchronization is needed to ensure that the flow would put on hold, there is a quick solution to this problem?
scene update:
Phase number 1: notify tasks it is to update the geometry and wait for their completion;
Phase number 2: notify tasks it is to update UI and wait for their completion;
Phase number 3: render the scene in a lockable area
Wait Wait wait, you don’t update the geometry in another thread WHILE it is attached to the rootnode do you?
Cause that is a almost 100% cause for everything exploding,
@Empire Phoenix said:
Wait Wait wait, you don't update the geometry in another thread WHILE it is attached to the rootnode do you?
Cause that is a almost 100% cause for everything exploding,
My problem I already fixed, and the problem was in the counting of asynchronously executing tasks
@pspeed said:
Yes... but your code is the opposite of lock-free. Heaving synchronization and waiting everywhere.
Where as ConcurrentLinkedQueue<SomeCommand> or ConcurrentLinkedQueue<Callable> is essentially lock free. Moreover, JME already has a queue for you to add Callables to. It’s in the threading docs.
This is great, but how did you do the health bars and names for you and enemies? Are they on the gui node or the root node? At the start they keep jumping around slightly.
This is really looking nice, however… it kinda sucks that you request help, are glad to take it (or ignore it in cases where you shouldn’t have) and then just completely ignore people when they ask you how you did something.
The questions from other thus far:
Someone asked you how you did a portion of your UI, stating there is a flickering that probably shouldn’t be there.
Someone asked you how you did the engine flare.
It would be nice if you answered these before posting a request for help again, yeah?
EDIT: Even the answer “I won’t tell you” would be acceptable… at least you aren’t ignoring them
@t0neg0d said:
This is really looking nice, however... it kinda sucks that you request help, are glad to take it (or ignore it in cases where you shouldn't have) and then just completely ignore people when they ask you how you did something.
The questions from other thus far:
Someone asked you how you did a portion of your UI, stating there is a flickering that probably shouldn’t be there.
Someone asked you how you did the engine flare.
It would be nice if you answered these before posting a request for help again, yeah?
EDIT: Even the answer “I won’t tell you” would be acceptable… at least you aren’t ignoring them
Language barrier: (
@javagame said:
This is great, but how did you do the health bars and names for you and enemies? Are they on the gui node or the root node? At the start they keep jumping around slightly.
These elements I implemented through NiftyGUI
http://ideone.com/dFWrCX
http://ideone.com/l1K03L