6
Application of an XML Processing Scheme to an Indoor Golf Simulator KeeHyun Park 1 , Joonsuu Park 1 , Heo Du Yeong 1 and Seunghyeon Lim 1 1 Department of Computer Engineering, Keimyung University, Daegu, Korea. {khp, parkjoonsuu, ccamuccamu, burningwing}@kmu.ac.kr Abstract. The indoor golf simulator allows users to enjoy their golf games indoors. However, most of the game simulators use their own communication message formats, resulting in a lack of interoperability. In this paper, for the sake of interoperability, XML documents are used in transmitting and processing the information of players as well as game status. XML documents for transmitting the related information are defined and the flows of the XML documents are described. Keywords: XML document, Indoor golf simulator, Interoperability. 1 Introduction An indoor golf simulator is one of game simulators consists of a screen, a sensor system, a projector and a PC [1-4]. The simulator allows users to enjoy their golf games indoors. However, most of the game simulators use their own communication message formats, resulting in a lack of interoperability. In this paper, for the sake of interoperability, XML documents [5-8] are used in transmitting the information of players and game status. XML is proposed by W3C as a standard document on the Web [8]. This study proposes how to generate and process XML documents at the times of login, beginning as well as ending of a hole. The flows of the XML documents inside the game simulator are proposed also. The rest of the paper is organized as follows: Section 2 describes the related studies. Section 3 explains in detail how to generate/transmit XML documents for the game simulator. Finally, Section 4 draws conclusions and discusses some future research direction. 2 Background 2.1 Indoor Golf Simulator An indoor golf simulator is one of game simulators consists of a screen, a sensor system, a projector and a PC console. The simulator allows users to enjoy their golf games indoors. When a player logs into the golf game simulator, the golf game Advanced Science and Technology Letters Vol.29 (IRTT 2013), pp.138-143 http://dx.doi.org/10.14257/astl.2013.29.28 ISSN: 2287-1233 ASTL Copyright © 2013 SERSC

Application of an XML Processing Scheme to an Indoor Golf ...onlinepresent.org/proceedings/vol29_2013/28.pdf · Application of an XML Processing Scheme to an Indoor Golf Simulator

  • Upload
    vukien

  • View
    215

  • Download
    1

Embed Size (px)

Citation preview

Application of an XML Processing Scheme to an Indoor Golf Simulator

KeeHyun Park1, Joonsuu Park1, Heo Du Yeong1 and Seunghyeon Lim1

1 Department of Computer Engineering, Keimyung University, Daegu, Korea. {khp, parkjoonsuu, ccamuccamu, burningwing}@kmu.ac.kr

Abstract. The indoor golf simulator allows users to enjoy their golf games indoors. However, most of the game simulators use their own communication message formats, resulting in a lack of interoperability. In this paper, for the sake of interoperability, XML documents are used in transmitting and processing the information of players as well as game status. XML documents for transmitting the related information are defined and the flows of the XML documents are described.

Keywords: XML document, Indoor golf simulator, Interoperability.

1 Introduction

An indoor golf simulator is one of game simulators consists of a screen, a sensor system, a projector and a PC [1-4]. The simulator allows users to enjoy their golf games indoors. However, most of the game simulators use their own communication message formats, resulting in a lack of interoperability. In this paper, for the sake of interoperability, XML documents [5-8] are used in transmitting the information of players and game status. XML is proposed by W3C as a standard document on the Web [8]. This study proposes how to generate and process XML documents at the times of login, beginning as well as ending of a hole. The flows of the XML documents inside the game simulator are proposed also. The rest of the paper is organized as follows: Section 2 describes the related studies. Section 3 explains in detail how to generate/transmit XML documents for the game simulator. Finally, Section 4 draws conclusions and discusses some future research direction.

2 Background

2.1 Indoor Golf Simulator

An indoor golf simulator is one of game simulators consists of a screen, a sensor system, a projector and a PC console. The simulator allows users to enjoy their golf games indoors. When a player logs into the golf game simulator, the golf game

Advanced Science and Technology Letters Vol.29 (IRTT 2013), pp.138-143

http://dx.doi.org/10.14257/astl.2013.29.28

ISSN: 2287-1233 ASTL Copyright © 2013 SERSC

simulator executes to provide the player simulated golf environments on the screen. The projector displays the images of real golf courses on the screen. When a player hits a golf ball on the ground, the sensor system analyzes the strokes a player takes in order to measure such the movement of the ball he hit as ball speed, direction, angle and distance, etc. Based on the information of the ball transmitted from the sensor system, the PC console generates the images of ball movements. And then the projector displays the images of the ball movements on the screen.

2.2 Continuous Indoor Golf Game Simulator System

A continuous golf game simulator system was designed in [4]. The system consists of PC consoles, a proxy server and a player data server. In the game simulator system proposed in [4], PC consoles, a proxy server and a player data server are used to support the continuity the indoor golf game. When a player logs into the golf game simulator, a PC console sends authentication messages to the player data server via the proxy server. The proxy server is responsible for data communication and session management between PC consoles and the player data server. A simple IPC network scheme is used between a PC console and the proxy server, while an XML-based communication scheme [5-7] is used between the proxy server and the player data server. Therefore the proxy server performs message conversion tasks also. All data related to the game in which the player has been involved are stored in the player data server for later use. In order to resume the golf game, game information can be downloaded to the PC console client. However, the XML-based communication protocol was not described in detail in [4].

3 XML Processing

3.1 System Structure

The system used in this paper is the same as one proposed in the earlier study [4], except that the PC console and the proxy server communicate each other with XML messages.

3.2 Login and Authentication

Fig. 1 illustrates the flow of the login process for authentication. When a player logs into an indoor golf game simulator system, the PC console client on the PC console generates a ‘LoginUserRequest’ message in XML to request authentication to the player data server via the proxy server. On receiving the ‘LoginUserRequest’ message, the player data server performs an authentication process and send a ‘LoginUserResponse’ message to the PC console client via the proxy server. The proxy server caches the authentication information for later use.

Advanced Science and Technology Letters Vol.29 (IRTT 2013)

Copyright © 2013 SERSC 139

PC ConsoleClient

ProxyServer

Player Data Server

LogInUserRequest

LogInUserResponse

LogInUserRequest

Authenticationchecking

Authenticationcaching

LogInUserRequest

Fig. 1. The flow of XML-based messages for a login process

The upper part of Figure 2 shows an example of the ‘LoginUserRequest’ XML request messages generated by the PC console client when a player logs into the indoor golf game simulator. The lower part of Figure 2 shows an example of the ‘LoginUserResponse’ XML response messages generated by the player data server after when the server finished authentication process successfully. <OneClickGolf Length='121'> <Auth> <ClientVer>0.1</ClientVer> <AuthHash>dragon8829:1111</AuthHash> <ProtoType>LogInReq</ProtoType> </Auth> </OneClickGolf> <OneClickGolf Length='902'> <Auth> <ClientVer>0.1</ClientVer> <ProtoType>LogInRes</ProtoType> </Auth> <Body> <LoginStatus>1</LoginStatus> <bisSuspendedGame>0</bisSuspendedGame> <SuspendedTime>0 0</SuspendedTime> <PlayerInfo> <strPlayerName>hwi</strPlayerName> <nDiff>0</nDiff> <strClubName>Iron</strClubName> <fTShotDistance>0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </fTShotDistance>

<nScore>0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0</nScore> <nTShotFairWay>0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </nTShotFairWay> <nGreenShot>0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </nGreenShot> <nPuttingCount>0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </nPuttingCount> <nBunkerShot>0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </nBunkerShot> <fTShotAverage>0</fTShotAverage> <nPuttingTotalCount>0</nPuttingTotalCount> <dwHitCount>0</dwHitCount> <dwTotalHitCount>0</dwTotalHitCount> <nPlayerCount>0</nPlayerCount> <strClubNo>5</strClubNo> <nMuliganCnt_remain>3</nMuliganCnt_remain> </PlayerInfo> </Body>

Fig. 2. XML request (upper) and response (lower) message for a login process

Advanced Science and Technology Letters Vol.29 (IRTT 2013)

140 Copyright © 2013 SERSC

3.3 Game Status

The game status information consists of game scores, tee shot distance, number of shots on the fairway/bunker/green, etc. In this study, the game status information is transmitted at the time of the beginning as well as at the time of ending of a hole. Figure 3 shows the flow of XML messages for a hole_start process. When a player starts a new hole, the PC console client sends a ‘HoleStartRequest’ message to the player data server via the proxy server. The player can hit the ball after when the PC console client receives a ‘HoleStartResponse’ message from the player data server. Examples of the ‘HoleStartRequest’ message and the ‘HoleStartResponse’ message are shown in Figure 4. Figure 5 shows the flow of XML messages for a hole_end process. When a player finishes the current hole, the PC console client sends a ‘HoleEndRequest’ message to the player data server via the proxy server. The player data server sends a ‘HoleEndResponse’ message to the PC console client after when the server stores the game status information in its database. Examples of the ‘HoleEndRequest’ message and the ‘HoleEndResponse’ message are shown in Figure 6.

Data Parsing

PC ConsoleClient

ProxyServer

HoleStartRes

HoleStartReq

Player DataServer

HoleStartReq

Data Parsing

HoleStartRes

DatabaseUpdating

Fig. 3. The flow of XML-based messages for a hole_start process

<OneClickGolf Length='180'> <Auth> <ClientVer>0.1</ClientVer> <ProtoType>HoleStartReq</ProtoType> </Auth> <Body> <nPlayerSequence>1</nPlayerSequence> <nHoleListCurrentNo>1</nHoleListCurrentNo> </Body> </OneClickGolf>

<OneClickGolf Length='120'> <Auth> <ClientVer>0.1</ClientVer> <ProtoType>HoleStartRes</ProtoType> </Auth> <Body> <Status>1</Status> </Body> </OneClickGolf>

Fig. 4. XML request (left) and response (right) message for a hole_start process

Advanced Science and Technology Letters Vol.29 (IRTT 2013)

Copyright © 2013 SERSC 141

Data Parsing

PC Console Client

ProxyServer

HoleEndRes

HoleEndReq

Player DataServer

HoleEndReq

Data ParsingHoleEndRes

DatabaseUpdating

Fig. 5. The flow of XML-based messages for a hole_end process

<OneClickGolf Length='851'> <Auth> <ClientVer>0.1</ClientVer> <ProtoType>HoleEndReq</ProtoType> </Auth> <Body> <nRemHoleCount>4</nRemHoleCount> <PlayerInfo> <strPlayerName>hwi</strPlayerName> <strClubNo>0</strClubNo> <strClubName>Putter</strClubName> <nScore>-1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </nScore> <nPuttingTotalCount>0</nPuttingTotalCount> <nPuttingCount>1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </nPuttingCount> <nPlayerCount>1</nPlayerCount>

<nMuliganCnt_remain>3</nMuliganCnt_remain> <nGreenShot>1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </nGreenShot> <nDiff>0</nDiff> <fTShotDistance>260 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </fTShotDistance> <fTShotAverage>260</fTShotAverage> <dwTotalHitCount>4</dwTotalHitCount> <dwHitCount>4</dwHitCount> <nTShotFairWay>1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </nTShotFairWay> <nBunkerShot>1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </nBunkerShot> </PlayerInfo> </Body> </OneClickGolf>

<OneClickGolf Length='118'> <Auth> <ClientVer>0.1</ClientVer> <ProtoType>HoleEndRes</ProtoType> </Auth> <Body> <Status>1</Status> </Body> </OneClickGolf>

Fig. 6. XML request (upper) and response (lower) message for a hole_end process

Advanced Science and Technology Letters Vol.29 (IRTT 2013)

142 Copyright © 2013 SERSC

4 Conclusion

In this paper, an XML-based communication scheme for the indoor golf game simulator system is proposed. Since the XML document scheme is proposed by W3C as a standard document scheme on the Web, the communication scheme proposed in this paper achieves the higher interoperability. XML documents are used in transmitting and processing the information of players as well as game status. The game status information consists of game scores, tee shot distance, number of shots on the fairway/bunker/green, etc. This study proposes how to generate and process XML documents at the times of login, beginning as well as ending of a hole. The flows of the XML documents inside the game simulator system are proposed also.

Acknowledgements. This work (Grants No. 0002985) was supported by Business for Academic-industrial Cooperative establishments funded Korea Small and Medium Business Administration in 2012.

References

1. Su-Ik Lee.: The effect of motivation of virtual reality sports and service factors on leisure satisfaction. Sejong University, Master's Thesis (2011).

2. Sang-Hyuk Ahn.: Development of a simulator for Interactive 3D Golf Game. Hallym University, Master's Thesis (2007).

3. Byeon-min Moon.: The Study of Screen Golf’s fun factors on exercise immersion experience, participating satisfaction and exercise continuation behavior. Silla University, Master's Thesis (2010).

4. KeeHyun Park, Seunghyeon Lim.: Indoor Golf Simulator for Continuous Golf Games, submitted for publication.

5. Youngrok Song, Kyonam Choo and Sangmin Lee, Design of Index Schema based on Bit-Streams for XML Documents. International Journal of Software Engineering and Its Applications. Vol. 6, No. 4, pp. 131-136 (2012).

6. Sung Youn Hong, Dong Hoon Han, XML Principles and Applications, Hanbit Media Inc. (2011).

7. Harvey Deitel, XML, Prentice Hall Pub. Co. (2001). 8. W3C, http://www.x3.or.kr/, accessed on Aug. 2013.

Advanced Science and Technology Letters Vol.29 (IRTT 2013)

Copyright © 2013 SERSC 143