CN102355489B - Method, system, server and client side for displaying and operating 3D (Three-Dimensional) game - Google Patents

Method, system, server and client side for displaying and operating 3D (Three-Dimensional) game Download PDF

Info

Publication number
CN102355489B
CN102355489B CN201110235071.6A CN201110235071A CN102355489B CN 102355489 B CN102355489 B CN 102355489B CN 201110235071 A CN201110235071 A CN 201110235071A CN 102355489 B CN102355489 B CN 102355489B
Authority
CN
China
Prior art keywords
game
client
server
equipment
directx
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201110235071.6A
Other languages
Chinese (zh)
Other versions
CN102355489A (en
Inventor
焦秀琴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN201110235071.6A priority Critical patent/CN102355489B/en
Publication of CN102355489A publication Critical patent/CN102355489A/en
Application granted granted Critical
Publication of CN102355489B publication Critical patent/CN102355489B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a method, system, server and client side for remotely displaying and operating a 3D (Three-Dimensional) game. The method comprises the following steps of: 1, acquiring image data of a DirectX-based 3D game display image of a server side by a server-side application layer display device in real time; 2, compressing the acquired image data of the 3D game display image by the server and transmitting the compressed image data to the client side; 3, receiving, decoding and displaying the compressed image data by the client side, receiving an operation instruction of a user by input equipment and passing the operation instruction back to a server-side virtual input device at the server side; and 4, receiving the operation instruction passed back by the client side by the server-side virtual input device in real time, and converting the operation instruction into operation information capable of being acquired by a DirectX game program. According to the method and system provided by the invention, the image data of the 3D game are acquired in real time in a user-layer code injection manner on the premise of not modifying the original game; and the user input passed back by the client side is provided to the game in the user-layer code injection manner on the premise of not modifying the original game.

Description

By method, system, server and client that network display is played with operation 3D
One, technical field:
The present invention relates to computer network remote control field, particularly relate to a kind of method, system and server of being played with operation 3D by network display.
two, background technology:
Computer 3D game is the game that the three-dimensional computing technique of usage space realizes operation, generally speaking, 3D game has higher requirement to the arithmetic speed of video card and memory size than other game, if hardware can not reach requirement, will run slowly or even crash during game.In other words, 3D game is very high for the configuration requirement of computer hardware.
On the other hand, more and more general application is just being obtained by the pattern that network carrys out long-range use, operate computer, especially along with the development of cloud computing mode, people tend to computational resource, storage resources, software resource to concentrate on data center and carry out unifying operation and management, and general user carrys out long-range these resources of access by network, carry out software application and operation.
But, for 3D game, there are the following problems for this mode of operation: first, under remote application pattern, software (namely playing) is actually and operates in server end, and image is transferred back to client show, the input that client receives user simultaneously sends it to server end with complete operation.And 3D game needs real-time with the speed of tens frames per second display image, the realtime graphic being transmitted these volumes like this by network is unpractical; Secondly, need real-time the operation of client to be passed back server end to control to play, this is also unpractical under current pattern.
Prior art related to the present invention has online game technology and RemoteFX technology.
1. online game.
Pattern of the present invention is different from current online game pattern.(1) although have client and service end, division of labor pattern is completely different.Complete game image real-time rendering by server end in the present invention, and these game image datas of Real-time Obtaining, compression after send client to, client be only responsible for display, do not process the operation that any and concrete game logic is relevant; And playing up of game image is completed by client in general networking game, this render process is obviously relevant to concrete scene of game.The primitive operation information of user is only passed to server by the client in the present invention, its operation that Processing tasks game logic is not relevant; And primitive operation information generally can transform by network game client, the corresponding command being converted into game issues game server again, obviously relevant with concrete game.In other words, the client of networking game can as service end of the present invention, the Pattern completion remote operation of being transmitted by transmission of video and primitive operation information.
(2) pattern difference makes the present invention lower for the requirement of client device disposal ability, only need can show Web compression image in real time, and primitive operation information can be returned, therefore support that the device category of operation client of the present invention and quantity can be more wider, expansion for type of play is also stronger, and user cost is lower.
2.RemoteFX technology.
RemoteFX is the desktop virtual technology that Microsoft increases in Windows 7/2008 R2 SP1, making user when using remote desktop to carry out game application or figure creation, can obtain the effect similar with local desktop.The core of RemoteFX is two aspects: one is adopt video card Intel Virtualization Technology at server end, and driven by system kernel and fictionalize multiple video card equipment, each long-range connection desktop uses a virtual video card; Two is by virtual video card, will pass to the display of client decompress(ion) after display data compression.This makes it possible to support long-range 3D game display.RemoteFX is higher for the requirement of system hardware and software, first must be windows server 2008 SP1 and more than, server processor must support SLAT-enabled processor characteristic, and realizes at the inner nuclear layer of system.
Three, summary of the invention:
There is above-mentioned technical problem for solving in prior art, the invention provides a kind of method and system of being played with operation 3D by network display.This system by installing, the server of running game, the client of display and user operation game is connected with network and is formed.User can pass through client (being not limited to PC), obtain the real time data of the image of the 3D game that remote server runs, after the display of this locality, the input operation receiving user is transferred to remote server, after this 3D game response, generate new view data and show, this process is gone round and begun again, thus carries out long-range game control.
According to a first aspect of the invention, a kind of method of being played with operation 3D by network display, the method comprises the following steps:
Step one: the 3D based on DirectX of server end application layer display unit Real-time Obtaining server end plays and shows the view data of image;
Step 2: the view data of the 3D of acquisition game display image carries out compressing and compressed view data is sent to client by server;
Step 3: client receives above-mentioned compressed view data display of decoding, returns to the server end virtual input device of server end by the operational order of input equipment reception user;
Step 4: the operational order of server end virtual input device real-time reception client passback, is converted into the obtainable operation information of DirectX games.
Comprise the steps: based on the generation of the view data of the 3D game display image of DirectX and display in wherein said step one
Step 1.1) initialization of DirectX running environment;
Step 1.2) 3D games create the server end application layer display unit of a DirectX;
Step 1.3) for above-mentioned display unit carry out 3D game display image render process, go round and begin again, until exit game.
Wherein above-mentioned steps 1.3) comprising:
Step 1.3.1) empty the Current Content of this display unit;
Step 1.3.2) notify that this display unit starts to play up;
Step 1.3.3) in this display unit, play up described image;
Step 1.3.4) notify that this display unit render process terminates;
Step 1.3.5) show this image.
Wherein said step 1.3.5) be the default behavior being injected amendment DirectX call function by server-side user layer identification code, it is made to obtain the current image date of this display unit, and copied in internal memory, to complete the acquisition of 3D game display image.
The view data obtained in wherein said step one is continuous print view data, uses the view data of video compression algorithm to described acquisition to compress.
Described input equipment wherein in step 3 comprises: mouse.
Described input equipment wherein in step 3 comprises: keyboard.
Wherein step 4 injects by server-side user layer identification code the input realizing 3D game real-time reception input equipment with the DirectInput interface function revising DirectX, thus operation 3D game; Wherein said DirectInput interface function is the interface function that DirectX game inputs for collecting operation, and it is by the data of DirectInputDevice object accesses input equipment, and described DirectInputDevice object represents input equipment.
Wherein said DirectInputDevice object is keyboard, then the workflow of DirectInputDevice (keyboard) is as follows:
Step 4.1) create a keyboard equipment;
Step 4.2) set it to array return key plate-like state value by 256 bytes;
Step 4.3) setting collaboration mode;
Step 4.4) access rights of activation to this keyboard equipment;
Step 4.5) obtain the operation information of this keyboard equipment,
Wherein, step 4.5) be the process that a circulation obtains, make the input of 3D game real-time reception keyboard equipment, thus complete control.
By one of any obtaining step 4.5 of following two kinds of modes) in the operation information of keyboard equipment:
Direct mode: the state namely obtaining current time keyboard equipment, keyboard equipment is regarded as the equipment with 256 different keys, the state of each button comprises down state or non-down state, and the state of each button is usually represented by a unit of 256 byte arrays of correspondence, 0 represents non-down state, 0x80 represents down state, the behavior of interface function corresponding to amendment keyboard equipment is injected by server-side user layer identification code, make it not be the input obtaining the local physical keyboard of server end, but the key-press status behavior of client is returned;
Buffering method: the consecutive variations situation returning the keyboard equipment after the last input obtaining keyboard equipment, the behavior of interface function corresponding to amendment keyboard equipment is injected by server-side user layer identification code, make it not be the input obtaining the local physical keyboard of server end, but the key-press status behavior of client is returned.
Wherein said client layer code injection inserts code between the function that the interface function that 3D games are used calls and reality realizes, to intercept and capture the call parameters information of program.
Wherein said client layer code injection is a kind of transparent code insertion, and it carries out function parcel after application program being loaded into internal memory again, in internal memory, directly rewrites the code of correlation function, and do not change the size of execute file.
According to a further aspect in the invention, a kind of system of being played with operation 3D by network display, this system comprises:
Server end application layer display unit, the 3D based on DirectX of Real-time Obtaining server end plays and shows the view data of image;
Server end video compression device, the view data of display image of being played by the 3D of acquisition carries out compressing and compressed view data is sent to client;
Client video playback and user operation return device, receive above-mentioned compressed view data and display of decoding, and receives the operational order of user and return to server end virtual input device by input equipment;
Server end virtual input device, the operational order of real-time reception client passback, is converted into the obtainable operation information of DirectX games.
Wherein said server end application layer display unit uses the view data comprising and to generate and show the 3D game display image based on DirectX as lower device:
Device, for the initialization of DirectX running environment;
Device, creates the server end application layer display unit of a DirectX for 3D games;
Device, for carrying out the render process of 3D game display image for above-mentioned display unit, goes round and begins again, until exit game.
The wherein above-mentioned render process for carrying out 3D game display image for above-mentioned display unit, go round and begin again, until the device exiting game comprises:
Device, for emptying the Current Content of display unit;
Device, for notifying that this display unit starts to play up;
Device, for playing up described image in this display unit;
Device, for notifying that this display unit render process terminates;
Above-mentioned display unit, for showing this image.
Wherein injected the default behavior of amendment DirectX call function by server-side user layer identification code for showing the display unit of this image, it is made to obtain the current image date of this display unit, and copied in internal memory, to complete the acquisition of 3D game display image.
The view data that wherein said server end application layer display unit obtains is continuous print view data, uses the view data of video compression algorithm to described acquisition to compress.
Wherein said input equipment comprises: mouse.
Wherein said input equipment comprises: keyboard.
Wherein server end virtual input device injects by server-side user layer identification code the input realizing 3D game real-time reception input equipment with the DirectInput interface function revising DirectX, thus operation 3D game; Wherein said DirectInput interface function is the interface function that DirectX game inputs for collecting operation, and it is by the data of DirectInputDevice object accesses input equipment, and described DirectInputDevice object represents input equipment.
Wherein said DirectInputDevice object is keyboard, then DirectInputDevice (keyboard) comprises as follows:
Device, for creating a keyboard equipment;
Device, for being set as the array return key plate-like state value by 256 bytes by described keyboard equipment;
Device, for setting collaboration mode;
Device, for activating the access rights to this keyboard equipment;
Device, for obtaining the operation information of this keyboard equipment,
Wherein, obtain operation information for the device circulation obtaining the operation information of this keyboard equipment, make the input of 3D game real-time reception keyboard equipment, thus complete control.
By one of any operation information obtaining keyboard equipment of following two kinds of modes:
Direct mode: the state namely obtaining current time keyboard equipment, keyboard equipment is regarded as the equipment with 256 different keys, the state of each button comprises down state or non-down state, and the state of each button is usually represented by a unit of 256 byte arrays of correspondence, general 0 represents non-down state, 0x80 represents down state, the behavior of interface function corresponding to keyboard equipment is revised by client layer code injection, make it not be the input obtaining the local physical keyboard of server end, but the key-press status behavior of client is returned;
Buffering method: the consecutive variations situation returning the keyboard equipment after the last input obtaining keyboard equipment, the behavior of interface function corresponding to amendment keyboard equipment is injected by server-side user layer identification code, make it not be the input obtaining the local physical keyboard of server end, but the key-press status behavior of client is returned.
Wherein said client layer code injection inserts code between the function that the interface function that 3D games are used calls and reality realizes, to intercept and capture the call parameters information of program.
Wherein said client layer code injection is a kind of transparent code insertion technology, and it carries out function parcel after application program being loaded into internal memory again, in internal memory, directly rewrites the code of correlation function, and do not change the size of execute file.
According to a third aspect of the present invention, provide a kind of server, for being played by network display and operation 3D, this server is by network and client's side link, and described server comprises:
Server end application layer display unit, the 3D based on DirectX of Real-time Obtaining server end plays and shows the view data of image;
Server end video compression device, the view data of display image of being played by the 3D of acquisition carries out compressing and compressed view data is sent to client;
Server end virtual input device, the operational order of real-time reception client passback, is converted into the obtainable operation information of DirectX games,
The operational order of wherein said client passback is that client receives above-mentioned compressed view data and display of decoding, and receives the operational order of user by input equipment and return to this server end virtual input device.
Wherein injected the default behavior of amendment DirectX call function by server-side user layer identification code, make it obtain the view data of 3D game display image, and copied in internal memory, to complete the acquisition of 3D game display image
Wherein this server comprises DirectX display device interfaces and DirectInput equipment interface further.
Wherein server end virtual input device injects by server-side user layer identification code the input realizing 3D game real-time reception input equipment with the DirectInput interface function revising DirectX, thus operation 3D game; Wherein said DirectInput interface function is the interface function that DirectX game inputs for collecting operation, and it is by the data of DirectInputDevice object accesses input equipment, and described DirectInputDevice object represents input equipment.
Wherein said client layer code injection inserts code between the function that the interface function that 3D games are used calls and reality realizes, to intercept and capture the call parameters information of program.
Wherein said client layer code injection is a kind of transparent code insertion technology, and it carries out function parcel after application program being loaded into internal memory again, in internal memory, directly rewrites the code of correlation function, and do not change the size of execute file.
According to a forth aspect of the invention, provide a kind of client, for play by network display and operation 3D, this client is run the server that 3D plays by network be connected with as claimed in claim 25, and described client comprises:
Client video playback and user operation return device, reception server sends the compressed 3D game image data of client to, and decoding display, receive the operational order of user by input equipment and return to server.
The beneficial effect that technical solution of the present invention is brought:
The first, can not support that the client device that large-scale 3D plays (except portable set, also can comprise the more weak PC of video card ability and notebook computer) supports that this type of is played;
The second, originally can not support that on the client device of existing network game, (especially portable set) supports that network game manipulates, and extended audient's scope greatly;
3rd, issue and the operation platform of unified all kinds of PC game are provided, user can with on time/in due order/monthly payment charging etc. flexibly form in various kinds of equipment, manipulate various types of games.
Further; the main software that the game mode proposed meets " software and service mode (Software as Service) " this future is issued and using forestland; and be beneficial to protection Games Software copyright---adopt server centered operational mode; client does not need to install game; can help to prevent copy right piracy, be conducive to the enforcement of the intellectual property protection policy of China.
Four, accompanying drawing illustrates:
Fig. 1 shows the block schematic diagram of system according to the invention;
Fig. 2 shows the method flow diagram according to the inventive method;
Fig. 3 shows and plays up flow chart according to the 3D rendering of the inventive method;
Fig. 4 shows the flow chart of the client passback keyboard equipment operation information according to the inventive method.
Fig. 5 shows the overall operation flow chart of playing with manipulation 3D according to the long-range display of the inventive method.
Five, embodiment:
As shown in Figure 1, the core of present system comprises following four parts: server end application layer display unit and virtual input device, server end video compression device, client video playback and user operation return device.Equally, as shown in Figure 2, four steps, i.e. steps one are also comprised according to the core of the inventive method: the 3D based on DirectX of server end application layer display unit Real-time Obtaining server end plays and shows the view data of image; Step 2: the view data of the 3D of acquisition game display image carries out compressing and compressed view data is sent to client by server; Step 3: client receives above-mentioned compressed view data display of decoding, returns to the server end virtual input device of server end by the operational order of input equipment reception user; Step 4: the operational order of server end virtual input device real-time reception client passback, is converted into the obtainable operation information of DirectX games.Next, specific implementation of the present invention is specifically described with reference to figure 1-4:
1) 3D based on DirectX of server end application layer display unit Real-time Obtaining server end plays and shows the view data of image.
The game display frame (under the prerequisite not revising game identification code) of the acquisition server end that server end application layer display unit is real-time.We adopt the virtualized method of application layer to implement.
General, 3D development of games depends on the Multimedia Programming interface that system provides, and the main flow development interface under current windows platform is exactly DirectX and the OPENGL of Microsoft.But DirectX occupies absolute predominance at present---most Windows3D game of exploitation later in 2002 are all DirectX.Therefore this embodiment is mainly for DirectX, but also may be used for OPENGL.
The game image of DirectX generates with procedure for displaying as follows:
Step 1) initialization of DirectX running environment;
Step 2) games create the server end application layer display unit of a DirectX, and for DirectX 9 (lower with), relevant establishment equipment calls is---
HRESULT IDirect3D9::CreateDevice(UINT adapter,D3DDEVTYPE deviceType,HWND focusWindow,DWORDbehaviourFlags,D3DPRESENT_PARAMETERS*presentationParameters,IDirect3DDevice9**device);
Step 3) render process of 3D rendering is started for this equipment, go round and begin again, until game is exited.
Step 3.1) empty the Current Content of display device;
Step 3.2) notify that this equipment starts to play up;
Step 3.3) rendering image on the device;
Step 3.4) notify that this equipment render process terminates;
Step 3.5) show this image;
Key step related to the present invention is Step 3.5, and this is called by Direct X:
HRESULT IDirect3DDevice9::SCPresent (IDirect3DSwapChain9*pSwapChain, const RECT*src, const RECT*dest, HWND hWnd, LPVOID unused, DWORD dwFlags) realizes.
The present invention is by client layer code injection method (concrete code injection method " 5) client layer code injection " joint sets forth), have modified the default behavior of this function, make it can obtain the current image date of this display device, and copied in internal memory, concrete implementation method is as follows:
● obtain this display device, the DirectX of use calls and is
IDirect3DSwapChain9::GetDevice(IDirect3DDevice9**ppDevice);
● obtain the attribute of this equipment epigraph, comprise size etc.The DirectX used calls and is
IDirect3DDevice9::GetBackBuffer(UINT iSwapChain,UINT BackBuffer,D3DBACKBUFFER_TYPEType,IDirect3DSurface9**ppBackBuffer);
With IDirect3DSurface9::GetDesc (D3DSURFACE_DESC*pDesc);
● the Surface that then establishment one is new, copies to the view data of this equipment on this surface, and pins this Surface, and copy in internal memory by view data;
IDirect3DDevice9::CreateOffscreenPlainSurface (UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9**ppSurface, HANDLE*pSharedHandle); The Surface that // establishment one is new
IDirect3DDevice9::GetRenderTargetData (IDirect3DSurface9*pRenderTarget, IDirect3DSurface9*pDestSurface); // view data of this equipment is copied on this surface
IDirect3DSurface9::LockRect (D3DLOCKED_RECT*pLockedRect, const RECT*pRect, DWORD Flags); // pin this Surface
One of return value of LockRect, pLockedRect, is the pointer of picture material in a sensing display device, can be copied to internal memory, thus complete the acquisition process of this game display frame.
2) view data of the 3D of acquisition game display image carries out compressing and compressed view data is sent to client by server
By 1) view data that obtains is BMP form, the video data after compression, by compressing it, is sent to client, completes display by the present invention.Because the intercepting and capturing of view data are carried out continuously 1), therefore in fact just obtain continuous print view data.
Concrete video compression algorithm can adopt MPEG4 or H264 (but being not limited to), and this is mature technology on the one hand.
3) client receives above-mentioned compressed view data and display of decoding
After client software receives video data, decoding shows, and its operation principle is identical with general video jukebox software.Difference is, client software also must accept the operation of user for game video, is passed to the virtual unit layer of server end.This generic operation is divided into two classifications:
● keyboard: the button operation mainly receiving user, is sent to server end.Just need to be passed to server end as long as namely client intercepts the state variation of certain local button (such as from normal condition to being pressed, or discharging from pressing to);
● pointing device, as mouse: the move operation and the button operation that receive user, send server end to.Mobile message comprises the displacement of pointer at level and vertical direction.
4) operational order of server end virtual input device real-time reception client passback, is converted into the obtainable operation information of DirectX games
After receiving the operation back information of client, server end needs to be converted into the obtainable operation information of DirectX games.Here mainly through client layer code injection method, behavior-DirectX the game that have modified DirectInput interface in DirectX is DirectInput interface for receiving the interface of operation input, and it is by the data of each input equipment of DirectInputDevice object accesses.A DirectInputDevice object represents an input equipment, as mouse, keyboard or joystick.For keyboard, the present invention have modified the certain methods of DirectInputDevice object, reaches the object that manipulation information client sent passes to game.
The workflow of DirectInputDevice (keyboard) is as follows:
Step 1) create a keyboard equipment;
Step 2) set it to array return key plate-like state value by 256 bytes;
Step 3) setting collaboration mode;
Step 4) access rights of activation to equipment;
Step 5) obtain the operation information of equipment;
Step 5) be the process that a circulation obtains, the receiving equipment that game can be real-time is inputted, thus completes control.Key step related to the present invention is also this step.
Equipment input can be carried out by two kinds of modes---
● direct mode: the state namely obtaining current time keyboard.Keyboard is regarded as the equipment with 256 different keys here, the state of each button (" pressing " or " non-press ") is usually represented by each unit of 256 byte arrays of correspondence, general 0 represents " non-press ", and 0x80 represents " pressing ".Corresponding interface function is IDirectInputDevice8::GetDeviceState (DWORD cbData, LPVOID lpvData).The present invention have modified the behavior of this function by code injection, makes it not be the input obtaining the local physical keyboard of server end, but the key-press status behavior of client is returned.
● buffering method: after returning last acquisition input through keyboard, the continuous print situation of change of keyboard.As, obtain between the calling of input through keyboard at twice, user presses space bar, space bar of upspringing, press " x " key, " x " key of upspringing again.So by " direct mode ", what return is the state of keyboard after " x " key of upspringing, and is also " x " and the pressing/upspring this process and cannot return of space bar; And in such a mode, then can return sequence of operations state, what comprise above-mentioned " x " and space bar presses/upsprings process.
The present invention have modified the behavior of this function by code injection, makes it not be the input obtaining the local physical keyboard of server end, but the key-press status behavior of client is returned.
5) client layer code injection
The essence of client layer code injection be exactly use at games insert code, to intercept and capture the information such as the call parameters of program between interface interchange and the actual function realized.
Present invention employs transparent code insertion technology, it carries out function parcel after application program being loaded into internal memory again, in internal memory, directly rewrite the code of correlation function, can not change the size of execute file like this, and effect is the same.This technology can user without the need to revising source code, connects without the need to recompilating, and realize required function under the prerequisite of not replacing any dynamic link libraries.
Concrete method is as follows---bottom panel show the composition of execute file under Windows, comprise file header, PE head, text segment comprises program code, data segment comprises the input chained list of initialization data, used dynamic link libraries and system call, exports (Exported) function table and debug symbol.
For amendment Windows run time version, the present invention creates a new section between debug symbol and output function table---and the copy containing original PE head and a new function input table, have modified original PE head simultaneously and make it the new input table of sensing.It is finally the code inserted.
Insert new input table and have two objects: first it preserves original input table to be changeed back by the execute file revised when needed.Secondly, new input table can comprise new dynamic link libraries in order to complete required additional functionality.Like this when target program calls the relevant interface of DirectX, what in fact inquire about is the new function input table inserted, thus have invoked insertion code, thus changes the default behavior of relevant interface.
Concrete wrapped function is:
●IDirect3DDevice9::SCPresent。Obtain the current image date of this display device, and copied in internal memory;
●IDirectInputDevice8::GetDeviceState,IDirectInputDevice8::GetDeviceData。The key-press status behavior of client is returned.
Specific embodiment and performance test
Inventor has installed Direct X 3D and has played on a Windows XP PC server, comprises Need For Speed, crysis etc., uses Direct X 9.0C interface at present.
Client then uses a windows XP notebook, interconnects between the two with 100 m ethernet.
Run a server of the present invention at server, it mainly performs following function, can accept the connection of client simultaneously, starts local game of installing, simultaneously injecting codes according to request; The function of injecting codes, as the above, namely completes the Real-time Obtaining of 3D game display frame, compression transmission, and the back delivery operations of client is passed to game by virtual input device.Overall operational process as shown in Figure 5.
As compared to above-mentioned RDP, RemoteFX, feature of the present invention is:
1. support long-range display and the control of 3D game;
2. realize in the application layer of server end;
3. the requirement of pair server end software and hardware is lower;
4. the server side operation system access supported is wider, comprises the operating systems such as Windows XP/VISTA/2007/Server.
Contrast as shown in the table:
The beneficial effect that technical solution of the present invention is brought:
The first, can not support that the client device that large-scale 3D plays (except portable set, also can comprise the more weak PC of video card ability and notebook computer) supports that this type of is played;
The second, originally can not support that on the client device of existing network game, (especially portable set) supports that network game manipulates, and extended audient's scope greatly;
3rd, issue and the operation platform of unified all kinds of PC game are provided, user can with on time/in due order/monthly payment charging etc. flexibly form in various kinds of equipment, manipulate various types of games.
Further; the main software that the game mode proposed meets " software and service mode (Software as Service) " this future is issued and using forestland; and be beneficial to protection Games Software copyright---adopt server centered operational mode; client does not need to install game; can help to prevent copy right piracy, be conducive to the enforcement of the intellectual property protection policy of China.
Those skilled in the art should understand, above description of the invention and diagram only for illustration of some embodiments of the present invention, instead of are used for limiting the scope of the invention.More than description and illustrated various modification should comprise within the scope of the invention.

Claims (28)

1., by the method that network display is played with operation 3D, the method comprises the following steps:
Step one: the 3D based on DirectX of server end application layer display unit Real-time Obtaining server end plays and shows the view data of image;
Step 2: the view data of the 3D of acquisition game display image carries out compressing and compressed view data is sent to client by server;
Step 3: client receives above-mentioned compressed view data display of decoding, returns to the server end virtual input device of server end by the operational order of input equipment reception user;
Step 4: the operational order of server end virtual input device real-time reception client passback, be converted into the obtainable operation information of DirectX games, wherein step 4 injects by server-side user layer identification code the input realizing 3D game real-time reception input equipment with the DirectInput interface function revising DirectX, thus operation 3D game; Wherein said DirectInput interface function is the interface function that DirectX game inputs for collecting operation, and it is by the data of DirectInputDevice object accesses input equipment, and described DirectInputDevice object represents input equipment.
2. the method for claim 1, comprises the steps: based on the generation of the view data of the 3D game display image of DirectX and display in wherein said step one
Step 1.1) initialization of DirectX running environment;
Step 1.2) 3D games create the server end application layer display unit of a DirectX;
Step 1.3) for above-mentioned display unit carry out 3D game display image render process, go round and begin again, until exit game.
3. method, wherein above-mentioned steps 1.3 as claimed in claim 2) comprising:
Step 1.3.1) empty the Current Content of above-mentioned display unit;
Step 1.3.2) notify that this display unit starts to play up;
Step 1.3.3) in this display unit, play up described image;
Step 1.3.4) notify that this display unit render process terminates;
Step 1.3.5) show this image.
4. method as claimed in claim 3, wherein said step 1.3.5) be the default behavior being injected amendment DirectX call function by server-side user layer identification code, it is made to obtain the current image date of this display unit, and copied in internal memory, to complete the acquisition of 3D game display image.
5. the method for claim 1, the view data obtained in wherein said step one is continuous print view data, uses the view data of video compression algorithm to described acquisition to compress.
6. the method for claim 1, the described input equipment wherein in step 3 comprises: mouse.
7. the method for claim 1, the described input equipment wherein in step 3 comprises: keyboard.
8. the method for claim 1, wherein said DirectInputDevice object is keyboard, then the workflow of DirectInputDevice (keyboard) is as follows:
Step 4.1) create a keyboard equipment;
Step 4.2) set it to array return key plate-like state value by 256 bytes;
Step 4.3) setting collaboration mode;
Step 4.4) access rights of activation to this keyboard equipment;
Step 4.5) obtain the operation information of this keyboard equipment,
Wherein, step 4.5) be the process that a circulation obtains, make the input of 3D game real-time reception keyboard equipment, thus complete control.
9. method as claimed in claim 8, by one of any obtaining step 4.5 of following two kinds of modes) in the operation information of keyboard equipment:
Direct mode: the state namely obtaining current time keyboard equipment, keyboard equipment is regarded as the equipment with 256 different keys, the state of each button comprises down state or non-down state, and the state of each button is usually represented by a unit of 256 byte arrays of correspondence, 0 represents non-down state, 0x80 represents down state, the behavior of interface function corresponding to amendment keyboard equipment is injected by server-side user layer identification code, make it not be the input obtaining the local physical keyboard of server end, but the key-press status behavior of client is returned;
Buffering method: the consecutive variations situation returning the keyboard equipment after the last input obtaining keyboard equipment, the behavior of interface function corresponding to amendment keyboard equipment is injected by server-side user layer identification code, make it not be the input obtaining the local physical keyboard of service end, but the key-press status behavior of client is returned.
10. as claim 1,3 or 9 arbitrary as described in method, wherein said client layer code injection inserts code between the function that the interface function that 3D games are used calls and reality realizes, to intercept and capture the call parameters information of program.
11. as claim 1,3 or 9 arbitrary as described in method, wherein said client layer code injection is a kind of transparent code insertion, it carries out function parcel after application program being loaded into internal memory again, in internal memory, directly rewrites the code of correlation function, and do not change the size of execute file.
12. 1 kinds of systems of being played with operation 3D by network display, this system comprises:
Server end application layer display unit, the 3D based on DirectX of Real-time Obtaining server end plays and shows the view data of image;
Server end video compression device, the view data of display image of being played by the 3D of acquisition carries out compressing and compressed view data is sent to client;
Client video playback and user operation return device, receive above-mentioned compressed view data and display of decoding, and receives the operational order of user and return to server end virtual input device by input equipment;
Server end virtual input device, the operational order of real-time reception client passback, be converted into the obtainable operation information of DirectX games, wherein server end virtual input device injects by server-side user layer identification code the input realizing 3D game real-time reception input equipment with the DirectInput interface function revising DirectX, thus operation 3D game; Wherein said DirectInput interface function is the interface function that DirectX game inputs for collecting operation, and it is by the data of DirectInputDevice object accesses input equipment, and described DirectInputDevice object represents input equipment.
13. systems as claimed in claim 12, wherein said server end application layer display unit uses the view data comprising and to generate and show the 3D game display image based on DirectX as lower device:
Device, for the initialization of DirectX running environment;
Device, creates the server end application layer display unit of a DirectX for 3D games;
Device, for carrying out the render process of 3D game display image for above-mentioned display unit, goes round and begins again, until exit game.
14. systems as claimed in claim 13, the wherein above-mentioned render process for carrying out 3D game display image for above-mentioned display unit, go round and begin again, until the device exiting game comprises:
Device, for emptying the Current Content of above-mentioned display unit;
Device, for notifying that this display unit starts to play up;
Device, for playing up described image in this display unit;
Device, for notifying that this display unit render process terminates;
Above-mentioned display unit, for showing this image.
15. systems as claimed in claim 14, wherein injected the default behavior of amendment DirectX call function by server-side user layer identification code for showing the display unit of this image, it is made to obtain the current image date of this display unit, and copied in internal memory, to complete the acquisition of 3D game display image.
16. systems as claimed in claim 12, the view data that wherein said server end application layer display unit obtains is continuous print view data, uses the view data of video compression algorithm to described acquisition to compress.
17. systems as claimed in claim 12, wherein said input equipment comprises: mouse.
18. systems as claimed in claim 12, wherein said input equipment comprises: keyboard.
19. systems as claimed in claim 12, wherein said DirectInputDevice object is keyboard, then DirectInputDevice (keyboard) comprises as follows:
Device, for creating a keyboard equipment;
Device, for being set as the array return key plate-like state value by 256 bytes by described keyboard equipment;
Device, for setting collaboration mode;
Device, for activating the access rights to this keyboard equipment;
Device, for obtaining the operation information of this keyboard equipment,
Wherein, obtain operation information for the device circulation obtaining the operation information of this keyboard equipment, make the input of 3D game real-time reception keyboard equipment, thus complete control.
20. systems as claimed in claim 19, by one of any operation information obtaining keyboard equipment of following two kinds of modes:
Direct mode: the state namely obtaining current time keyboard equipment, keyboard equipment is regarded as the equipment with 256 different keys, the state of each button comprises down state or non-down state, and the state of each button is usually represented by a unit of 256 byte arrays of correspondence, general 0 represents non-down state, 0x80 represents down state, the behavior of interface function corresponding to keyboard equipment is revised by client layer code injection, make it not be the input obtaining the local physical keyboard of server end, but the key-press status behavior of client is returned;
Buffering method: the consecutive variations situation returning the keyboard equipment after the last input obtaining keyboard equipment, the behavior of interface function corresponding to amendment keyboard equipment is injected by server-side user layer identification code, make it not be the input obtaining the local physical keyboard of service end, but the key-press status behavior of client is returned.
21. as claim 12,14 or 20 arbitrary as described in system, wherein said client layer code injection inserts code between the function that the interface function that 3D games are used calls and reality realizes, to intercept and capture the call parameters information of program.
22. as claim 12,14 or 20 arbitrary as described in system, wherein said client layer code injection is a kind of transparent code insertion technology, it carries out function parcel after application program being loaded into internal memory again, in internal memory, directly rewrites the code of correlation function, and do not change the size of execute file.
23. 1 kinds of servers, for being played by network display and operation 3D, this server is by network and client's side link, and described server comprises:
Server end application layer display unit, the 3D based on DirectX of Real-time Obtaining server end plays and shows the view data of image;
Server end video compression device, the view data of display image of being played by the 3D of acquisition carries out compressing and compressed view data is sent to client;
Server end virtual input device, the operational order of real-time reception client passback, is converted into the obtainable operation information of DirectX games,
The operational order of wherein said client passback is that client receives above-mentioned compressed view data and display of decoding, and receive the operational order of user by input equipment and return to this server end virtual input device, wherein server end virtual input device injects by server-side user layer identification code the input realizing 3D game real-time reception input equipment with the DirectInput interface function revising DirectX, thus operation 3D game; Wherein said DirectInput interface function is the interface function that DirectX game inputs for collecting operation, and it is by the data of DirectInputDevice object accesses input equipment, and described DirectInputDevice object represents input equipment.
24. servers as claimed in claim 23, the default behavior of amendment DirectX call function is wherein injected by server-side user layer identification code, make it obtain the view data of 3D game display image, and copied in internal memory, to complete the acquisition of 3D game display image.
25. servers as claimed in claim 23, wherein this server comprises DirectX display device interfaces and DirectInput equipment interface further.
26. servers as described in claim 23 or 24, wherein said client layer code injection inserts code between the function that the interface function that 3D games are used calls and reality realizes, to intercept and capture the call parameters information of program.
27. servers as described in claim 23 or 24, wherein said client layer code injection is a kind of transparent code insertion technology, it carries out function parcel after application program being loaded into internal memory again, in internal memory, directly rewrites the code of correlation function, and do not change the size of execute file.
28. 1 kinds of clients, for being played by network display and operation 3D, this client is connected with server as claimed in claim 23 by network, and described client comprises:
Client video playback and user operation return device, reception server sends the compressed 3D game image data of client to, and decoding display, receive the operational order of user by input equipment and return to server,
The operational order of wherein said client passback is that client receives above-mentioned compressed view data and display of decoding, and receive the operational order of user by input equipment and return to server end virtual input device, wherein server end virtual input device injects by server-side user layer identification code the input realizing 3D game real-time reception input equipment with the DirectInput interface function revising DirectX, thus operation 3D game; Wherein said DirectInput interface function is the interface function that DirectX game inputs for collecting operation, and it is by the data of DirectInputDevice object accesses input equipment, and described DirectInputDevice object represents input equipment.
CN201110235071.6A 2011-08-17 2011-08-17 Method, system, server and client side for displaying and operating 3D (Three-Dimensional) game Expired - Fee Related CN102355489B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110235071.6A CN102355489B (en) 2011-08-17 2011-08-17 Method, system, server and client side for displaying and operating 3D (Three-Dimensional) game

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110235071.6A CN102355489B (en) 2011-08-17 2011-08-17 Method, system, server and client side for displaying and operating 3D (Three-Dimensional) game

Publications (2)

Publication Number Publication Date
CN102355489A CN102355489A (en) 2012-02-15
CN102355489B true CN102355489B (en) 2015-03-04

Family

ID=45578983

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110235071.6A Expired - Fee Related CN102355489B (en) 2011-08-17 2011-08-17 Method, system, server and client side for displaying and operating 3D (Three-Dimensional) game

Country Status (1)

Country Link
CN (1) CN102355489B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109218402A (en) * 2018-08-02 2019-01-15 胡雄风 Hold cloud integrative solution

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103513862B (en) * 2012-06-29 2016-08-17 联想(北京)有限公司 Information processing method, local device and remote equipment
CN103577661B (en) * 2012-07-19 2018-09-04 南京中兴软件有限责任公司 The acquisition methods and device of information
US8860720B1 (en) * 2014-01-02 2014-10-14 Ubitus Inc. System and method for delivering graphics over network
CN106375343A (en) * 2016-10-31 2017-02-01 上海斐讯数据通信技术有限公司 Client, server, interactive communication system and communication ways
CN107174825A (en) * 2017-04-28 2017-09-19 苏州蜗牛数字科技股份有限公司 A kind of remote image method for reconstructing and system based on model
CN109104626B (en) * 2017-06-20 2021-11-09 武汉斗鱼网络科技有限公司 Method and equipment for filtering images in live webcast
CN107609065B (en) * 2017-08-30 2019-12-03 武汉斗鱼网络科技有限公司 A kind of game classification method, apparatus and electronic equipment
CN110314374B (en) * 2018-03-30 2024-02-02 广州天梯网络科技有限公司 Game processing method, game processing device, electronic equipment and medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1743043A (en) * 2005-06-19 2006-03-08 珠海市西山居软件有限公司 Network game system and method for realizing same
CN102054121A (en) * 2009-11-04 2011-05-11 沈阳隆惠科技有限公司 Method for building 3D (three-dimensional) panoramic live-action online game platform

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070087829A1 (en) * 2005-10-14 2007-04-19 Derek Liu Multi-player game architecture

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1743043A (en) * 2005-06-19 2006-03-08 珠海市西山居软件有限公司 Network game system and method for realizing same
CN102054121A (en) * 2009-11-04 2011-05-11 沈阳隆惠科技有限公司 Method for building 3D (three-dimensional) panoramic live-action online game platform

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109218402A (en) * 2018-08-02 2019-01-15 胡雄风 Hold cloud integrative solution

Also Published As

Publication number Publication date
CN102355489A (en) 2012-02-15

Similar Documents

Publication Publication Date Title
CN102355489B (en) Method, system, server and client side for displaying and operating 3D (Three-Dimensional) game
US7830388B1 (en) Methods and apparatus of sharing graphics data of multiple instances of interactive application
Humphreys et al. Distributed rendering for scalable displays
Mwalongo et al. State‐of‐the‐Art Report in Web‐based Visualization
US20100289804A1 (en) System, mechanism, and apparatus for a customizable and extensible distributed rendering api
TWI506586B (en) Server based graphics processing techniques
CN103888485A (en) Method for distributing cloud computing resource, device thereof and system thereof
JP2009543195A (en) Fast reconstruction of graphics pipeline state
CN102254292A (en) Remote 3D instruction rendering system and method
CN102411786A (en) Low complexity method for motion compensation of dwt based systems
CN102378976B (en) The compression of images of multiple processor is used to accelerate
CN112316433B (en) Game picture rendering method, device, server and storage medium
WO2024037110A1 (en) Data processing method and apparatus, device, and medium
Eilemann et al. Equalizer 2.0–convergence of a parallel rendering framework
Shi et al. SHARC: A scalable 3D graphics virtual appliance delivery framework in cloud
Raji et al. Scientific visualization as a microservice
Park et al. Mobile collaborative medical display system
Shi et al. Scalable support for 3D graphics applications in cloud
Carroll et al. 3D rendering in the cloud
CN116310232A (en) Data processing method, device, storage medium and program product for digital collection
Rehfeld et al. An actor-based distribution model for realtime interactive systems
Glander et al. Reweb3d: Enabling desktop 3d applications to run in the web
Jung et al. Interactive textures as spatial user interfaces in X3D
Von Spiczak et al. Multimodal event streams for virtual reality
Ahmadi et al. An open source cloud gaming testbed using directshow

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150304

Termination date: 20210817