The disclosure of Japanese Patent Application No. 2011-040830, filed on Feb. 25, 2011, is incorporated herein by reference.
1. Field of the Invention
The present invention relates to an information processing apparatus, and more particularly, relates to control of a communication process using short-distance wireless communication.
2. Description of the Background Art
Conventionally, a system is known in which communication is automatically performed with another apparatus. For example, Japanese Patent No. 4073885 discloses a system in which game apparatuses perform communication with each other to confirm exchange conditions of data, and exchange game data designated for exchange when the exchange conditions agree with each other.
However, in Japanese Patent No. 4073885, communication is merely automatically performed with another game apparatus, and the communication is only one type.
Therefore, a main object of the present invention is to provide a novel information processing apparatus, a novel computer-readable storage medium having an information processing program stored therein, a novel information processing method, and a novel information processing system.
Further, another object of the present invention is to provide an information processing apparatus, a computer-readable storage medium having an information processing program stored therein, an information processing method, and an information processing system, which can automatically and selectively perform two types of communications, communication performed by connecting directly to another information processing apparatus and communication performed via an access point.
The present invention has the following features to attain the object mentioned above.
An information processing apparatus according to the present invention comprises search means, first communication process means, and second communication process means. The search means automatically performs a search for another information processing apparatus and a predetermined access point by using short-distance wireless communication. The first communication process means automatically performs data communication with the other information processing apparatus found by the search means. The second communication process means automatically performs data communication via the access point found by the search means.
By the above configuration, the two types of communication modes, the communication mode performed directly with the other information processing apparatus (e.g., ad hoc communication) and the communication mode via the access point (e.g., infrastructure communication), can be selectively used in accordance with the situation. In particular, in a portable information processing apparatus in which the number of communication modes performed at the same time is only one and the communication is short-distant communication such as via a wireless LAN, a plurality of communication processes can be selectively used as appropriate.
In another configuration example, the information processing apparatus may further comprises: search result determination means for determining whether or not a result of the search by the search means is the other information processing apparatus or the predetermined access point; and communication process control means for switching a communication process to be performed between a communication process performed by the first communication process means and a communication process performed by the second communication process means, in accordance with a result of the determination by the search result determination means.
According to the above configuration example, the two types of communication modes can be selectively used on the basis of a result of searching the surrounding of the information processing apparatus, and thus can be selectively used more efficiently.
In another configuration example, the search means may comprise: search switch means for automatically switching between a first search and a second search; first search means for automatically performing a search for the other information processing apparatus when the search switch means switches to the first search; and second search means for automatically performing a search for the predetermined access point when the search switch means switches to the second search.
According to the above configuration example, the two types of communications, the communication performed with the other information processing apparatus and the communication via the access point, are selectively performed, and thus various communications can be performed without making the user aware of it. In addition, communication with a target present nearby and communication with a target present at a distant place can be seamlessly performed.
In still another configuration example, the search switch means may switch between the first search and the second search each time a predetermined time elapses.
According to the above configuration example, the two types of communications can be selectively performed with a low processing load.
In still another configuration example, the predetermined time may be a first unit time after the search switch means switches to the first search, and may be a second unit time shorter than the first unit time after the search switch means switches to the second search.
According to the above configuration example, while an opportunity of performing communication with a target present near the information processing apparatus is increased, communication can be also performed with a target at a place distant from the information processing apparatus.
In still another configuration example, the search means may perform the search such that a ratio of performing a search for the predetermined access point is higher than a ratio of performing a search for the other information processing apparatus.
According to the above configuration example, an opportunity of performing communication with a target present near the information processing apparatus is increased, and thus enjoyment of carrying the information processing apparatus can be provided to the user. Meanwhile, communication can be also performed with a target at a distant place in moderation. Thus, with regard to the two types of communications, the possibility of performing each communication (the possibility that a communicable partner is present) and the frequency of occurrence of each communication can be balanced with each other.
In still another configuration example, the information processing apparatus may further comprise use state change means for changing a state of the information processing apparatus between an unused state and a used state, the second communication process means may comprise connection means for connecting to the access point when it is determined that the access point is found, and the connection means: may cut a connection to the access point after data communication via the access point ends, when the information processing apparatus is in the unused state; and may maintain the connection to the access point even after the data communication via the access point ends, when the information processing apparatus is in the used state.
According to the above configuration example, communication suitable for the used state of the information processing apparatus can be performed. For example, communication for browsing Internet sites is performed via the access point, and such communication is based on an operation of the user. Thus, in the used state, the Internet communication via the access point can be preferentially performed, and in the unused state, communication with another user can be preferentially performed without making the user notice it.
In still another configuration example, in the unused state of the information processing apparatus, the search switch means may switch to the first search when the connection to the access point is cut by the connection means.
According to the above configuration example, in the unused state, an opportunity of performing communication with a target present nearby can be increased, and, for example, a process of exchanging data and the like can be performed with the other information processing apparatus without making the user notice it.
In still another configuration example, in the used state of the information processing apparatus, the search switch means may switch to the first search when communication with the access point becomes disenabled after the information processing apparatus is connected to the access point by the connection means.
According to the above configuration example, when the information processing apparatus is in the used state, the communication via the access point is preferentially performed, and the communication is switched to the communication with the other information processing apparatus, if the access point is not found. Thus, appropriate communication can be performed in accordance with the surrounding environment.
In still another configuration example, when the state of the information processing apparatus is changed from the used state to the unused state, even if the data communication is performed by the first communication process means or the second communication process means, the connection means may stop the data communication and may start the first search and the second search in the unused state.
According to the above configuration example, when the state is changed from the used state to the unused state, the communication being performed at the time point is stopped, and the search process in the unused state is performed. Thus, in the unused state, an opportunity of performing communication without making the user notice it can be increased.
In still another configuration example, the first search means may repeatedly transmit a first search signal for searching for the other information processing apparatus and may attempt to receive the first search signal repeatedly transmitted from the other information processing apparatus, and the second search means may attempt to receive a second search signal repeatedly transmitted from the access point.
According to the above configuration example, when the other information processing apparatus is searched for, the information processing apparatus attempts to transmit and receive a search signal to and from the other information processing apparatus, and when the access point is searched for, the information processing apparatus attempts to receive a search signal. By so doing, the search can be efficiently performed.
In still another configuration example, the information processing apparatus may further comprise switch condition update means for updating a switch condition for the switching by the search switch means, and the search switch means automatically may switch between the first search and the second search on the basis of the switch condition updated by the switch condition update means.
According to the above configuration example, the search switch condition can be updated, and thus the condition can be set as appropriate in accordance with the situation.
In still another configuration example, the information processing apparatus may further comprise switch condition reception means for receiving the switch condition from a server, and the switch condition update means may update the switch condition to the switch condition received by the switch condition reception means.
According to the above configuration example, the search switch condition is received from the server and used for update, and thus update of the switch condition can be easy.
In still another configuration example, the first communication process means may connect directly to another information processing apparatus present in a range of short-distance wireless communication, by using the short-distance wireless communication, and may perform data communication with the other information processing apparatus, and the second communication process means may connect to a network via the access point, and may perform data communication with a server or another information processing apparatus via the network.
According to the above configuration example, communication with a close partner at a close place and communication with a partner at a distant place can be selectively and seamlessly performed.
In still another configuration example, the information processing apparatus may be a portable information processing apparatus.
According to the above configuration example, for example, when the user moves with the information processing apparatus when going out, various communications can be performed without making the user notice it. Thus, a surprise can be provided to the user, and a motivation to carry the information processing apparatus can be provided to the user.
A computer-readable storage medium having stored therein an information processing program according to the present invention is a computer-readable storage medium having stored therein an information processing program executed by a computer of an information processing apparatus. The information processing program causes the computer to operate as search means, first communication process means, and second communication process means. The search means automatically performs a search for another information processing apparatus and a predetermined access point. The first communication process means automatically performs data communication with the other information processing apparatus found by the search means. The second communication process means automatically performs data communication via the access point found by the search means.
An information processing method according to the present invention is an information processing method for controlling an information processing apparatus and comprises a search step, a first communication process step, and a second communication process step. The search step automatically performs a search for another information processing apparatus and a predetermined access point. The first communication process step automatically performs data communication with the other information processing apparatus found at the search step. The second communication process step automatically performs data communication via the access point found at the search step.
An information processing system according to the present invention is an information processing system includes a server and an information processing apparatus. The server comprises communication means for performing data communication with the information processing apparatus via a network. The information processing apparatus comprises search means, first communication process means, and second communication process means. The search means automatically performs a search for another information processing apparatus and a predetermined access point by using short-distance wireless communication. The first communication process means connects directly to the other information processing apparatus found by the search means, and automatically performs data communication with the other information processing apparatus. The second communication process means automatically performs data communication with the server via the access point found by the search means.
According to the above configuration example, the two types of communications, the communication performed with the other information processing apparatus and the communication performed with the server via the access point, can be selectively used in accordance with the situation.
According to the present invention, the two types of communications, the communication performed with the other information processing apparatus and the communication performed via the access point, can be automatically and selectively performed as appropriate, and various communications can be performed without making the user notice it.
These and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings.
Hereinafter, an embodiment of the present invention will be described with reference to the drawings. It should be noted that the present invention is not limited to the embodiment.
Hereinafter, a game apparatus that is one example of an information processing apparatus according to one embodiment of the present invention will be described. A game apparatus 10 is a hand-held game apparatus. As shown in
As shown in
The touch panel 13 is mounted on the screen of the lower LCD 12. The insertion opening 17 (indicated by dotted lines in
A cross button 14A (direction input button 14A), a button 14B, a button 14C, a button 14D, a button 14E, a power button 14F, a selection button 14J, a HOME button 14K, and a start button 14L are provided on an inner side surface (main surface) of the lower housing 11.
An analog stick 15 is a device for instructing a direction.
The microphone hole 18 is provided on the inner side surface of the lower housing 11. Under the microphone hole 18, a microphone 42 (see
As shown in
As shown in
As shown in
Further, as shown in
As shown in FIG Ito
The upper LCD 22 is a display device capable of displaying a stereoscopically visible image. Specifically, the upper LCD 22 is a parallax barrier type display device capable of displaying an image that is stereoscopically visible with naked eyes. The upper LCD 22 allows a user to view the image for a left eye with her/his left eye, and the image for a right eye with her/his right eye by utilizing a parallax barrier, so that an image (a stereoscopically visible image) exerting a stereoscopic effect for a user can be displayed. Further, the upper LCD 22 may disable the parallax barrier. When the parallax barrier is disabled, an image can be displayed in a planar manner. Thus, the upper LCD 22 is a display device capable of switching between a stereoscopic display mode for displaying a stereoscopically visible image and a planar display mode (for displaying a planar visible image) for displaying an image in a planar manner. The switching of the display mode is performed, for example, by the 3D adjustment switch 25 described below.
Two imaging sections (23a and 23b) provided on an outer side surface 21D of the upper housing 21 are generically referred to as the outer imaging section 23. The outer imaging section (left) 23a and the outer imaging section (right) 23b can be used as a stereo camera depending on a program executed by the game apparatus 10.
The inner imaging section 24 is provided in an inner side surface 21B of the upper housing 21 and acts as an imaging section that has an imaging direction that is the same direction as the inward normal direction of the inner side surface.
The 3D adjustment switch 25 is a slide switch, and is used for switching a display mode of the upper LCD 22 as described above. Further, the 3D adjustment switch 25 is used for adjusting the stereoscopic effect of a stereoscopically visible image (stereoscopic image) which is displayed on the upper LCD 22. A slider 25a of the 3D adjustment switch 25 is slidable to any position in a predetermined direction (along the longitudinal direction of the right side surface), and a display mode of the upper LCD 22 is determined in accordance with the position of the slider 25a. Further, a manner in which the stereoscopic image is visible is adjusted in accordance with the position of the slider 25a.
The 3D indicator 26 is an LED indicating whether or not the upper LCD 22 is in the stereoscopic display mode.
Further, a speaker hole 21E is provided in the inner side surface of the upper housing 21. A sound is outputted through the speaker hole 21E from the speaker 43 described below.
Next, an internal electrical configuration of the game apparatus 10 will be described with reference to
The information processing section 31 includes a CPU (Central Processing Unit) 311 for executing a predetermined program, a GPU (Graphics Processing Unit) 312 for performing image processing, a VRAM (Video RAM) 313, and the like. By executing a program stored in a memory (for example, the external memory 28 connected to the external memory I/F 33 or the internal data storage memory 35) inside the game apparatus 10, the CPU 311 performs a process corresponding to this program. The program executed by the CPU 311 may be obtained from another apparatus through communication with the other apparatus. In the present embodiment, the CPU 311 is capable of performing multitask control. The GPU 312 generates an image in accordance with an instruction from the CPU 311, and renders the image in the VRAM 313. The image rendered in the VRAM 313 is outputted to the upper LCD 22 and/or the lower LCD 12 and displayed on the upper LCD 22 and/or the lower LCD 12.
The external memory I/F 33 is an interface for detachably connecting to the external memory 28. The external data storage memory I/F 34 is an interface for detachably connecting to the external data storage memory 29.
The main memory 32 is a volatile storage device used as a work area and a buffer area for (the CPU 311 of) the information processing section 31.
The external memory 28 is a nonvolatile storage device for storing a program and the like executed by the information processing section 31. The external memory 28 is implemented as, for example, a read-only semiconductor memory.
The external data storage memory 29 is implemented as a non-volatile readable and writable memory (for example, a NAND flash memory), and is used for storing optional data.
The internal data storage memory 35 is implemented as a non-volatile readable and writable memory (for example, a NAND flash memory), and is used for storing predetermined data. For example, data and/or programs downloaded through the wireless communication module 36 by wireless communication is stored in the internal data storage memory 35.
The wireless communication module 36 has a function of performing wireless communication with another communication apparatus. In the present embodiment, the wireless communication module 36 can implement two types of communication modes, “infrastructure communication” and “ad hoc communication” described below. The “infrastructure communication” is a function of connecting to a wireless LAN by using a method based on, for example, IEEE 802.11b/g/n standard. The “ad hoc communication” is a function of performing wireless communication with the same type of game apparatus by a predetermined communication method (for example, communication based on a unique protocol, infrared communication). Although described in detail below, three types of communication functions, “unnoticed communication”, “passing communication”, and “local communication”, are selectively performed as appropriate by using the two types of communication modes in the present embodiment.
The wireless communication module 36 includes a second microcomputer 361, a RAM 362, and the like. The RAM 362 is used for storing programs for implementing the three types of communication functions described above. In particular, in the present embodiment, because of the capacity of the RAM 362 and the like, one program is appropriately selected from a program for the “unnoticed communication”, a program for the “passing communication”, and a program for the “local communication” in accordance with a desired communication function, and the selected program is stored in the RAM 363. In other words, a program to be executed is switched as appropriate. Then, the second microcomputer 361 controls execution of the above three communication functions on the basis of the program stored in the RAM 362.
The acceleration sensor 39 detects magnitudes of accelerations (linear accelerations) in the directions of the straight lines along the three axial (xyz axial) directions, respectively. The information processing section 31 can receive data (acceleration data) indicating accelerations detected by the acceleration sensor 39, and detect an orientation and a motion of the game apparatus 10.
The first microcomputer 37 performs processes such as a process concerning power management of the game apparatus 1, a process concerning time, a process of detecting opening or closing of the housing. In addition, the microcomputer 37 receives a notification concerning these processes from the CPU 311, and also provides a notification to the CPU 311. The microcomputer 37 has a real time clock (RTC) 371. The RTC 371 counts a time and outputs the time to the CPU 311 via the microcomputer 37. For example, the CPU 311 is capable of calculating a current time (date) and the like on the basis of the time counted by the RTC 371.
The first microcomputer 37 is connected to the open/close detector 46 and the power circuit 40. The open/close detector 46 detects opening or closing of the housing, and notifies the microcomputer 37 (further the CPU 311) of the detection result. The power circuit 40 controls power supplied from a power supply (typically, a battery accommodated in the lower housing 11) of the game apparatus 10 and supplies the power to each component of the game apparatus 10. In addition, the power circuit 40 receives a notification of shift to a sleep mode or cancellation of the sleep mode, from the microcomputer 37 (from the CPU 311 via the microcomputer 37). Then, the power circuit 40 performs control for appropriately supplying power, on the basis of the notification.
Now, a power control mode of the game apparatus 10 according to the present embodiment will be described. After the power supply such as a battery is mounted to the game apparatus 10 so as to allow power to be supplied to each component, the game apparatus 10 basically operates in any one of two power control modes that are a “normal power mode” and a “power saving mode”. The “normal power mode” is a state where power is supplied to all the components. For example, when the user operates the game apparatus 10 and plays a predetermined game, or when the user operates various applications, the power control mode is the “normal power mode”. The “power saving mode” is a state where power supply to only some of the components is continued and power supply to the other components is stopped. In the present embodiment, the “power saving mode” includes a “sleep mode”. The “sleep mode” is a state where power is supplied to only the first microcomputer 37 and the wireless communication module 36 and power supply to the other components such as the CPU 311 and the LCDs is stopped (it should be noted that the CPU 311 is capable of receiving an instruction for cancelling the “sleep mode”). Further, in the “sleep mode”, the microcomputer 37 and (the second microcomputer 361 of) the wireless communication module 36 repeatedly perform processes called “microcomputer process” and “during-sleep BG communication process”, respectively, in predetermined cycles. These processes will be described in detail below.
In the present embodiment, in addition to the method of shifting to the sleep mode or cancelling the sleep mode on the basis of the detection result of the open/close detector 46 as described above, it is possible to change the power control mode between the “normal power mode” and the “sleep mode” in accordance with an operation of the power button 14F. Moreover, in addition to an operation of the power button 14F, it is possible to automatically cancel the “sleep mode” or shift to the “sleep mode” by a process described below. For example, after the user finishes playing a certain game, if the user presses the power button 14F (it seems to the user that this operation is an operation to turn off the power), the game apparatus 10 shifts to the “sleep mode”. In this state, the user can close and carry the game apparatus 10. Then, if the user opens the game apparatus 10 and presses the power button 14F again, the “sleep mode” is cancelled and the game apparatus 10 shifts to the “normal power mode”. Alternatively, the game apparatus 10 may shift to the “sleep mode” when a predetermined time period elapses from the last operation.
Further, by pressing the power button 14F for a predetermined time period or longer, it is possible to shift to a “complete stop mode” in which power supply to all the components including the first microcomputer 37 and the wireless communication module 36 is stopped (namely, the power is completely turned off). In this case, if the power button 14F is pressed for the predetermined time period or longer, the game apparatus 10 starts up to shift to the “normal power mode”.
Here, in view of whether or not the user is using the game apparatus 10, the power control mode can be rephrased as follows. That is, the game apparatus 10 has two states, namely, a “used state” and an “unused state”. The “used state” is a state where the normal power mode continues since the user opens the housing of the game apparatus 10 and directly uses the game apparatus 10. For example, a state where the user plays a game or the like by operating the operation button 14 or the like, corresponds to this state. On the other hand, the “unused state” is a state where the user does not independently and directly use the game apparatus 10. The “unused state” also includes a state where the power control mode is the “sleep mode” since the housing is closed, as well as a state where, in performing the “unnoticed communication” or the “passing communication” described below, the “sleep mode” is temporarily cancelled (while the housing is closed), a process concerning the “unnoticed communication” or the “passing communication” is performed, and the game apparatus 10 returns to the “sleep mode” after performing the “unnoticed communication” or the “passing communication”. For example, a state where the user closes the housing of the game apparatus 10 and the game apparatus 10 is put in a bag when the user goes out, is the “unused state”. Further, as described above, a state where the “sleep mode” is temporarily cancelled while the game apparatus 10 is put in the bag and the user goes out, and a state where the game apparatus 10 shifts to the “sleep mode” again after the “unnoticed communication” is performed (in this state, the user does not use the game apparatus 10), are also the “unused state”. Further, in addition to opening or closing of the housing, the trigger for changing the state of the game apparatus 10 between the “used state” and the “unused state” also includes an operation of the power button 14F. In other words, the user has been playing a game (used state), and, then, by the user pressing the power button 14F of the game apparatus 10 after finishing the game play, the state of the game apparatus 10 is changed from the “used state” to the “unused state”. Further, for example, when the user has not performed any operation for a constant time period, the state of the game apparatus 10 may be changed from the “used state” to the “unused state”.
In the following description, for simplification of explanation, the power control mode will be described using an example where only the “normal power mode” and the “sleep mode” are used.
The touch panel 13, the microphone 42, and the speaker 43 are connected to the I/F circuit 41. The I/F circuit 41 includes a sound control circuit for controlling the microphone 42 and the speaker 43 (amplifier), and a touch panel control circuit for controlling the touch panel. The sound control circuit performs A/D conversion and D/A conversion on the sound signal, and converts the sound signal to a predetermined form of sound data, for example. The touch panel control circuit generates a predetermined form of touch position data on the basis of a signal outputted from the touch panel 13, and outputs the touch position data to the information processing section 31. The information processing section 31 obtains the touch position data, to recognize a position on which an input is made on the touch panel 13.
The operation button 14 includes the operation buttons 14A to 14L described above, and operation data indicating an input state of each of the operation buttons 14A to 14L (whether or not each button has been pressed) is outputted from the operation button 14 to the information processing section 31.
The lower LCD 12 and the upper LCD 22 are connected to the information processing section 31. Specifically, the information processing section 31 is connected to an. LCD controller (not shown) of the upper LCD 22, and causes the LCD controller to set the parallax barrier to ON or OFF. When the parallax barrier is set to ON in the upper LCD 22, an image for a right eye and an image for a left eye that are stored in the VRAM 313 of the information processing section 31 are outputted to the upper LCD 22. More specifically, the LCD controller alternately repeats reading of pixel data of the image for a right eye for one line in the vertical direction, and reading of pixel data of the image for a left eye for one line in the vertical direction, thereby reading, from the VRAM 313, the image for a right eye and the image for a left eye. Thus, an image to be displayed is divided into the images for a right eye and the images for a left eye each of which is a rectangle-shaped image having one line of pixels aligned in the vertical direction, and an image, in which the rectangle-shaped image for the left eye which is obtained through the division, and the rectangle-shaped image for the right eye which is obtained through the division are alternately aligned, is displayed on the screen of the upper LCD 22. A user views the images through the parallax barrier in the upper LCD 22, so that the image for the right eye is viewed by the user's right eye, and the image for the left eye is viewed by the user's left eye. Thus, the stereoscopically visible image is displayed on the screen of the upper LCD 22.
The outer imaging section 23 and the inner imaging section 24 each take an image in accordance with an instruction from the information processing section 31, and output data of the taken image to the information processing section 31.
The 3D adjustment switch 25 transmits an electrical signal corresponding to the position of the slider 25a, to the information processing section 31.
The information processing section 31 controls whether or not the 3D indicator 26 is to be lit up. For example, the information processing section 31 lights up the 3D indicator 26 when the upper LCD 22 is in the stereoscopic display mode.
Next, an outline of a process assumed in the present embodiment will be described. The game apparatus 10 of the present embodiment perform two types of communications called the “passing communication” and the “unnoticed communication” described below, as communications performed as background processes. Meanwhile, the game apparatus 10 has two states, namely, the “sleep mode” and the “normal power mode”. The process according to the present embodiment mainly relates to control of the above two types of communications in accordance with such two states of the game apparatus 10.
First, the entire configuration of a network assumed in the present embodiment will be described.
First, the “unnoticed communication” will be described. This communication function is communication performed in the background. In this communication function, the game apparatus 10 connects to a predetermined server via an AP and performs transmission/reception of predetermined data with the server. For example, the following communication is performed. For example, the case is assumed where the game apparatus 10 is in the “sleep mode”. In this case, when a connectable AP is present near the game apparatus 10, the game apparatus 10 automatically connects to the AP, and further automatically connects to a predetermined server via the AP. Then, for example, a trial version program of a new game is transmitted from the server, and received by the game apparatus 10. Thereafter, various settings (an install process and the like) are performed such that the trial version program becomes executable. Thus, for example, when the user causes the game apparatus 10 to shift to the “sleep mode” and goes out and then comes back home and returns the game apparatus 10 to the “normal power mode”, the trial version of the new game has been added to menu without making the user notice it. Further, when the game apparatus 10 is in the “normal power mode” as well, the “unnoticed communication” is performed in the background. In such a case, for example, while a game is played, a trial version program or the like as described above is received in the background, and when the user finishes playing the game and switches to the home menu of the game apparatus 10, the trial version of the new game has been added to the menu without making the user notice it. It should be noted that, in the present embodiment, a dedicated server is provided as a server connected in the “unnoticed communication” (a communication partner in the “unnoticed communication”), and it is possible to connect to the dedicated server via any AP.
In the present embodiment, execution of the “unnoticed communication” is managed in a unit called “task”. A plurality of “tasks” can be defined. In each “task”, contents of data to be transmitted/received, a timing (schedule) to perform a transmission/reception process, and the like are defined. Examples of contents performed in each “task” include “update of a system” and “obtaining a trial version of a new game”. Further, there is a “task” of performing transmission/reception of predetermined data for each of various applications installed in the game apparatus 10. For example, in a racing game, such a task is a task of periodically transmitting a lap time of the user to a server and receiving data of a national ranking from the server.
In the present embodiment, on the basis of the execution schedule defined in each “task”, it is determined whether or not the execution time of each “task” has come. When there is a “task” of which the execution time has come, transmission/reception of predetermined data is performed with a predetermined server in accordance with the defined content of the “task”. Here, in the present embodiment, in order to perform the “unnoticed communication”, it is necessary to connect to a predetermined AP (and a server). Thus, even when the execution time of a “task” has come, if no AP is present within the communicable range of the game apparatus 10, the “unnoticed communication” based on the “task” cannot be performed at that time. In such a case, execution of this “task” is suspended, and transmission/reception is performed with the server at a timing when the game apparatus 10 becomes communicable with an AP and the server.
As described above, the “unnoticed communication” is a process that is a background process of automatically connecting to a predetermined server via an AP and automatically performing transmission/reception of predetermined data.
It should be noted that the “infrastructure communication” is used for not only the “unnoticed communication” but also a process in which the Internet is used by the user executing an application such as a web browser. In other words, when being connected to an AP, the game apparatus 10 can perform the “unnoticed communication”, and also can perform communication for using the Internet (on the basis of an operation of the user). However, a communication process using the “infrastructure communication” other than the “unnoticed communication” is not directly relevant to the present embodiment, and thus the detailed description thereof is omitted.
Next, the “passing communication” will be described. This process is also a process performed in the background. In the “passing communication”, game apparatuses 10 are directly connected to each other (peer-to-peer connection), and transmission/reception of data, which is previously prepared for the “passing communication”, is performed. Specifically, a data area for the “passing communication” is previously provided in the internal data storage memory 35 of each game apparatus 10. This area is managed in a unit called “slot”. In the present embodiment, 12 slots are previously provided. Each “slot” is associated with one of applications executable in the game apparatus 10. Each slot includes a data area for transmission and a data area for reception. The number of the slots is merely one example, the present invention is not limited thereto, and the number of the slots may be less or more than 12.
The “passing communication” is performed in the flow described below. The following assumption is made. First, while a predetermined application is executed, transmission data for the “passing communication” is stored in the corresponding slot as appropriate (each application has been associated with a slot). Then, the application is ended, and the game apparatus 10 is caused to shift to the “sleep mode” by the user. Then, the user goes out with the game apparatus 10 and another game apparatus 10 enters the communicable range of the game apparatus 10. In this case, contents of slots corresponding to common applications are transmitted/received between the game apparatuses 10. In other words, transmission data in a slot of a game apparatus A is transmitted to a game apparatus B, and transmission data transmitted from the game apparatus B is received by the game apparatus A and stored as reception data. Thus, with regard to the common applications associated with the slots of the game apparatuses, transmission/reception of data is performed. When there is no common application in the slots of the game apparatuses, the transmission/reception of data as described above is not performed, and, as a result, the “passing communication” is not performed.
As described above, the “passing communication” is communication in which transmission/reception (exchange) of data for the “passing communication” is automatically performed as a background process directly between the game apparatuses 10.
Next, the “local communication” will be described. This communication is communication performed in the foreground. For example, this communication is performed while a versus game or the like is played. In other words, the “local communication” corresponds to the case where the game apparatuses 10 are connected to each other in the mode of the ad hoc communication and a transmission/reception process of operation data and the like of each game apparatus 10 is performed as part of a versus game process. In other words, the “local communication” is not automatically performed like the “passing communication”, and is performed, for example, when the users desire to perform the “local communication ” by input operations and agree with each other before starting the versus game.
As described above, in the present embodiment, the three types of communication functions can be used. Here, on the assumption that these communication functions are performed, a search process for determining whether or not a connection target is present within the communicable range is needed. In other words, for the “unnoticed communication”, it is necessary to search for a connectable AP, and for the “passing communication” and the “local communication”, it is necessary to search for another game apparatus 10 that is connectable. Meanwhile, the game apparatus 10 has only one wireless communication module 36 as described above. Thus, the above communication functions cannot be performed simultaneously, and are selectively performed as appropriate in accordance with the use situation. In the present embodiment, for the “unnoticed communication” and the “passing communication”, which are communications performed in the background, search switch control in predetermined cycles is performed. Hereinafter, an outline of switch control of searches for the “unnoticed communication” and the “passing communication”, which are performed in the background, (hereinafter, may be collectively referred to as background search) will be described with control in the “sleep mode” and control in the “normal power mode”.
First, switch control in the case of the “sleep mode” will be described. In the present embodiment, in this case, searches for the “unnoticed communication” and the “passing communication” are switched in cycles (a search pattern) as shown in
When a connection target is found as a result of the search, the “passing communication” or the “unnoticed communication” is performed. When the “passing communication” or the “unnoticed communication” is started, the above search process is not performed until a series of communication processes concerning the communication is completed. For example, even when, during the search period for the “passing communication”, another game apparatus 10 is found at an elapse of 25 seconds and the “passing communication” is started, the search process for an AP is not performed until a series of transmission/reception processes concerning the “passing communication” is finished.
Here, an operation of the search for the “passing communication” during the period of 30 seconds (first allocation period) will be described in more detail. In the present embodiment, in a process of establishing a connection in the “passing communication”, either game apparatus serves as a “master apparatus”, and the other game apparatus serves as a “slave apparatus”. Then, during the period of 30 seconds, the game apparatus 10 performs the search process while selectively serving as a “master apparatus” and a “slave apparatus”. Here, a mode in the case where the game apparatus 10 serves as a “master apparatus” is referred to as “master mode”, and a mode in the case where the game apparatus 10 serves as a “slave apparatus” is referred to as “client mode”. In the “client mode”, the game apparatus 10 broadcasts a beacon indicating that the game apparatus 10 requests a connection. The beacon includes data (e.g., a predetermined ID) indicating that this beacon is a beacon for the “passing communication”. Meanwhile, in the “master mode”, the game apparatus 10 attempts to receive the beacon transmitted from another game apparatus 10 (that is, becomes a state of waiting for the beacon from another game apparatus 10). Specifically, in the “master mode”, the game apparatus 10 receives a beacon and determines whether or not the received beacon includes data indicating that this beacon is a beacon for the “passing communication”. When the data is not included, the game apparatus 10 discards the beacon and performs reception of another beacon. When the data is included, the game apparatus 10 performs a process for the “passing communication” (a connection establishing process, a data transmission/reception process, and the like).
Then, in the present embodiment, for example, the period of 30 seconds is divided into periods of 1 second (hereinafter, each period of 1 second is referred to as a second allocation period). A mode switch pattern is set such that the game apparatus 10 basically operates in the “client mode” and shifts to the “master mode” once every 5 seconds. Since the power consumption in the “master mode” is greater than the power consumption in the “client mode”, this switch cycle is derived in view of the balance between easiness of performing the “passing communication” and reduction of the power consumption.
As described above, in the “sleep mode”, the switch control is performed in the switch pattern in which the search for the “passing communication” is repeatedly performed for 30 seconds, then the search for the “unnoticed communication” is performed once, and then the search for the “passing communication” is performed for 30 seconds again. In other words, control is performed in such a manner that the “passing communication” is prioritized over the “unnoticed communication”. In the case of the “sleep mode”, it is typically considered that the game apparatus 10 is carried outside the user's house with the housing closed. Thus, this control is performed from the standpoint that an environment where communication is easily performed with another game apparatus 10 by using the “passing communication” is provided to the game apparatus 10.
Next, an outline of switch control in the “normal power mode” will be described. In this case as well, switch control of the background search is basically performed in the same pattern as that in the case of the “sleep mode”. In other words, in this pattern, the search for the “passing communication” is performed for 30 seconds, then the search for the “unnoticed communication” is performed once, and the search for the “passing communication” is performed for 30 seconds again. However, unlike the case of the “sleep mode”, in the case of the “normal power mode”, when a communicable AP is detected as a result of the search for the “unnoticed communication” and a connection is established to the AP (and a server ahead of the AP), even after a series of transmission/reception processes concerning the “unnoticed communication” is finished, the connection to the AP is not cut off but is maintained.
As described above, in the present embodiment, with regard to the communication performed in the background, in the “sleep mode”, control is performed such that the “passing communication” is easily performed, and in the “normal power mode”, control is performed such that the “unnoticed communication” (infrastructure communication) is easily performed. By so doing, the possibility of performing a desired communication mode can be changed in accordance with the used state of the game apparatus 10.
It should be noted that when the user closes the housing and an instruction to shift to the “sleep mode” is issued while communication is performed in the background in the “normal power mode”, even though the communication process is being performed, the communication process is stopped and the game apparatus 10 shifts to the “sleep mode”. Then, the background search process with the search pattern in the “sleep mode” as shown in
Next, switch control in the “normal power mode” between: the “passing communication” and the “unnoticed communication”, which are the background communications; and the “local communication”, which is the foreground process, will be described. Since the “passing communication” and the “unnoticed communication” are the background communications, communication can be performed in parallel with execution of a predetermined application. Meanwhile, the game apparatus 10 has only one wireless communication module 36 as described above. Thus, for example, when a versus game process (a foreground process) using the “local communication” is performed, the “local communication” cannot be performed in a state where the wireless communication module 36 is used in the background communication. Further, when the “local communication” is not performed in a foreground application but, for example, transmission/reception of large-sized data is performed in the “unnoticed communication”, the processing load temporarily increases due to the influence of the transmission/reception, and the increase in processing load may influence the execution speed of the foreground application. Therefore, in the present embodiment, the background search and the like can be stopped by the application issuing an instruction to stop the background communication. By so doing, for example, when a versus game process is performed by using the “local communication” as described above, an application for the versus game issues an instruction to stop the background communication (to the system). The process of the background communication and the background search that are being performed are stopped in accordance with the instruction, and the wireless communication module 36 is substantially unused. Then, the application for the versus game can perform a process concerning the “local communication” by using the wireless communication module 36. Then, when a notification of cancellation of the stop is issued from the application and the stop instruction is invalidated, and the background search is started again (see
Next, the above-described processes performed in the game apparatus 10 will be described in detail. First, main programs and data that are used in the processes will be described. Prior to this description, components that perform the processes in the present embodiment will be described. In the present embodiment, the first microcomputer 37, the second microcomputer 361, and the CPU 311 independently perform processes described below, and these processes are performed in a cooperative manner and in parallel with each other.
Here, the relation between: processes performed on the basis of these programs; and the first microcomputer 37, the second microcomputer 361, and the CPU 311 that perform these processes, will be described briefly.
In
Referring back to
The “passing communication” data 505 is used in the “passing communication”.
Referring back to
Referring back to
The game apparatus counter 510 is data used for controlling an instruction to stop the background communication, and includes a third stop counter 511 and a fourth stop counter 512. The third stop counter 511 indicates the sum of the values of the first stop counters 508 of a plurality of the application counters 507, namely, the total number of instructions to stop the “passing communication”. The fourth stop counter 512 indicates the sum of the values of the second stop counters 509 of a plurality of the application counters 507, namely, the total number of instructions to stop the “unnoticed communication”. For example, when a plurality of applications is being executed, if even one of these applications issues an instruction to stop the “passing communication”, the process concerning the “passing communication” is stopped.
In the system data area 504, various pieces of data required for system control, such as operation data, are stored.
In the application data area 513, data used in each application is stored as appropriate. For example, if the content of an application is a versus game, various pieces of data used in the versus game process are stored in the application data area 513 as appropriate.
Next, the above-described processes performed by the game apparatus 10 will be described in detail. First, the process performed by the first microcomputer 37 will be described.
In
Thereafter, power is temporarily supplied to the CPU 311 such that the CPU 311 becomes operable, and the CPU 311 performs the process concerning the “unnoticed communication” as described below. Then, when the process is finished, a notification that the “unnoticed communication” has ended is transmitted from the CPU 311 to the first microcomputer 37.
Next, at step S5, it is determined whether or not the notification that the “unnoticed communication” has ended has been received. As a result, when the notification has not been received (NO at step S5), the determination at step S5 is repeated (i.e., the first microcomputer 37 waits until the “unnoticed communication” ends). On the other hand, when the notification has been received (YES at step S5), at step S6, an instruction to shift to the “sleep mode” is issued from the first microcomputer 37 to the CPU 311, the power supply state flag 304 is set to OFF, and a notification that the “sleep mode” is to be shifted to is issued from the first microcomputer 37 to the power circuit 40. It should be noted that the issuance of the instruction to cancel the “sleep mode” and shift to the “normal power mode” at step S4, the determination at step S5, and the issuance of the instruction to shift to the “sleep mode” at step S6 may be performed by the second microcomputer 361 of the wireless communication module 36, not by the first microcomputer 37.
Next, at step S7, it is determined whether or not the game apparatus 10 has been shifted from a closed state (a state in which the housing is closed) to an opened state (a state in which the housing is opened) (i.e., whether or not the game apparatus 10 has been opened). Specifically, the first microcomputer 37 determines whether or not a detection signal indicating that the housing is opened has been received from the open/close detector 46. As a result of the determination, when it is determined that the game apparatus 10 has been shifted from the closed state to the opened state (YES at step S7), at the next step S8, an instruction to cancel the “sleep mode” is issued from the first microcomputer 37 to the CPU 311, the power supply state flag 304 is set to ON, and a notification that the “sleep mode” is to be cancelled is issued from the first microcomputer 37 to the power circuit 40. Accordingly, the power circuit 40 starts power supply to each component of the game apparatus 10 as appropriate.
On the other hand, as a result of the determination at step S7, when it is determined that the game apparatus 10 has not been shifted from the closed state to the opened state (NO at step S7), it is determined at the next step S9, on the basis of a signal from the open/close detector 46, whether or not the game apparatus 10 has been shifted from the opened state to the closed state (i.e., whether or not the game apparatus 10 has been closed). As a result, when it is determined that the game apparatus 10 has been shifted from the opened state to the closed state (YES at step S9), at the next step S 10, an instruction to shift to the “sleep mode” is issued from the first microcomputer 37 to the CPU 311, the power supply state flag 304 is set to OFF, and a notification that the “sleep mode” is to be shifted to is issued from the first microcomputer 37 to the power circuit 40. Accordingly, the power circuit 40 stops power supply to the components of the game apparatus 10 other than some components, as appropriate. On the other hand, as a result of the determination at step S9, when it is determined that the game apparatus 10 has not been shifted from the opened state to the closed state (NO at step S9), the process at step S10 is skipped and the microcomputer process ends.
Next, the during-sleep BG communication process performed by the second microcomputer 361 in the “sleep mode” will be described with reference to
Next, at step S42, as a result of the process at step S41, it is determined whether or not the game apparatus 10 is determined to operate in the “master mode”. As a result, when the game apparatus 10 does not operate in the “master mode”, namely, operates in the “client mode” (NO at step S42), a search process in the “client mode” is performed at step S43. In other words, a process of transmitting a beacon indicative of requesting another game apparatus to connect to the game apparatus 10 is performed.
Next, at step S44, it is determined whether or not another game apparatus 10 is detected, by determining whether or not a response to the transmitted beacon has been received. As a result, when another game apparatus 10 is not detected (NO at step S44), the processing proceeds to below-described step S46. On the other hand, when another game apparatus 10 is detected (YES at step S44), the sleep state of the CPU 311 is temporarily cancelled on the basis of a signal from the wireless communication module 36 or the first microcomputer 37, and a connection is established to the detected other game apparatus 10 and the “passing communication” is performed at step S45. In other words, the “passing communication” data 505 is referred to, and transmission/reception of data in slots having the common application ID 5052 is performed. Then, when data exchange in the “passing communication” is finished, the CPU 311 shifts to the sleep state again.
Next, at step S46, it is determined whether or not the first allocation period (in the present embodiment, 30 seconds from start of the search process for the “passing communication”) as shown in
Next, as a result of the determination at step S42, when the game apparatus 10 operates in the “master mode” (YES at step S42), a search process in the “master mode” is performed at step S48. In other words, reception of (waiting for) a beacon transmitted from another game apparatus 10 operating in the “client mode” is performed.
Next, at step S49, it is determined whether or not another game apparatus 10 is detected, by determining whether or not a beacon has been received from the other game apparatus 10 (within a predetermined time period). As a result, when another game apparatus 10 is not detected (NO at step S49), the processing proceeds to below-described step S51. On the other hand, when another game apparatus 10 is detected (YES at step S49), the sleep state of the CPU 311 is temporarily cancelled on the basis of a signal from the wireless communication module 36 or the first microcomputer 37, and a connection is established to the detected other game apparatus 10 and the “passing communication” is performed at step S50, similarly to step S45. Then, when data exchange in the “passing communication” is finished, the CPU 311 shifts to the sleep state again.
Next, at step S51, it is determined whether or not the first allocation period has elapsed. As a result, when the first allocation period has elapsed (YES at step S51), the passing communication process ends. On the other hand, when the first allocation period has not elapsed (NO at step S51), it is determined at the next step S52 whether or not the second allocation period has elapsed. As a result, when the second allocation period has not elapsed (NO at step S52), the processing returns to step S48, and the search process in the “master mode” is repeated. On the other hand, when the second allocation period has elapsed (YES at step S52), the processing returns to step S41, and the same process is repeated starting with the mode setting process. In other words, it is set again whether the game apparatus 10 operates in the “client mode” or the “master mode”. This is the end of the description of the passing communication process.
Referring back to
Next, at step S23, it is determined whether or not an AP is detected as a result of the search process. As a result, when no AP is detected (NO at step S23), the processing returns to step S21, and the same process is repeated. On the other hand, when an AP is detected (YES at step S23), a notification that the AP is detected is transmitted to the first microcomputer 37 at step S24 (this notification is used for the determination at step S2 in the microcomputer process in
Next, a process performed by the CPU 311 mainly in the “normal power mode” will be described. First, a management process performed (made resident and performed) as a background process in the “normal power mode” will be described. This process is also a process performed initially when power is supplied to the CPU 311.
Next, at step S73, it is determined whether or not an instruction to activate a predetermined application has been issued. For example, in a state where a home menu (not shown) of the game apparatus 10 is displayed, when an icon indicating a predetermined application is selected by the user, an instruction to activate the selected application is issued from an application that controls the home menu. As a result of the determination, when it is determined that an instruction to activate an application occurs (YES at step S73), an application counter 507 associated with the application instructed to be activated is generated and stored in the main memory 32 at step S74. Then, at step S75, a process of the application instructed to be activated is generated, whereby the application is activated.
On the other hand, as a result of the determination at step S73, when an instruction to activate an application has not been issued, the processes at steps S74 and S75 are skipped.
Next, at step S76, it is determined whether or not an application end notification (issued at below-described step S122 in
Next, at step S78, a process for adjusting the number of the application counters 507 in accordance with the number of the applications being currently executed is performed. Specifically, it is checked whether there is any application counter 507 of which a process of the corresponding application is not present, and when such an application counter 507 remains, a process of deleting the application counter 507 is performed. For example, this process is a process for, when an application is force-quitted or abends due to a certain reason, preventing the application counter 507 corresponding to the application from remaining. In addition, when there is an application counter 507 to be deleted, it is checked whether or not the value of each of the first stop counter 508 and the second stop counter 509 of this application counter 507 is equal to or higher than 1. When there is a counter whose value is equal to or higher than 1, a process of decreasing the value of the game apparatus counter 510 as appropriate is also performed. Specifically, when the value of the first stop counter 508 of the application counter 507 to be deleted is equal to or higher than 1, 1 is subtracted from the value of the third stop counter 511. When the value of the second stop counter 509 is equal to or higher than 1, 1 is subtracted from the value of the fourth stop counter 512. When there are two or more application counters 507 to be deleted, the above determination is performed for each application counter 507. For example, when there are three application counters 507 to be deleted and there are two application counters 507 each of which the value of the first stop counter 508 is equal to or higher than 1, 2 is subtracted from the value of the third stop counter 511.
Next, at step S79, a game apparatus counter setting process is performed. This process is a process of checking the state of each application counter 507 at this time point and setting the game apparatus counter 510 in accordance with the content of each application counter 507.
First, at step S92, it is determined whether or not a process described next has been performed for all the application counters 507 in the system data area 504. As a result, when any unprocessed application counters 507 remain (NO at step S92), one counter is selected from the unprocessed application counters 507 at step S93. Hereinafter, the selected application counter 507 is referred to as process target application counter.
Next, at step S94, it is determined whether or not the value of the first stop counter 508 of the process target application counter is equal to or higher than 1. In other words, it is determined whether or not the application corresponding to the process target application counter has instructed to stop a process concerning the “passing communication”. As a result of the determination, when the value of the first stop counter 508 is equal to higher than 1 (YES at step S94), it is determined at step S95 whether or not the value of the first stop counter 508 of the process target application counter is 0 in the last process loop (i.e., whether a stop instruction is newly issued at this time or has been previously issued). As a result, when the value is 0 at the last time (YES at step S95), it means that the stop instruction is newly issued at this time, and thus 1 is added to the value of the third stop counter 511 of the game apparatus counter 510 at step S96. On the other hand, when the value is not 0 (NO at step S95), it means that the stop instruction has been previously issued, and thus the process at step S96 is skipped. On the other hand, as a result of the determination at step S94, when the value of the first stop counter 508 is not equal to or higher than 1, namely, is 0 (NO at step S94), it is determined at step S100 whether or not the value of the first stop counter 508 of the process target application counter is equal to or higher than 1 in the last process loop (i.e., whether or not a stop cancellation instruction is newly issued at this time). As a result, when the value is equal to or higher than 1 (YES at step S100), it means that the stop cancellation instruction is newly issued at this time, and thus 1 is subtracted from the value of the third stop counter 511 at step S101 (it should be noted that this subtraction is not performed when the value of the third stop counter 511 is already 0 as a result of the game apparatus counter 510 being adjusted due to the force-quit of the application or the like in the process at step S78 in
Next, at step S97, it is determined whether or not the value of the second stop counter 509 of the process target application counter is equal to or higher than 1. In other words, it is determined whether or not the application corresponding to the process target application counter has instructed to stop the process concerning the “unnoticed communication”. As a result of the determination, when the value of the second stop counter 509 is equal to or higher than 1 (YES at step S97), it is determined at step S98 whether or not the value of the second stop counter 509 of the process target application counter is 0 in the last process loop. As a result, when the value is 0 at the last time (YES at step S98), 1 is added to the value of the fourth stop counter 512 of the game apparatus counter 510 at step S99. Then, the processing returns to step S92, and the same process is repeated. On the other hand, when the value is not 0 (NO at step S98), the process at step S99 is skipped. On the other hand, as a result of the determination at step S97, when the value of the second stop counter 509 is not equal to or higher than 1, namely, is 0 (NO at step S97), it is determined at step S102 whether or not the value of the second stop counter 509 of the process target application counter is equal to or higher than 1 in the last process loop. As a result, when the value is equal to or higher than 1 (YES at step S102), 1 is subtracted from the value of the fourth stop counter 512 at step S103 (it should be noted that this subtraction is not performed when the value of the fourth stop counter 512 is already 0 in the process at step S78). Then, the processing returns to step S92. On the other hand, when the value of the second stop counter 509 is not equal to or higher than 1 (NO at step S102), the process at step S103 is skipped and the processing returns to step S92.
By the processes as described above, a stop instruction or a stop cancellation instruction from an application can be reflected in the value of the game apparatus counter 510. In other words, when a stop instruction is issued from an application, the value of the game apparatus counter 510 is increased. Then, when cancellation of the stop instruction is instructed, the value of the game apparatus counter 510 is decreased.
On the other hand, as a result of the determination at step S92, when it is determined that the above-described process has been performed for all the application counters 507 in the system data area 504 (YES at step S92), the game apparatus counter setting process ends.
Referring back to
Next, a process of an application activated in accordance with an activation instruction from the user and the management process described above will be described. The application process can be performed as a foreground process and also can be performed as a background process. As a matter of course, a specific process content is different between each application. Thus, the description concerning the difference is omitted, and a part relevant to the present embodiment, namely, a process concerning the application counter 507 will be mainly described as a process content common to each application, namely, as a process that is thought to be performed generally in each application.
Next, at step S112, various information processing corresponding to the content of each application is performed. For example, game processing, painting software processing, camera application processing, or the like, is performed. In this processing, a process concerning the “local communication” can be also performed as appropriate. In this case, before the process of the “local communication” is performed, an instruction to stop communication as described below is issued. Then, stop of the process concerning the “passing communication” or the “unnoticed communication” is confirmed, then the “local communication” process program 5023 is copied into the RAM 362 of the wireless communication module 36, and the process concerning the “local communication” is started. As a matter of course, in addition to the case of performing the “local communication”, a stop instruction may be issued for the purpose of reducing the processing load. In such a case, the application does not necessarily need to wait until stop of communication is confirmed.
Next, at step S113, it is determined whether or not an instruction to stop the “passing communication” has been issued as a result of the above various information processing. Here, in the present embodiment, it is assumed that each application consists of a set of programs each having a specific function. It is also assumed that the stop instruction can be issued by each program constituting the application. Thus, in some cases, the stop instruction is issued from two programs among the program group constituting the application. In such cases, there are two stop instructions.
As a result of the determination at step S113, when one or more instructions to stop the “passing communication” have been issued (YES at step S113), the value of the first stop counter 508 is increased in accordance with the number of the issued stop instructions at step S114. On the other hand, when no stop instruction has been issued (NO at step S113), the process at step S114 is skipped.
Next, at step S115, it is determined whether or not an instruction to stop the “unnoticed communication” has been issued as a result of the various information processing at step S112. This stop instruction also can be issued by each program constituting the application, similarly to the case of the “passing communication”. As a result of the determination, when one or more instructions to stop the “unnoticed communication” have been issued (YES at step S115), the value of the second stop counter 509 is increased in accordance with the number of the issued stop instructions at step S116. On the other hand, when no stop instruction has been issued (NO at step S115), the process at step S116 is skipped.
Next, at step S117, it is determined whether or not an instruction to cancel stop of the “passing communication” has been issued as a result of the various information processing at step S112. For example, when a predetermined process ends and it is not necessary to stop the “passing communication” after a program issues an instruction to stop the “passing communication”, an instruction to cancel the stop is issued from this program. As a result of the determination, when one or more instructions to cancel stop of the “passing communication” have been issued (YES at step S117), the value of the first stop counter 508 is decreased in accordance with the number of the issued cancellation instructions at step S118. On the other hand, when no cancellation instruction has been issued (NO at step S117), the process at step S118 is skipped.
Next, at step S119, it is determined whether or not an instruction to cancel stop of the “unnoticed communication” has been issued as a result of the various information processing at step S112. As a result of the determination, when one or more instructions to cancel stop of the “unnoticed communication” have been issued (YES at step S119), the value of the second stop counter 509 is decreased in accordance with the number of the issued cancellation instructions at step S120. On the other hand, when no cancellation instruction has been issued (NO at step S119), the process at step S120 is skipped.
Next, at step S121, it is determined whether or not an instruction to end the application has been issued. As a result, when the instruction to end the application has not been issued (NO at step S121), the processing returns to step S112, and the same process is repeated. On the other hand, when the instruction to end the application has been issued (YES at step S121), a process of notifying the system of end of the application is performed at step S122. In accordance with the notification, a process of deleting the process of the application and the like is performed on the system side as appropriate. Then, the application process ends.
Next, the normal time BG communication process performed as a background process in the “normal power mode” will be described. This process is a process for performing the “passing communication” or the “unnoticed communication” in the background in the “normal power mode”.
On the other hand, as a result of the determination at step S131, when the value of the third stop counter 511 is not equal to or higher than 1, namely, is 0 (NO at step S131), there is no application that desires to stop the process concerning the “passing communication”. In this case, next, at step S132, it is determined whether or not the “passing communication” process program 5022 is stored in the RAM 362 of the wireless communication module 36 (e.g., when the value of the third stop counter 511 is 0 and the value of the fourth stop counter 512 is equal to or higher than 1, the “passing communication” process program 5022 remains stored in the RAM 362 of the wireless communication module 36). As a result, when the “passing communication” process program 5022 is not stored in the RAM 362 (NO at step S 132), the “passing communication” process program 5022 is copied into the RAM 362 of the wireless communication module 36 at step S133. On the other hand, as a result of the determination at step S132, when the “passing communication” process program 5022 has been already stored in the RAM 362 (YES at step S132), the process at step S133 is skipped.
Next, at step S134, an instruction to perform the “passing communication” process is issued to the second microcomputer 361. In accordance with the instruction, the second microcomputer 361 starts the “passing communication” process (as a result, the “passing communication” is performed in the background). The “passing communication” process is the same as the process described with reference to
Next, at step S137, it is determined whether or not the value of the fourth stop counter 512 is equal to or higher than 1. In other words, it is determined whether or not there is any application that desires to stop the process concerning the “unnoticed communication”. As a result, when the value is equal to or higher than 1 (YES at step S137), an instruction to stop the “unnoticed communication” has been issued. In this case, it is determined whether or not the value of the fourth stop counter 512 is 0 in the last process loop. As a result, when the value is 0 at the last time (YES at step S138), a process for stopping the process concerning the “unnoticed communication” is performed at step S139 (when the “unnoticed communication” is not being performed at this time point, the process at step S139 may be skipped). Then, the processing returns to step S131, and the same process is repeated.
On the other hand, as a result of the determination at step S137, when the value of the fourth stop counter 512 is not equal to or higher than 1, namely, is 0 (NO at step S137), the process concerning the “unnoticed communication” is performed. In this case, first, at step S140, it is determined whether or not the infrastructure communication program 5024 is stored in the RAM 362 of the wireless communication module 36 (e.g., when the value of the third stop counter 511 is equal to or higher than 1 and the value of the fourth stop counter 512 is 0, the infrastructure communication program 5024 remains stored in the RAM 362 of the wireless communication module 36). As a result, when the infrastructure communication program 5024 is not stored in the RAM 362 (NO at step S140), the infrastructure communication program 5024 is copied into the RAM 362 of the wireless communication module 36 at step S141. The infrastructure communication program 5024 is a program for the wireless communication module 36 to implement the infrastructure communication function, and is, for example, a program for communicating with an AP or a server on the basis of the TCP/IP protocol. Since a basic control method and the like in the program has been already known to one skilled in the art, the detailed description thereof is omitted. On the other hand, when the infrastructure communication program 5024 has been already stored in the RAM 362 (YES at step S140), the process at step S141 is skipped.
Next, at step S142, a process of searching for an AP is performed. In this process, a process of searching for an AP is performed in cooperation with the infrastructure communication program 5024 executed in the wireless communication module 36. This search process can be performed as a more complicated process than the simple search process for AP performed in the “sleep mode” (step S22 in
Next, at step S143, it is determined whether or not an AP is detected as a result of the search. As a result, when no AP is detected (NO at step S143), the processing returns to step S131, and the same process is repeated. On the other hand, when an AP is detected (YES at step S143), a process of establishing a connection to the AP is performed at step S144.
Next, at step S145, the “unnoticed communication” process is performed. This process will be described in detail below.
When the “unnoticed communication” process ends, it is determined at step S146 whether or not a state of being communicable with the AP connected at step S144 continues. For example, it can be determined whether or not the communicable state continues, by periodically detecting a beacon transmitted from the connected AP (even after the connection is established) or the like. By so doing, for example, it can be determined whether or not the game apparatus 10 has moved out of the communicable range of the AR As a result, when the communicable state continues (YES at step S146), it is determined at the subsequent step S147 whether or not the value of the fourth stop counter 512 is equal to or higher than 1. As a result, when the value is not equal to or higher than 1 (NO at step S147), the processing returns to step S145, and the same process is repeated. In other words, the connection to the AP continues to be maintained. On the other hand, when the value is equal to or higher than 1 (YES at step S147), the processing returns to step S131, and the same process is repeated. As a result, (unless a stop instruction has been issued), the process concerning the “passing communication” is performed (in the wireless communication module 36). There is the possibility that an instruction to stop the “unnoticed communication” is issued from an application even when the connection to the AP is maintained. This determination is performed for reflecting the instruction. This is the end of the description of the normal time BG communication process.
Next, the “unnoticed communication” process at step S141 will be described in detail.
On the other hand, as a result of the determination at step S151, when this process has not been called in the “sleep mode” (NO at step S151), it means that this process has been called in the “normal power mode”, and thus the processes at steps S152 and S153 are skipped.
Next, at step S154, the “unnoticed communication” data 506 is referred to, and tasks scheduled to be executed at this time point (including tasks of which the scheduled execution times have been passed and that have not been executed) are extracted. Next, at step S155, it is determined whether or not the following process has been performed for all the extracted tasks scheduled to be executed. As a result, when any unexecuted tasks remain (NO at step S155), one task is selected as an execution target task from the unexecuted tasks at the next step S156.
Next, at step S157, the task content definition data 5062 of the execution target task is referred to, and transmission/reception of data and the like are performed with a predetermined server on the basis of the defined content.
Next, at step S158, it is determined whether or not the state of being communicable with the AP continues (whether or not the game apparatus 10 has moved out of the communicable range of the AP). As a result, when the communicable state continues (YES at step S158), the processing returns to step S155, and the same process is repeated.
On the other hand, when it is determined at step S158 that the communicable state does not continue (NO at step S158), or when it is determined at step S155 that all the tasks scheduled to be executed have been executed (YES at step S155), it is determined at step S159 whether or not this process has been called in the “sleep mode”, similarly to step S151. As a result, when this process has been called in the “sleep mode” (YES at step S159), a process for returning to the “sleep mode” again is performed. First, at step S160, the during-sleep BG communication process program 5021 is copied into the RAM 362 of the wireless communication module 36. By so doing, the wireless communication module 36 becomes a state of being capable of performing the during-sleep BG communication process shown in
On the other hand, as a result of the determination at step S159, when this process has not been called in the “sleep mode” (NO at step S159), it means that this process has been called in the “normal power mode”, and thus the processes at steps S160 and S161 are skipped and the “unnoticed communication” process ends.
As described above, in the present embodiment, the two types of searches, the search for the “passing communication” and the search for the “unnoticed communication”, are repeatedly performed as background processes. Then, the “passing communication” is performed when another game apparatus 10 is detected in the search for the “passing communication”, and the “unnoticed communication” is automatically performed when an AP is detected in the search for the “unnoticed communication”. Further, the two types of searches are automatically and alternately performed in predetermined cycles. By so doing, the two types of communications are automatically performed, and communications having various contents can be performed without making the user aware of it. In addition, two types of communications, communication with a terminal at a close place and communication with a connection target at a distant place (in a sense of network) such as a server, can be performed seamlessly. Moreover, since the search for the “passing communication” and the search for the “unnoticed communication” are alternately performed, both communications can be performed averagely (evenly) to some extent. For example, when the number of other game apparatuses 10 is much larger than the number of APs in an event site, the “passing communication” can be prevented from being performed very often, and the “unnoticed communication” can be performed often to some extent.
With regard to the search pattern, in the embodiment described above, in the “sleep mode”, the search period of 30 seconds is provided for the “passing communication”, and then the search for the “unnoticed communication” is performed once. In other words, setting is made such that the “passing communication” is more likely to occur. Meanwhile, in the “normal power mode”, control is performed such that when the game apparatus 10 is connected to an AP, the state of being connected to the AP is maintained until communication with the AP becomes disenabled, and the “passing communication” is not performed during the period. In other words, in the “sleep mode”, occurrence of the “passing communication” is prioritized, and in the “normal power mode”, occurrence of the “unnoticed communication” (further, various communication processes using infrastructure communication) is prioritized. Thus, communication more suitable for the used state of the game apparatus 10 can be easily performed.
In the “normal power mode”, it is possible to issue an instruction to stop the search process for the “passing communication” or the “unnoticed communication”, from an application. Thus, the background communication can be stopped in accordance with an instruction from an application, and an appropriate communication process can be performed in accordance with the process content of an application to be executed. In addition, the processing load at execution of an application can be reduced, and a more flexible environment for developing an application can be provided to a developer. Further, the number of applications issuing stop instructions is counted by using the game apparatus counter 510. Thus, for example, even when stop instructions are issued from three applications and then any one of the applications cancels the stop instruction, stop of communication can be prevented from being cancelled immediately. In other words, control can be performed such that a stop instruction from an application is preferentially reflected.
With regard to the “passing communication” described above, in the embodiment described above, the “passing communication” may occur a plurality of times during 30 seconds (during the first allocation period). In another embodiment, when the “passing communication” is performed and completed once during 30 seconds, even if 30 seconds has not elapsed, the “passing communication” process may be ended to shift to the search for the “unnoticed communication”. Specifically, when the process at step S45 or S50 in
In the embodiment described above, the search pattern is repeated in which the search for the “passing communication” is performed for 30 seconds and then the search for the “unnoticed communication” is performed once. The search pattern (the condition of switching the two types of searches) may be changeable. For example, data that defines the search pattern may be prepared in a predetermined server. Then, the data that defines the search pattern may be received from the server by using the “unnoticed communication”, and the search pattern may be changed in the game apparatus 10 in accordance with a content of the data.
In the embodiment described above, the search for the “passing communication” and the search for the “unnoticed communication” are alternately performed. At this time, control may be performed such that when a connection target detected in the search is the same as a target connected at the last time, the game apparatus 10 does not connect to this target. For example, it is assumed that the “unnoticed communication” is performed and then the “passing communication” is performed. Then, when an AP detected as a result of the search for the “unnoticed communication” is the same as an AP connected just before, another AP may not be searched for, the “unnoticed communication” process may not be performed, and the search for the “passing communication” may be performed immediately.
With regard to the search process, in the embodiment described above, the pattern has been described in which the search for the “passing communication” and the search for the “unnoticed communication” are alternately performed. However, the present invention is not limited thereto, and the search for the “passing communication” and the search for the “unnoticed communication” may be performed together in one search. For example, an operation having the “master mode” and so-called passive scan may be performed. In other words, in a search operation in which the game apparatus 10 waits for a beacon, the game apparatus 10 is configured to receive a beacon for the “passing communication” and a beacon transmitted from an. AP. Then, it may be determined whether a received beacon is a beacon for the “passing communication” or a beacon transmitted from an AP, and the “passing communication” process or the “unnoticed communication” process may be selected and performed as appropriate in accordance with the result of the determination. In other words, the search for the “passing communication” and the search for the “unnoticed communication” are not separated from each other, and the content of a communication process to be performed may be changed as appropriate in accordance with the type of a received beacon.
In the case where the content of the communication process to be performed is changed as appropriate in accordance with the type of a received beacon as described above, for example, communication processes corresponding to types of beacons that received during a given period may be performed in order by using a concept of queue. For example, it is assumed that three beacons are received in one search, two of the beacons are beacons for the “passing communication” and the rest is a beacon from an AR In this case, the “passing communication”, and the “unnoticed communication” may be performed in order of reception of the beacons. For example, as a result of one search, three communication processes may be performed in order of “passing communication”→“passing communication”→“unnoticed communication”. Other than the order of reception of the beacons, the execution order may be determined in accordance with a priority. For example, when control is desired to be performed such that the “passing communication” is preferentially performed, a priority is set such that the “unnoticed communication” is performed after the “passing communication” is preferentially performed. When control is desired to be performed such that the “unnoticed communication” is preferentially performed, a priority is set such that the “passing communication” is performed after the “unnoticed communication” is performed. When control is desired to be performed such that the “passing communication” and the “unnoticed communication” are alternately performed, a priority may be set such that the “passing communication” and the “unnoticed communication” are alternately performed.
With regard to transmission/reception of data performed in the “passing communication”, the infrastructure communication may be further used. In other words, when another game apparatus 10 is present nearby, the “passing communication” may be performed as described above, and when another game apparatus 10 is not present nearby and it is in a situation where the infrastructure communication is possible, transmission/reception of the “passing communication” data 505 may be performed with another game apparatus 10 in the same situation by using the infrastructure communication. For example, transmission/reception of the “passing communication” data 505 may be performed between game apparatuses that are located in the same region. In other words, game apparatuses 10 that are located at positions close to each other to some extent may perform a process similar to the “passing communication” described above, by using the infrastructure communication, thereby complementing the “passing communication”. This is useful for a situation where there are a small number of other users having game apparatuses 10 near the user due to a regional circumstance or the like. In addition, when an AP is present in the communicable range of the game apparatus 10 in the “normal power mode”, a connection to the AP is maintained and the search for the “passing communication” cannot be performed. Thus, this configuration is also useful for preventing the passing communication from being performed in such a situation.
With regard to the instruction to stop the background communication which instruction is issued from an application, in the embodiment described above, when a stop instruction is issued from any one application, the background communication is stopped in accordance with the instruction. In another embodiment, the background communication may be stopped when the number of applications issuing instructions to stop the background communication, among applications being executed, is equal to or higher than a predetermined number, or it may be determined whether or not to stop the background communication, by majority vote.
With regard to the application counter 507, in the embodiment described above, a stop instruction can be issued by each program constituting an application. Thus, the value of each counter included in the application counter 507 is 2 or more in some cases. However, the present invention is not limited thereto, and, for example, a flag indicating whether or not a stop instruction has been issued may be used. In other words, a flag may be used which indicates that “there is a stop instruction” when even one of programs constituting an application has issued a stop instruction, and which indicates that “there is no stop instruction” when no stop instruction has been issued.
In the embodiment described above, the hand-held game apparatus has been described as an example of the information processing apparatus. However, the present invention is also applicable to and particularly useful for small-size portable information terminals such as mobile phones and PDAs. In addition, the present invention is also applicable to portable information processing terminals that are not so small but can be carried in a bag or the like, such as tablet type information terminals (tablet terminals and tablet PCs), slate PCs, and notebook computers.
In the embodiment described above, a series of processes concerning an instruction from an application to stop the background communication is performed in a single apparatus (the game apparatus 10). In another embodiment, the series of processes may be performed in an information processing system that includes a plurality of information processing apparatuses. For example, in an information processing system that includes a terminal side apparatus and a server side apparatus communicable with the terminal side apparatus via a network, a part of the series of processes may be performed by the server side apparatus. Alternatively, in an information processing system that includes a terminal side apparatus and a server side apparatus communicable with the terminal side apparatus via a network, a main process of the series of the processes may be performed by the server side apparatus, and a part of the series of the processes may be performed by the terminal side apparatus. Still alternatively, in the information processing system, a server side system may include a plurality of information processing apparatuses, and a process to be performed in the server side system may be divided and performed by the plurality of information processing apparatuses.
While the invention has been described in detail, the foregoing description is in all aspects illustrative and not restrictive. It will be understood that numerous other modifications and variations can be devised without departing from the scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2011-040830 | Feb 2011 | JP | national |