Javasound's open source implementation: http://www.tritonus.org/
Recently prepared to make a voice chat room, there are many difficulties. The relevant resources and development progress will be continuously added here later.
Voice API principle
Voice used in a game software
It is now possible that Capture to the sound of the microphone to the WAV file. Preparing to play the captured stream directly. With multi-thread, the crash was 2 times. The API is very unfamiliar.
The overall idea is as follows: 1, every 1 second, send the captured audio stream to Server 2, and Server except for multiple users of the chat room. 3. After receiving the applet, play this stream.
Simple and put the elephant in the refrigerator, but searching all over the network, no CLUE found. 20040707 TCF
Strive to this: SAMPLE
The text chat room has been done, and the non-closed Socket connection is used. Now ASP.NET 2.0 can also achieve no refresh.
Implement network voice signal transmission with Java
Sing Li 's guide: http://www.vsj.co.uk/java/display.asp?id=10
Http://www.tritonus.org/plugins.html
http://cdisolutions.com/chatdemo/
http://www.codeproject.com/asp/cdichatsubmit.asp
[quote] Author: Dana Nourie
[img] http://gceclub.sun.com.cn/staticContent/html/2004-05-08/gdc2004.jpg [/ iv]
Game Developers Conference (GDC) attracted more than 10,000 attendees, which was held for those game development professionals, they drove the $ 9 billion video game industry development. At this meeting, developers were able to participate in more than 300 speeches, teaching and round table discussions involving all aspects of all types and platform development.
GDC is held annually in the San Jose City Convention Center, California. I have participated in the full day of the speaker of Shawn Kendall, Professional Java Game Tutorial. Shawn Kendall is taught in Full Sail, and has developed a Demo based on Java 3D game technology for Full Sail and Sun Microstems; Syrus MesDagh also developed a leading game technology for Full Sail and Sun Microsystems; Dustin Clingman It is the professor of the Game Design and Development of Full Sail Real World, and is the president of the game studio ZeitGeist Games, Inc.. In addition, the two visits from Sun Microsystems also speech, they were Jeff Kesselman and Doug Twilleager.
Shawn Kendall started his speech by asking about the number of Java developers in the current house. About 20 people raised their hands. When he asked how many people hoped to use Java technology in the game development, all more than 30 people have raised their hands. It seems that everyone's attention to speed and efficiency is not big, most of the attendees seem to be more concerned about which Java technology is more useful in game development (including mobile platforms). This course puts the focus on multi-player online games, which makes the courses are very satisfied.
Shawn explains that they will publish the latest Java APIs for game development, including their advantages, disadvantages, and problems. Each speaker uses a slide. In addition to the main arguments, these slides include many code examples. This course organizes the following sections:. NEW IO (NIO). Java Native Interface (JNI). Java Open Al (Joal). The internet . Java 3d. Java Open GL (JOGL) Shawn Kendall explained that he defined some questions encountered when using Java for game development last year, and J2se 4.x has resolved all those questions. Because of the new API, you can now develop multi-player online games in Java, and performance is no longer as problems like before. There are many commercial games developed in the market, like Star Wars, one of which is developed using 100% Java, Law & ORDER. [b] New IO (NIO) [/ b]
Syrus Mesdagh starts his speech by detailing various types of buffers, primary disk drives, system memory, and application buffers. In addition, he also explains the difference between buffers and direct buffers, and how to apply buffers to cache data to achieve the purpose of improving performance. However, the disk with a large buffer is actually as slow as the intermediate buffer. He then gives example code to show how Java platform handles buffer.
Next, he mentioned the biggest benefits of NIO:. High performance document IO. . Support for more robust converted characters. . Scalable network NIO. . Channel & Buffer.
NIO provides new features and improved performance in buffer management, scalable network, file I / O, character set support, and regular expression matching.
Syrus demonstrates a slide showing a baseline test, and Syrus shows a slide showing a baseline test, comparing a slide showing a baseline test. The process of files. When the buffer is 16K, when the local code is processed to 78%, Java has 100% copies. Cyrus also discusses the advantages and benefits of direct buffers relative to non-direct buffers.
There seems no one in the room needs more performance comparison, but it is proposed more questions about the details of the code. More code examples are shown in detail discussion.
[b] Java Native Interface (JNI) [/ b]
Each speaker pointed out that you can use the Java programming language to write games, but not always, there are some cases that you may have to call local functions, which are sometimes calling or similar systems. To accomplish this, you need to use the Java Native Interface (JNI) API. JNI makes code written in Java programming language and integrates with code written in other languages such as C and C . This allows you to make full use of the Java platform without having to give up legacy code investment.
JNi is not as much as used before, this demand is decreasing with the release of the new Java platform. Just use JNI when you need to execute the task that the Java platform cannot support.
[b] java open al (joal) [/ b]
Open Al is an open source, cross-platform 3D audio API, which is suitable for game applications and many other types of audio applications. Java Open Al is a Java binding API based on existing Open Al API hierarchy, providing hardware support and spatial audio for games written in Java technology.
Dustin Clingman explained that if you know how to use Open Al, use Java Open Al (Joal) is very simple. Even if you are not familiar with this API, it is also very easy to learn to use it, although there may be some problems in the game. Dustin asks if someone is using the Javasound API, but no one answered is being used. Then he continued to say Joal directly and Javasound. Javasound is very valid for many types of applications, but it does not use hardware such as sound card like Joal.
He discussed the following core classes in Open Al:. Alut class - simplified initialization operation. . Buffer class - Cache you want to play audio data. . Source Class - contains sound information that is not directly and audio sound, but includes start and stop control.
Open Al is scalable, currently supporting Eax, AC3, and OGG Vorbis. Joal is extending EAX and additional support, and is cured for standard playback. The source code tree of Java binding is open to the customized custom implementation.
[b] Network [/ b]
Jeffrey Kesselman is a Server architect of Sun Microsystems Game Technology Group. He discussed the current form of online games, basically MUD, like Everquest game. He discussed the problem of this model and explained the difference between waiting time and bandwidth and reliability. How much may it be to the other side for a packet? UDP and TCP / IP, which kind of reliable? You need to design the game in the event of a communication environment.
[b] GAME communication [/ b]
TCP / IP is a more reliable,-facing-oriented protocol, which may be in your game. Players play games in a set of frame synchronous simulations. All inputs are decomposed by each frame. The advantage of this is that everyone can see the same thing, the packets can be smaller, and safe. Its disadvantage is that the update is too frequent, it connects everyone to the waiting time.
In an open loop asynchronous format, each player runs independent simulation, updating is periodic, more suitable for Wide Area Networks (WAN). If you just start learning to develop games, Local Area Networks (LAN) is easier to use. [B] Connection Type [/ B]
The connection type between players is still more diverse, each has its own problems and reliability issues:. Analog modem: too slow, but it is still very common for players. . DSL / Cable: Faster than the modem, fewer problems. . Satellite: Not universal, due to high-quality time issues, is not suitable for playing games. . Local internet.
[b] Server logic [/ b]
After discussing some of the controller object status communication and client logic, Jeffrey discusses details of server-side logic.
At the server, you need to consider your data center security, the player is using the connection type, waiting time problem and scalability. In addition, you need to know that most games are MUD models. This means: zone = room geometric shape. Every area has its own server. Because players do not distribute among regions, this means that some servers have more players than other servers. For one area, the server capacity may reach the limit, and the other area is relatively empty. This will also cause problems for players who wish to cooperate or form a team. The server architecture may separate them.
This discussion leads to the announcement of new server technology.
[b] Sun Sim Server Technology [/ B]
Sun SIM Server Technology has several advantages over other game servers:. Assigned CPUs and memory for players, not space. . The whole world is present in the form of data in a persistent, fault-tolerant data warehouse. . Reduce programming complexity. . The processing layer is an event-driven and is completely stateless. . The processor checks the part of the world when needed, and then put it back. Not yet given in the date of publishing or available.
[b] Java 3D and Java Open GL (JOGL) [/ b]
The Java 3D API is working very well and is completely satisfactory for game development. Java 3D provides an object-oriented interface that supports a simple, high-level programming model that you can use to create, render, control 3D objects, and visualized environments. Shawn Kendall showed an example of Java 3D racing game, and they created this example for last year's courses. It has a very good run, looks like any of the racing games you have ever seen.
But in the game development, Java 3D does have some limitations, which may cause you to use Java Open GL, which allows you to have more control over images. Java 3D is mainly a 3D scene graphic API. It does require a certain framework, but not a game frame.
JOGL is designed to provide a 3D graphic with hardware support for applications written for Java. It is part of the open source technology proposed by Sun Microsystems's Game Technology Group. JOGL provides full access to OpenGL 1.4 specification and almost all vendor extensions, and integrates AWT and Swing window component sets.
[b] Conclusion [/ b]
Each speaker uses a detailed slide and gives a detailed code example and provides a number of instructions. Listeners ask questions for code samples and require additional examples as if the Java technology applied to game development is very enthusiastic. Many people also ask Sun to further reserves for further game technology, and where Game Technology Group will go.
Doug Twilleager answered these questions and discussed some of the attention of desktop, Java Desktop, and LOKING GLASS. This course starts from 10 am, ending at 6 pm, including rest and lunch time. Many of the concepts and problems surrounding game development using Java have been clarified, it seems that the technology is becoming more popular in the game world, speed and efficiency are no longer as problems like previous. [B] More information [/ B]
The Outstanding Characters of the industry have held more than 300 speeches, courses, discussions, and round tables, involving all platforms and all types of various types. http://www.gdconf.com/
Java.net - Java technology collaboration initiator. http://java.net/
Java Native Interface (JNI) - Java Native Interface (JNI) is a standard programming interface that can be written in the Java local approach through which Java virtual machine 1 is embedded in the local application. The main purpose is to binary compatibility of local Facuity implemented across all Java virtual machines on a given platform. http://java.sun.com/j2se/1.4.2/docs/guide/jni/
NEW IO (NIO) - Defines an overview of the buffer as a data container to provide other NIO packages. http://java.sun.com/j2se/1.4.2/docs/api/java/nio/package-summary.html
Joal - Joal Project includes a reference implementation of the Java binding of the OpenAl API, designed to provide hardware support for 3D spache audio supported for Java. https://joal.dev.java.net/jogl - Jogl provides full access to the OpenGL 1.4 specification and almost all vendor extensions, and integrates AWT and Swing window component sets. https://jogl.dev.java.net/
Practical Java Game Programming (Game Development Series) Dustin Clingman, Shawn Kendall and Syrus MesDaghi are incorporated. http://www.amazon.com/exec/obidos/tg/detail/-/1584503262/qid=1080877238/sr=1-3/ref=sr_1_3/102-3409476-9424920?v=glance&s=books
Source: http://gceclub.sun.com.cn/staticContent/html/2004-05-08/gdc2004.html
[Edit - 5/11/04 Author: Allen] [/ quote]