Mobile communication terminal game storage means and adopt the mobile communication terminal of this methodTechnical field
The present invention relates to the communication terminal technical field, particularly relate to a kind of recreation storage means and portable terminal thereof of communication terminal.
Background technology
Along with development of science and technology, in the last few years, the development of recreation industry has obtained significant progress, it is increasing to play, the time of finishing the recreation needs is also more and more longer, and mobile phone games also are so, simultaneously, mobile phone games possess it self characteristics again, and mobile phone games can be to download from the internet or mobile phone carries recreation.In known machine game technical field, frequent, the user can not disposablely finish recreation, needs storage midway, so that can proceed recreation next time.When user's long-time continuous was played mobile phone games, often owing to dead battery stops recreation, after the start, recreation was had to from newly, can't begin in the former completed stage again.The particularly recreation of those promotion integrations of need making a breakthrough in mobile phone games, the pass number that some recreation need be made a breakthrough is very big, sometimes may have some special circumstances, suddenly mobile phone does not have electricity can not continue to play games, but recreation at this moment may have been rushed a lot of passes, if ongoing recreation can be preserved, just can follow object for appreciation again in the time of free.Some mobile phone games is under the state of start always, when withdrawing from recreation and continuing to play games in another time, can continue to play the recreation of withdrawing from before the recreation of that state, in case but mobile phone then just can not proceed to original state from new start, play games from newly beginning.
Though the recreation on the computer at present can be accomplished ongoing recreation is all stored among the Flash, can continue after the shutdown start to play under the game state before start; But the mobile phone games on the existing market just have time-out, continue key, can only ensure that ongoing recreation temporarily is stored among the RAM, but can not keep storing ongoing state after the shutdown start.
Summary of the invention
The communication terminal that technical problem to be solved by this invention is to provide a kind of recreation storage means of communication terminal and adopts this method, it can be implemented in current game states such as the progress of still preserving current recreation when next time playing games after the game of mobile terminal outage, integration.
To achieve these goals, the invention provides a kind of mobile communication terminal with game storage, comprise controller, memory, modem, digital coding decoder, display screen, operation keyboard and game module, wherein, described game module comprises:
One recreation storage control is used to send control store instruction, and control is in the storage of playing in the operating process;
One game data module is used for by data-base recording/the read game structure of described recreation;
One flash memory is used for according to the control store instruction of recreation storage control the game structure of described recreation being stored.
Described communication terminal, wherein, described recreation storage control be one automatically the storage timer or/and be arranged on manual storage button on the described operation keyboard.
Described communication terminal, wherein, described game structure comprises that again playtime, recreation close number, game point and signature identification, described signature identification comprises that again the sign when finishing is preserved in representative fully and the sign when not preserving fully.
Described communication terminal, wherein, described flash memory comprises again and is used to store the current memory block of current game state and is used to store the last time last time memory block of game state.
Described communication terminal, wherein, described timer comprises:
One first timer is used for determining first time, sends to the described very first time reaches the time and controls the instruction that described recreation is stored, and the game structure of current recreation is stored in the current memory block;
One second timer, be used for determining second time, when reaching, sends described second time instruction that the described recreation of control is stored, the game structure of current recreation is stored in the described current memory block, simultaneously will be to described last time memory block in the game structure unloading of first time memory storage.
Described communication terminal wherein, also comprises a signature identification judge module, is used at first judging the signature identification in the described current memory block when the recreation of interrupting because of outage is restarted; If the sign when finishing for preserving fully then directly read game structure data in the current memory block is if the sign when not preserving fully then reads the game structure data in the memory block last time.
Described communication terminal wherein, also comprises a recreation store status show bar in the recreation of described display screen shows.
In order better to realize the object of the invention, the present invention also provides a kind of recreation storage means of communication terminal, comprises that one starts the step of recreation storage, is used to send control store instruction, and control is in the storage of playing in the operating process; The step of one game state storage is used for by data-base recording/read the game structure of described recreation, and according to described control store instruction the game structure of described recreation is stored in flash memory.This method is applicable to the mobile communication terminal that comprises controller, memory, modem, digital coding decoder, display screen, operation keyboard and game module.
The recreation storage means of described communication terminal wherein, comprises two kinds of storage modes: store timer automatically by one and start the recreation storing step, be i.e. storage automatically; By being arranged on the manual storage key to run recreation storing step on the described operation keyboard, i.e. manually storage.
The recreation storage means of described communication terminal, wherein, described game structure comprises that again playtime, recreation close number, game point and signature identification, described signature identification comprises that again the sign when finishing is preserved in representative fully and the sign when not preserving fully.
The recreation storage means of described communication terminal wherein, is provided for storing the current memory block of current game state respectively and is used to store the last time last time memory block of game state in described flash memory; Store in the described current memory block according to the game structure of store instruction current recreation, simultaneously will be to described last time memory block in the game structure unloading of first time memory storage.
The recreation storage means of described communication terminal wherein, also comprises a signature identification determining step, is used at first judging the signature identification in the described current memory block when the recreation of interrupting because of outage is restarted; If the sign when finishing for preserving fully then directly read game structure data in the current memory block is if the sign when not preserving fully then reads the game structure data in the memory block last time.
Technique effect of the present invention is:
The present invention is applicable to the recreation of all communication terminals, the recreation of being promoted to integration of need making a breakthrough is particularly suitable, the pass number that some recreation need be made a breakthrough is very big, sometimes may have some special circumstances, suddenly mobile phone does not have electricity can not continue to play games, but game user at this moment may have been rushed a lot of passes, if ongoing recreation can be preserved, free words just can be followed object for appreciation again.Some mobile phone games is under the state of start always, when withdrawing from recreation and continuing to play games in another time, can continue to play the recreation of withdrawing from that preceding state of recreation, in case but mobile phone just can not proceed to original state from new start back, to play games from newly beginning, the present invention can avoid the generation of this situation, solves this type of problem.
Describe the present invention below in conjunction with the drawings and specific embodiments, but not as a limitation of the invention.
Description of drawings
Fig. 1 is the communication terminal structure chart;
Fig. 2 is the game state of storage;
Fig. 3 is the situation that the store status of data among the Flash changes with timer Timer;
Fig. 4 is the automatic Stored Procedure figure of the present invention;
Fig. 5 is the manual Stored Procedure figure of the present invention;
Wherein, Reference numeral:
10 communication terminals
11 timers
12 databases
13 flash memories
14 manually store button
15 recreation store status bars
16 software systems
30 Flash
31 Addr1
32 Addr2
The specific embodiment
For specific embodiments of the invention are described better, describe in detail below:
In Fig. 1, disclosed the structure of a kind of mobile communication terminal of the present invention, comprising:communication terminal 10,timer 11,database 12,flash memory 13, manuallystore button 14, recreationstore status bar 15, software systems 16.In the mobile communication terminal that adopts said structure, can adopt the mode of automatic storage and hand storage.
Embodiment one, automatically storage mode
Mobile phone games are played to a certain degree can be stored the current game state automatically, that will just storage once here just need a timer (Timer) 11 automatically at regular intervals.
For example:
1). enter mobile phone Game module
Create_Timer();
2). beginning Game
Start_Timer();
3).Time?Out
Timer_CallBack()
{ SaveGameInfotoDB();
FlashWrite();
Start_Timer();
}
With reference to figure 1, Fig. 2, Fig. 3, when the user begins to play games,software systems 16 just pick up counting, and begin the current state (current state is made as N1) of recreation is saved indatabase 12 when reaching first Timer, deposit the appropriate address of flash memory (Flash) 13 again by data base management system.Game state can comprise playtime, and number, game point, signature identification are closed in recreation.The user continues to play games, and also is to be saved in database is deposited Flash again by data base management system appropriate address earlier with up-to-date current game state (N2) when reaching second Timer.Can also continue play games outage after in order to guarantee this moment--and promptly guarantee the storage of game state, can in Flash, store two game states, like this can avoid outage suddenly in storing process and not in the preservation.The front has been mentioned when reaching first Timer, game state is write down the appropriate address that N1 stores Flash 30 into, if this address is Addr1 31, when reaching second Timer, on the Flash address Addr1 of the game state record storage when storing up-to-date game state record N2 into first Timer, then the record of the game state on the Addr1 stores on the next address Addr2 32 of Flash.
After continuing to play games, the user will in the time of Timer, system preserve the up-to-date current state of recreation automatically in Flash., the rest may be inferred, then Flash deposits game state Nn among the Addr1 of address when TimerN, its preceding state is deposited among the Addr2, two game states of storage in Flash, this can effectively be avoided just cutting off the power supply suddenly in storing process and cause not storing successful game state, among Flash, can not find the data of the recreation of storage from new start back, thereby can read the previous game state among the Addr2.Also will preserve game state during game over.
Game state can be regarded data structure as, and the member of this game state data structure can comprise:
struct{
Playtime;
Number is closed in recreation;
Game point;
Signature identification;
};
Signature identification in the data structure can be True or False, signature identification is True when preservation finishes fully, signature identification is not False when preserving fully when meeting outage suddenly, then start is read game state data according to signature identification True when playing games again from Flash, when the signature identification among Addr1 and the Addr2 all is True, then read the game data among the Addr1.
In addition, the reaction recreation store status that the recreationstore status bar 15 on the display screen can be instant.
Fig. 4 is the automatic Stored Procedure figure of the present invention.This automatic Stored Procedure figure comprises following key step:
Step 100 starts recreation.The user begins to play games, and wherein comprises two kinds of situations: read the recreation progress and continue to play games and start new game.
If read recreation progress situation, then carry out following process step:
Step 110 reads the recreation progress.State according to signature identification among the Addr1 reads, if its state is True, then reads the data among the Addr1; If its state is False, then read the data among the Addr2.
Step 111 is played.The user continues to play games according to the recreation progress that reads, and at this moment, timer Timer starts, and picks up counting.
Step 112, the Timer timing is preserved.Timer arrives n timing point, automatically performs to preserve recreation progress function.If data have been saved among the Addr1 fully, then the signature identification among the Addr1 is True; If because outage or some other special circumstances occur and cause data not to be saved in fully among the Addr1 in the process of preserving, then the signature identification among the Addr1 is False.When the n time is saved in game progress data among the Addr1, the game progress data that is kept among the Addr1 for the n-1 time is dumped among the Addr2.After this user continues to play games and can circulation carry out this step.
Step 113, Exit Game.The user stops recreation, final game progress data can be preserved, and this moment is the same with the store method ofstep 112, if data have been saved among the Addr1 fully, then the signature identification among the Addr1 is True; If because outage or some other special circumstances occur and cause data not to be saved in fully among the Addr1 in the process of preserving, then the signature identification among the Addr1 is False.When being saved in final game progress data among the Addr1, the game progress data among the former Addr1 of being kept at is dumped among the Addr2.
Step 200 withdraws from recreation.
If begin to play the new game situation, then carry out following process step:
Step 120, start new game.From the beginning the user plays games, and this moment, timer started, and picked up counting.
After this carry out above-mentionedstep 112,step 113,step 200.
Embodiment two, manually storage mode
Manually storage realizes that storage needs a Timer automatically to storage is similar substantially automatically, and manually storage then needs a manually storage button 14 (referring to accompanying drawing 1).
Manually storage is in the user plays games process, and user's automatic keying is stored current game state, then only needs to handle the button that adds in the function in the game process at Onkeydown () button and handles.
Fig. 5 is the manual Stored Procedure figure of the present invention, and its key step will be with manually storing button rather than the timer except when starting the recreation storage control, and other is with storage is identical automatically.
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection domain of the appended claim of the present invention.