Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
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 ... 7
1  Discussions / General Discussions / Re: Game Engine vs. A Game Library on: 2013-05-17 14:52:20
A library usually provides an interface for a specific subsystem or component that you might want to integrate into your game: image loading, audio loading/playback, physics, rendering, and so on. A game engine provides the plumbing that ties all of those subsystem/components together (using several existing libraries, a bunch of custom code, or a mix of both) and usually provides access to it all via a framework. In short, a library is something you can use to implement the different systems of a game, and engine implements the systems for you in order for you to get busy with the game code and not worry about all the plumbing.

Technically, an "engine" is still a library. But that keyword lets you know that its doing a lot more for you than just loading images or playing audio. And you still might have a "rendering engine" or an "audio engine" that provide a lot of goodies on top of basic graphics/audio APIs. For example, OGRE isn't a game engine, but a rendering engine--nobody calls it a "rendering library"--because it does a heck of a lot of work for you than just abstracting away the underlying platform and rendering APIs.
2  Discussions / General Discussions / Re: Kindle version of programming books compared to actual books on: 2013-04-04 05:13:17
I prefer the Kindle version of tech books these days. I don't own a kindle, but rather use a tablet or the Amazon Cloud Reader to view them. I have shelves full of books and just don't have the space anymore.
3  Discussions / General Discussions / Re: How to think of game ideas??? on: 2013-02-02 08:55:22
Try this site. The guy has well over a hundred game ideas for people to use (he's planning to expand it to 300 eventually). I'm currently working on a game that's a modified version of one of his ideas. Great source of inspiration, even if you don't like any of the ideas you see there.
4  Discussions / General Discussions / Re: Oracle effectively disables Java in all browsers? on: 2012-09-03 16:20:58
Seen this latest one in the Register yet? This time, it's Java 6.
5  Discussions / General Discussions / Re: Law question on: 2012-08-30 05:59:58
Quote
The only point where the free vs. commercial comes into play is when deciding the amount of damages to pay.
I wouldn't put too much weight on that statement.  Just because the infringing content was 'free', does mean they cannot claim huge numbers in damages.

The court will consider intent when considering damages. Intent to profit will quite likely result in higher damages than just putting something out there for fun. There's more to it than just that consideration, though.
6  Discussions / General Discussions / Re: Law question on: 2012-08-29 15:30:52
Is it likely that Nintendo will sue? No. Is it possible? Absolutely. The best course of action is always to avoid using any content that can cause this sort of legal trouble. Advising otherwise is irresponsible.
If you go around being scared someone might sue you, I hope you don't live in the US.

Fear of being sued has nothing to do with it. There's a big difference from someone suing you because they slipped on ice in your driveway and a company suing you for blatantly copying their stuff. When someone asks advice on this issue, I very much think it's wrong to tell them not to worry about it. They need to be aware that a cease & desist order can come at any time, at which point all their effort is for naught. That can be a huge let down for someone who isn't expecting it. Much better to avoid that disappointment completely by using legally available content. Still, if they continue to insist on going down the copying road, at least give them enough info that they do it with their eyes open.
7  Discussions / General Discussions / Re: Law question on: 2012-08-29 08:42:26
Don't sell it. Don't claim it as your own. You'll be fine. Nintendo isn't known for hunting down their fans.

Don't be so sure about that.

The fact is, it does not matter whether or not a game is sold or credit is given to Nintendo, it would still be a violation of copyright or trademark. The only point where the free vs. commercial comes into play is when deciding the amount of damages to pay. Someone selling a game that violates copyright is going to dish out a lot more money than someone giving it away for free.

Is it likely that Nintendo will sue? No. Is it possible? Absolutely. The best course of action is always to avoid using any content that can cause this sort of legal trouble. Advising otherwise is irresponsible.
8  Game Development / Game Play & Game Design / Re: Game engines on: 2012-08-05 12:40:18
A wise man once said, "don't write game engines, write games!"

He was very wise.

But the people who wanted to write game engines and not games thought he was a dolt.
9  Java Game APIs & Engines / OpenGL Development / Re: 2D - Restricted to appying sprite textures to shapes? on: 2012-02-27 12:44:39
But how? What would I use to get the PNG file into something I can code with? Wouldn't using bufferedimage or awt would be kind of counter-intuitive, since I'm using LWJGL anyway? I don't know what to use to get the image, is there some sort of way to do it in LWJGL or OpenGL?

OpenGL does not provide any way of loading image files directly from disk. It knows nothing about image file formats, only pixel data. So no matter what programming language you use, you need to load the image file into memory first yourself, extract the relevant pixel data (dimensions, color depth & format, and the actual pixel values) then pass it all on to OpenGL through its texture creation interface. So, no, in Java, using a BufferedImage is not counter-intuitive.
10  Java Game APIs & Engines / OpenGL Development / Re: Shaders Oh My God on: 2012-02-20 04:59:33
hmm...I see. So a shader is just how vertices/normals/ what ever are render.

No. A shader does not do any rendering. It manipulates the vertex/fragment data.

Quote
So once a shader is setup, how would you go about rendering? Just use fixed function or vertex arrays or what ever?

If you are using fixed function rendering, you aren't using shaders. That's what the 'fixed' means -- it can't be changed. To render with a shader, you pass your vertex data to the graphics card via vertex arrays or VBOs and set up the projection matrices, blending modes and any other state you need. The only difference with fixed function is that when you want a particular effect, you activate a particular shader to replace the per-vertex processing stage of the pipeline.

Here's the complete vertex stage of the pipeline:

per vertex operations -> primitive assembly -> clip/project/viewport/cull -> rasterize

In the fixed function pipeline, all of this is happening in the driver. With shaders, you are able to completely replace the 'per vertex operations' stage with your own alogrithm as often as you like. Vertex data includes position, color, normal, texture coordinates and, for advanced uses, any custom data you want to associate with each vertex. This allows you to manipulate the data in any way you need to before it is actually drawn to the screen. Look at this shader, for example:

1  
2  
3  
4  
5  
6  
7  
#version 330

layout(location = 0) in vec4 position;
void main()
{
    gl_Position = position;
}


The graphics card gives the position of each vertex to the shader in the variable 'position'. The shader does no manipulation of the position at all. It simply passes it off to the next stage of the vertex pipeline untouched. Now look at this vertex shader:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
#version 330

layout(location = 0) in vec4 position;
uniform float loopDuration;
uniform float time;

void main()
{
    float timeScale = 3.14159f * 2.0f / loopDuration;
   
    float currTime = mod(time, loopDuration);
    vec4 totalOffset = vec4(
        cos(currTime * timeScale) * 0.5f,
        sin(currTime * timeScale) * 0.5f,
        0.0f,
        0.0f);
   
    gl_Position = position + totalOffset;
}


It takes the same information, the position of the vertex, and modifies it based on elapsed time. It then passes the modified position on to the next stage of the pipeline. While this shader is active, all objects that are drawn will move across the screen.

This is what vertex shaders do. The basic functionality is for transformations and lighting, but you can do a variety of tricks by manipulating any of the data associated with the vertex. That's the key point: you manipulate vertex data, then pass it back to the pipeline for final rendering. In the fragment shader, the concept is the same, but you are now manipulating the final color that is output to the screen rather than vertices.

Quote
If so, how can you tell if the shader is actually working?

By what you see on the screen. It's usually fairly obvious if the shader is working or not. What is sometimes less obvious is whether or not your shader is buggy.

Quote
And from what I have seen many shaders have variables in them, how exactly do the shaders know what these variables are and what they do?

Some are automatically provided by the graphics card (like gl_Position above), some are based on the data you configure in the vertex arrays/VBOs (like position above), some you have to pass from your program via the shader API (like time and loopDuration in the second shader above), and some are local (like timeScale and currTime in the second shader above).

I highly recommend this tutorial, Learning Modern 3D Graphics Programming if you've not seen it yet. Also, the Orange Book is a good reference to keep handy.
11  Java Game APIs & Engines / OpenGL Development / Re: Shaders Oh My God on: 2012-02-19 09:58:55
How does the shader know what is going on? the first line does not just magically make the shader know what you want done. Do you just put normal drawing code between the two calls and it does everything? I guess that the example just doesn't seem to translate into anything other than drawing a box for me.

Right after posting this I found this site
http://www.sjonesart.com/gl.php
which I am currently reading like a mad man but I still am lost on how I can make a shader just draw 2d images.

I think this is the source of your confusion. The shaders aren't "drawing" anything. They are being plugged in to two specific stages of the graphics pipeline: vertex processing and fragment processing. The rest of the work (primitive assembly, clipping, projection, culling, rasterization, etc..) is still handled by the driver. Don't think in terms of images and objects, but rather vertices, normals, color values, texture coordinates and fragments. Those are the things you manipulate in the shaders.

A 3D object is a collection of vertices, texture coordinates, normals and color components. So are 2D images, only on a smaller scale. After all, a 2D image is usually rendered as a set of 4 points that make up 2 triangles. The kinds of manipulation you would want to do on a 3D object are often different than what you would do on a 2D image, but the principle is the same.
12  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Console replacement for text adventure game on: 2011-06-19 11:13:21
I don't know if it meets all of your requirements, but DragonConsole meets some of them.
13  Java Game APIs & Engines / JOGL Development / Re: WebGL - Interesting development on: 2010-04-06 07:59:48
I disagree with you because the difference of frame rate is important and lots of people have laptops with crappy integrated graphics chips which is already a big limitation. If you add another limitation by choosing WebGL, you increase the probability that lots of players won't be able to play with your games comfortably.

And that's a developer's choice. If you can get consistent, playable framerates with WebGL, then it doesn't matter if JOGL or LWJGL would be 5 times faster.
Quote

Apple will never authorize anyone to deal games without using the AppStore.

This has nothing to do with Apple. People will access your web page through the browser, Safari on the iPhone. Apple is already pushing HTML 5 for video on iPhone and iPad.
14  Java Game APIs & Engines / JOGL Development / Re: WebGL - Interesting development on: 2010-04-05 13:32:58
What about Jake2? Admit it is faster.

It doesn't matter a bit which one is faster. This is all about distribution and platforms. WebGL requires no additional plugins. As long as games are playable at an acceptable framerate, then it becomes a much more attractive option than either Java or Flash. Particularly considering that with a relatively small amount of effort you can get the same WebGL game playing across multiple platforms, including iPhone/Android. Given time for wide adoption and stable implementations, this is going to become an extremely viable option for many types of games.

There are already some game engines being developed on top of WebGL, such as Copperlicht. Anyone with a capable browser installed who wants to play around with it and see what it can do, that's a good place to start.
15  Java Game APIs & Engines / Java Sound & OpenAL / Re: OGG and WAV sound-framework, interested? on: 2009-01-19 11:22:18
FYI: YAGE. That one is for the D Programming Language. Something to keep in mind.
16  Discussions / Community & Volunteer Projects / Re: Community Project Mark 562 - Game Direction Vote on: 2009-01-12 13:40:03
I'd happily contribute 5 ~ 10 hrs/wk depending upon my schedule. Some times more when I need a break from my other projects. I'm strictly a programmer. You wouldn't want me anywhere near the art.
17  Game Development / Newbie & Debugging Questions / Re: Networked Gaming on: 2008-11-06 03:49:54
so what about just hosting a site from home to begin with.....is it possible with just a basic internet/broadband provider?

Your users likely won't have great connectivity, though. I would recommend a VPS (virtual private server). Both SliceHost and Linnode have plans starting at US $20/mo, with enough memory/bandwidth to get you started (and you can always upgrade, or get more nodes, if you need). You have full control over your node/slice and have the option of several different Linux distros to install. At any time, you can wipe it and start over with a fresh install in a matter of minutes using the tools they provide. The support is top-notch (especially at SliceHost) and there are plenty of resources to help with setup and maintenance. If you need to run multiple nodes, Linnode will exclude internode bandwidth usage from your total.

I've got a VPS with SliceHost that I've been using for personal stuff for a few months now and have no complaints.
18  Game Development / Shared Code / Re: (Yet another) Java Scene Graph on: 2008-10-10 14:27:14
Maybe it would be better to write something that abstracts the OpenGL binding to drive it easier to use another binding.

Or maybe not. Not every 3D rendering library on the planet needs to be abstracted to such a degree. Some are, some aren't. Life goes on.
19  Game Development / Shared Code / Re: Quaternion Rotations in 3D Java OpenGL on: 2008-10-04 14:11:37
this seems so simple that I dont understand we have to debat hours on this, so there could be two reasons : I dont understand what you said or you dont understand what I said, so please explain me in a short way a case where a gimbal lock can lock anything in software, or can cause a problem ??

let's take a trivial case using rx,ry,rz. we take rx=90 & ry=90 so that we should be locked, what I said is just that we are not because we can still go in any other position.

it maybe as follow (but it depend on you choosen axis and sens for rotation to work with eg : x at right, x down, etc..., anyone can choose its own axis to works with) :

rx=90,ry=90,rz=0   ==   rx=90,ry=0,rz=90 == etc...

an object can be set in the same pos using differents combinaison for rotation, (this is why I said earlier that three rotation is too much.)

do you follow?? but even without that, if you agree with the fact that you can set an object in any 3d rotation position with euler angle (wich is true, no ?) you cannot disagree with the fact that you can go from one rotation pos to another at anytime, this is only logic.... and trivial.... and the way to go from one to another is just being able to rotate around an arbitrary axis, and you have one of the differents ways you can use to do that implemented in the code above.

Yes, you can adjust the angles at any time, clear and reset matrices and whatever you want. That doesn't prevent gimbal lock from rearing its head, but can open up doors to avoiding it. But this isn't an imaginary problem that goussej is making up. It's a real issue that is common in 3D graphics. You'll find it being discussed in a number of graphics books.

The point you seem to be missing is that those Euler angles need to be applied to the object you are rotating. Whether you let the graphics API handle it or you do it yourself, they are going to be applied one at a time. When rotations are performed sequentially, it's possible for one axis to become aligned with another. The order in which rotations are applied can affect whether or not gimbal lock occurs, so there are ways you can avoid it. This page has a couple of suggestions. The main reason that you don't see gimbal lock with quaternions is that the rotations are essentially applied simultaneously.
20  Game Development / Shared Code / Re: Quaternion Rotations in 3D Java OpenGL on: 2008-10-02 06:12:51
I always had trouble to understand what the exact problem with gimballock ?? and I still use euler angle for their simplicity.

I mean if you want to rotate an object around all its three axis you must also rotate its local axis  the same way as the object and that's all => no gimbal lock ?? dont know who invent the term of "gimbal lock" but it seems to be a confusion between world axis and local axis.

The term "gimbal lock" comes from the physical world. It describes the condition in gimbal systems where you lose one degree of freedom (i.e., the ability to rotate around one particular axis). In software it can be an issue when using a rotation system based solely on Euler angles if you don't account for it. You may never see it, but it's certainly possible since it's an inherent characteristic (which quaternion rotations don't have) of gimbal systems (simulated and physical). A real-world example of a near-gimbal-lock situation occurred on the Apollo 10 mission in May, 1969.

Quote
After Stafford's camera failed, he and Cernan had little to do except look at the scenery until time to dump the descent stage. Stafford had the vehicle in the right attitude 10 minutes early. Cernan asked, "You ready?" Then he suddenly exclaimed, "Son of a bitch!" Snoopy seemed to be throwing a fit, lurching wildly about. He later said it was like flying an Immelmann turn in an aircraft, a combination of pitch and yaw. Stafford yelled that they were in gimbal lock - that the engine had swiveled over to a stop and stuck - and they almost were. He called out for Cernan to thrust forward. Stafford then hit the switch to get rid of the descent stage and realized they were 30 degrees off from their previous attitude. The lunar module continued its crazy gyrations across the lunar sky, and a warning light indicated that the inertial measuring unit really was about to reach its limits and go into gimbal lock. Stafford then took over in manual control, made a big pitch maneuver, and started working the attitude control switches. Snoopy finally calmed down.


I've read that there are several instances in the Apollo records and flight logs where pilots had to make special maneuvers to avoid gimbal lock. So yes, it's a real problem, though the consequences aren't severe in 3D graphics programming Smiley
21  Game Development / Performance Tuning / Re: implementation of "instanceof" on: 2008-06-07 14:20:04
Before the coming of NIO, there was a non-blocking networking architecture someone developed with a bit of JNI. I'm beating myself up trying to remember the name of it and Google isn't helping me. It certainly wasn't an obscure project. Anyway, I remember it was a very performant bit of code. The native part was minimal and most of the work, dispatching Network events and such, was handled on the Java side. I was shocked when I first looked at the source and saw that the dispatcher used instanceof to route the events. My naive assumption had been that instanceof would have been a bottleneck for something like that. From then on I wasn't afraid to use it.
22  Discussions / Miscellaneous Topics / Re: Messing with c++ on: 2008-04-26 04:06:18
Unlikely. It's been going for many years now and doesn't show any signs of significant progress. It started off as a good compromise between C++'s low level and Java's high level, but has increasingly been side tracked by trying to introduce "trendy" new features with limited scope, making the same basic mistakes as C++ (but without the historical justification) and generally being clunkier and more inelegant than either Java or C++.

That's so wrong Smiley I know a lot of D users, myself included, who will strongly dispute that it's clunkier or more inelegant that Java or C++. It's miles, leagues, ahead of C++ in that regard.

I've been active in the D community since it was in early beta and it has made, and is still making, large strides. The pre 1.0 ramp up took a few years, as Walter (the sole developer at the time) took his time to get it right. D 1.0 wasn't launched until Jan '07. Now, it's perfectly stable and works as advertised (with a few minor quirks).  D2 is under development and is where the major focus is now, with the 1.x series getting bug fixes and the occasional back ported feature. The D2 spec is expected to be finalized by the fall of this year. It's a major shift in focus and will be unlike anything else out there. Multiprogramming is the future, so D is being positioned to meet the challenges that brings.

Take a gander at these slides from a recent presentation Andrei Alexandrescu gave at the ACCU conference (PDF): Grafting Functional Support on Top of an Imperative Language. Andrei is deeply involved in D2's development. Those slides will give you an idea of where it's going.
23  Game Development / Newbie & Debugging Questions / Re: Accessing classes on: 2008-02-17 05:39:48
Whenever i try using packages, Java starts "losing" classes.

As part of learning to use packages, you need to learn how to set up the classpath. Once you understand that, it's smooth sailing.
24  Game Development / Performance Tuning / Re: Heap/Stack allocation on: 2007-05-07 02:34:24
Of course I could pass as float, but this is not really acceptable for me,
because in my opinion a computer language is whole about abstraction,
and I really like it - so I want to use my vectors Smiley

This is one of those points that goes along with programming to the language you're using ('Thinking in Java' and so on), or when people talk about 'programming C++ in Java'.  Every language has different performance characteristics that must be considered. It's not necessarily premature optimization, but just standard rules of thumb. For instance, in C++ people often get bitten by copy constructors being called behind the scenes, so it's a common idiom to mark them as 'private' when they aren't needed or 'explicit' when they are.

So when performance is a concern, I think it's important that you consider the common idioms for the language you use. For 99% of my Java code, I don't think twice about allocating new objects. If it does turn out to be a performance bottleneck after profiling, then I'll worry about it. But there are certainly cases where I do think twice about it. This would be one of them. If you look at the code for the JMonkey engine, you'll see several places where they reuse a scratch Vector object in order to avoid allocation. That's a good policy to follow with Vector operations.
25  Game Development / Networking & Multiplayer / Re: Can I put game server on iis? on: 2007-04-20 13:26:19
Hello,

I want my game to run as applet, and i understood that i have restrication about opening communication to other places except the domain from which the applet got,

so my question is can i put the game server in the same domain as the iis?

for example (the link not exist in reality):
http://www.liorklain.com/GameServer/GameAppletContainer.html

can i set the game server (address/ domain)  to :
http://www.liorklain.com/GameServer/

The game server wouldn't have a URL, since you wouldn't be accessing it via http. It shouldn't be anywhere in the web root tree. The restriction is that the Applet can only connect to the same IP address from which it was served. So as long as the game server and web server are running on the same machine, you should be fine.
26  Game Development / Networking & Multiplayer / Re: Berkeley DB Java vs. JNI on: 2007-03-28 05:01:46
If you mean Berkley DB over our previous use of Derby,  it was the choice of our DB expert.

I think he's referring to the Java version of Berkeley DB. I was curious about this, too. Why use JNI with the C version when there is a pure Java version? Sleepycat was taken over by Oracle, but the license hasn't changed.
27  Java Game APIs & Engines / OpenGL Development / Re: upside down textures in opengl on: 2007-03-21 03:17:19
So is tutorial wrong then? Outdated?

No, it's neither wrong nor outdated. The BMP format, which the early NeHe texturing tutorials use, (usually) has the origin of the image in the lower left corner. This matches the default OpenGL texture coordinate system so the images do not need to be flipped. Some image file formats specify the top left corner as the origin, others allow it to be either/or. The BMP format actually lets you specify the (x,y) coordinates of the origin as part of the header relative to (0,0) being the lower left corner.
28  Game Development / Networking & Multiplayer / Re: Synchronization Questions on: 2007-03-20 04:08:25
First, a little background: When a thread enters a synchronized block, it acquires the lock of some object (think of it as a mutex). When a thread attempts to acquire a lock, it will fail if another thread currently holds the same lock. Every Java object has a lock, so any object can be used to synchronize on.

a.As they are non static methods, if one thread calls a, and another thread calls b, will one of the threads wait until the other method is complete, or does this synchronization only work on a method by method basis, eg If two threads call "a" one will wait, but they if they each call different methods they will not wait?

Non-static synchronized methods all synchronize on the object owning the method. In other words, it's the same as wrapping the entire method in a synchronized(this) block. So when a synchronized method is entered, the lock to the owning object is acquired. Another thread calling any of the methods on that object while the lock is held will block until the first thread releases it. So one thread will wait for the lock to be released if both call "a" of if they both call different methods.

Quote
bHow about for static methods?

For synchronized static methods, the lock of the class object is acquired. So once again, multiple threads calling multiple static methods in the same class will still be synchronizing on one object, which means that only one thread can call any of the methods at a time.

Quote
2For the following code:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
class A
{
  public void a()
  {
       synchronized(this)
       {
         //code here
        b();
       }
  }
 
  public void b()
  {
     synchronized(this)
       {
         //code here
      }
  }
}

Will the synchronized statement be smart enough to realize that the object is already locked by the same thread and continue executing? (That is if method a is called, although method b also locks the object, the same thread already has a lock in place).

When a thread attempts to acquire a lock that it already holds, success is automatic. So yes, a single thread can call multiple synchronized methods in the same object. If that were not possible, synchronized methods would hardly be useful.

Quote
Also if anyone has a really indepth tutorial link that goes in detail on the topic I would appreciate it.

I don't know of any good tutorials online, but there are some good books out there. Java Concurrency in Practice is an excellent reference that covers a great deal more that you need to know besides synchronization blocks.

In my own code, I very rarely use synchronized methods or synchronize on this. As a general rule of thumb, it's a good idea to minimize the amount of work you do in a synchronized block and to synchronize at the lowest level possible. A trivial example:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
class MyClass {
    List<MyOtherClass> theList;
   
    void addSomethingToList(MyOtherClass obj) {
        synchronized(theList) {
            theList.add(obj);
        }
    }

    void doSomethingToAnObjectFromList(int index) {
        MyOtherClass obj = null;
        synchronized(theList) {
            obj = theList.get(index);
        }
        if(obj != null) {
            obj.doSomething();
        }
    }
}


The idea is that you don't want to needlessly prevent a thread from carrying out operations that don't need to be synchronized, or to make a thread wait longer than it needs to. Consider what might happen if both methods in this example were synchronized: a thread calling doSomethingToAnObjectFromList would acquire the lock on the instance of MyClass and hold it until the method returns, meaning the call to obj.doSomething would be in the synchronization block. This means that any other threads calling addSomethingToList will needlessly be waiting for obj.doSomething to complete. Things really get bad if obj.doSomething is a lengthy operation. So by locking only on theList (i.e. the lowest level), you ensure that only the bits that need to be synchronized actually are and no threads will be waiting for obj.doSomething to complete.

Sometimes it really does make sense to synchronize entire methods, or on this, but most of the time you probably don't need to.
29  Java Game APIs & Engines / JOGL Development / Re: JOGL and nio on: 2007-03-12 07:27:30
Read this thread at the LWJGL forums.
30  Discussions / Miscellaneous Topics / Re: Should Java's clone method still be avoided? on: 2007-02-26 03:32:11
It's a good idea to pick up a copy of Joshua Bloch's "Effective Java Programming Language Guide" if you don't have it already. There's a lot of great advice in there and the section on the Cloneable interface will tell you everything you need to know about it.
Pages: [1] 2 3 ... 7
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars and Titan!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (78 views)
2013-05-17 21:29:12

alaslipknot (89 views)
2013-05-16 21:24:48

gouessej (122 views)
2013-05-16 00:53:38

gouessej (114 views)
2013-05-16 00:17:58

theagentd (126 views)
2013-05-15 15:01:13

theagentd (113 views)
2013-05-15 15:00:54

StreetDoggy (158 views)
2013-05-14 15:56:26

kutucuk (180 views)
2013-05-12 17:10:36

kutucuk (179 views)
2013-05-12 15:36:09

UnluckyDevil (186 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.361 seconds with 20 queries.