FORMING AND EXECUTING A COMPUTER GAME
A method of forming a computer game that is arranged to move an object along a path in a virtual environment of the computer game, wherein the method comprises steps of: (a) performing a plurality of object movement simulations for an object, wherein each simulation comprises moving that object with a respective speed along a path with a respective curvature in the virtual environment to determine whether that object can successfully travel along that path at that speed; (b) using the simulations to determine a relationship between curvature and a corresponding speed with which the object can successfully travel along a path with that curvature; and (c) storing data indicating the relationship as a part of the computer game.
Latest Codemasters Software Company Ltd. Patents:
The present invention relates to a method, apparatus and computer readable medium for forming a computer game that is arranged to move an object along a path in a virtual environment, and a method, apparatus and computer readable medium for moving an object along a path in a virtual environment of a computer game
BACKGROUND OF THE INVENTIONIt is well known to provide a computer game in which one or more virtual objects are located and moved within a virtual environment. The computer game may be arranged so that the computer (or games console) determines and controls the movement of one or more of these virtual objects around or within the virtual environment. One or more players playing the game may provide input to the computer to instruct the computer how to move one or more other virtual objects within the virtual environment. For example, the computer game may be a car racing genre game, with the computer determining how to move one or more virtual (i.e. simulated) cars along a racing track, for example by determining the course, speed, acceleration, etc. of those computer-controlled cars. A player of the game may control one or more other virtual cars by providing input to the computer, for example by providing steering, braking and acceleration commands via a controller connected to the computer.
SUMMARY OF THE INVENTIONIt would be desirable to provide an improvement in the way that the computer determines and controls the movement of objects within the virtual environment. In this way, more realistic movement of the objects within the virtual environment can be achieved, resulting in enhanced player enjoyment. Furthermore, it would be desirable to be able to provide such an improvement in the control of the movement of the objects in such a way that allows for different levels of difficulty of the game, thereby enhancing player enjoyment as the game can then be played at a skill level appropriate to the abilities of the player(s).
Embodiments of the invention limit the speed of a computer-controlled object as it travels along a curved section of a path so that the object successfully completes the curved section without leaving the boundaries of the path. It is well known that an object travelling at high speed along a path may need to reduce its speed in order to travel around bends (curves) in the path. Similarly, the speed of a computer-controlled object moving along a simulated path in a virtual environment may need to be reduced when the object encounters a bend in the path. In a racing-genre computer game, the computer-controlled object may be travelling at a high (potentially maximal) speed along straight sections of the path, so it may be necessary to reduce the object speed in order to negotiate a bend or curve. However, in order to make the game realistic and exciting for the player, it is not desirable to slow the computer-controlled object to a speed at which the player-controlled object can easily overtake.
Accordingly, embodiments of the present invention address the problem of moving the computer-controlled object at a speed that is slow enough for the object to get around the bend, but still fast enough to make the game exciting and enjoyable for the player. This is done by determining and storing mapping (or reference) data defining the relationship between multiple values of curvature and the corresponding speed with which the object can successfully travel along a section of path with that curvature. This mapping data is stored as predetermined data within the computer game. Then, during execution of the game when the object reaches a bend in the path, an indication of the curvature of the bend is used together with the stored mapping to determine a suitable speed for the object to take (travel along) the bend.
Embodiments of the invention provide different ways in which the mapping data can be determined and used to control the speed of the object as it travels along a path in a virtual environment. In this way, the mapping data is determined once and can then be used to determine a speed for the object when travelling along any curved section of path, thereby reducing the development time of the game, whilst providing more realistic object movement and enhancing the player's enjoyment of the game.
Furthermore, if the speed for the object is determined based on a higher curvature than the true curvature of the bend, the computer-controlled object is moved at a slower speed than would otherwise be determined for that bend. This slower speed can be used at lower levels of difficulty as it makes it easier for the player-controlled object to overtake the computer-controlled object. Accordingly, player enjoyment is enhanced as the game can be played at a skill level appropriate to the abilities of the player(s).
According to a first aspect of the invention, there is provided a method of forming a computer game that is arranged to move an object along a path in a virtual environment of the computer game, wherein the method comprises steps of: (a) performing a plurality of object movement simulations for an object, wherein each simulation comprises moving that object with a respective speed along a path with a respective curvature in the virtual environment to determine whether that object can successfully travel along that path at that speed; (b) using the simulations to determine a relationship between curvature and a corresponding speed with which the object can successfully travel along a path with that curvature; and (c) storing data indicating the relationship as a part of the computer game.
In this way, embodiments of the invention generate a computer game by transforming the outcomes from the simulations (or trials) into mapping data that is then included within the computer game.
In some embodiments, for a simulation, it is determined that the object successfully travelled along the path for that simulation if the object did not leave the path.
In some embodiments, for a simulation, it is determined that the object successfully travelled along the path for that simulation if a distance travelled by the object in a direction perpendicular to a direction of travel along the path is not greater than a predetermined threshold distance.
In some embodiments, the step of storing data comprises one of: storing a table of values indicating the relationship; and storing data specifying an equation defining the relationship.
In some embodiments, each simulation comprises moving the object with a respective speed along a path with a respective curvature in the virtual environment with a respective traction value that defines a degree of traction (or grip) between the object and a surface of the path to determine whether that object can successfully travel along that path at that speed with that traction value; and the step (b) comprises using the simulations to determine a relationship between traction value, curvature and a corresponding speed with which the object can travel along a path with that curvature for that traction value.
In some embodiments, the method comprises performing the steps (a), (b) and (c) for each of a plurality of different object types.
In some embodiments, the simulated object represents a vehicle (e.g. a ground vehicle) and the simulated path represents a racing track (e.g. a dirt track, a road, a racing course, etc.).
According to a second aspect of the invention, there is provided a method of moving an object along a path in a virtual environment of a computer game, the method comprising: determining an indication of a curvature of a portion of the path; determining a limit speed for the object by using predetermined reference data of the computer game together with the indication of curvature, wherein the predetermined reference data defines a relationship between curvature and a corresponding speed with which the object can successfully travel along a section of path having that curvature; and moving the object along the portion of the path, wherein moving the object comprises limiting the speed of the object based on the limit speed.
In this way, embodiments of the invention transform (at run-time or play-time) the current game status for a game object and the game environment (e.g. the object's current speed and position and the curvature of a forthcoming portion of a path), together with the mapping data, into a limit speed to which the speed of that object should be limited as the object travels around the forthcoming portion of the path.
In some embodiments, the indication of curvature is one of: a curvature of the portion of the path; a radius of curvature of the portion of the path; an average curvature along the portion of the path; and an average radius of curvature along the portion of the path.
Some embodiments further comprise adjusting the limit speed to account for a camber of the portion of the path. In some embodiments, adjusting the limit speed comprises reducing the limit speed if the portion of the path has a negative camber and increasing the limit speed if the portion of the path has a positive camber.
Some embodiments further comprise adjusting the limit speed to account for a slope of the portion of the path. In some embodiments, adjusting the limit speed comprises reducing the limit speed if the portion of the path has a downward slope with respect to the direction of movement of the object; and increasing the limit speed if the portion of the path has an upward slope with respect to the direction of movement of the object.
Some embodiments further comprise modifying the determined indication of curvature according to a current level of difficulty for the computer game.
In some embodiments, the predetermined reference data defines a relationship between a traction value, curvature and a corresponding speed with which the object can successfully travel along a section of path having that curvature for that traction value, where the traction value defines a degree of traction (or grip) between the object and a surface of that section of path; the method comprises determining an indication of a traction value representing a degree of traction (or grip) between the object and a surface of the portion of the path; and the step of determining a limit speed comprises determining a limit speed for the object by using the predetermined reference data of the computer game together with the indication of curvature and the indication of traction value.
Some embodiments then further comprise modifying the determined indication of traction value according to a current level of difficulty for the computer game.
In some embodiments, the simulated object represents a vehicle (e.g. a ground vehicle) and the simulated path represents a racing track (e.g. a dirt track, a road, a racing course, etc.).
According to a third aspect of the invention, there is provided an apparatus arranged to form a computer game, the apparatus comprising: a memory; and a processor arranged to: (a) perform a plurality of object movement simulations for an object, wherein each simulation comprises moving that object with a respective speed along a path with a respective curvature in the virtual environment to determine whether that object can successfully travel along that path at that speed; (b) use the simulations to determine a relationship between curvature and a corresponding speed with which the object can successfully travel along a path with that curvature; and (c) store in the memory data indicating the relationship as a part of the computer game.
According to a fourth aspect of the invention, there is provided an apparatus arranged to execute a computer game by moving an object along a path in a virtual environment of the computer game, the apparatus comprising a processor arranged to: determine an indication of a curvature of a portion of the path; determine a limit speed for the object by using predetermined reference data of the computer game together with the indication of curvature, wherein the predetermined reference data defines a relationship between curvature and a corresponding speed with which the object can successfully travel along a section of path having that curvature; and move the object along the portion of the path, wherein moving the object comprises limiting the speed of the object based on the limit speed.
According to a fifth aspect of the invention, there is provided a computer readable medium storing computer instructions, which, when executed by a computer, carry out the method of the above first or second aspect of the invention.
Embodiments of the invention will now be described, by way of example only, with reference to the accompanying drawings, in which:
In the description that follows and in the figures, certain embodiments of the invention are described. However, it will be appreciated that the invention is not limited to the embodiments that are described and that some embodiments may not include all of the features that are described below. It will be evident, however, that various modifications and changes may be made herein without departing from the broader spirit and scope of the invention as set forth in the appended claims.
1) OverviewThe computer game 108 comprises software (i.e. program instructions or code) which, when executed by a games system 106, carries out the functionality of the computer game 108. The computer game 108 also comprises game data for use by the software during execution of the game. This will be described in more detail later. The producer 102 generates the software and game data for the computer game 108, and forms the computer game 108 from them.
The producer 102 may comprise any system suitable for generating computer programs and/or data for the computer game 108. An example of the producer 102 will be described later with reference to
Having received a generated computer game 108 from the producer 102, the distributor 104 may provide a copy of the computer game 108 to the games systems 106 and/or users of the games systems 106 by any suitable means. For example, the distributor 104 may transmit a copy of the computer game 108 to a games system 106 via a network 110 (such as the Internet or any other communications network). Additionally or alternatively, the distributor 104 may store a copy of the computer game 108 on a storage medium 112 (such as a CD-ROM, a DVD-ROM, a Blu-Ray disc, a FLASH memory device, etc.) which may then be supplied to a user of a games system 106.
Whilst
Similarly, whilst
It will be appreciated that some embodiments may not make use of the network 110 to provide the computer game 108 to the games systems 106, relying instead on just the provision of storage media 112. Other embodiments may not make use of storage media 112 to provide the computer game 108 to the games systems 106, relying instead on just the provision of the computer game 108 via the network 110. Some embodiments may make use of both the storage media 112 and the network 110.
1.1) Overview of an Example Computer Game ProducerA computer system 200 comprises a computer 202 coupled to which is a display (or screen or monitor) 204 for the computer 202 to provide a visual output to a user of the computer system 200 and one or more input devices (such as a keyboard 206 and a mouse 208) for the computer 202 to receive input from the user. The computer 202 itself comprises one or more processors 203 (which may be any form of processor for executing program instructions or code) coupled to a memory 205 for storing data and/or computer programs. It will be appreciated that other configurations of a computer system 200 may be used as appropriate (e.g. with multiple displays 204 and/or different or additional input devices).
One or more game developers use the computer systems 200 to develop (i.e. write, prepare and create) the software and game data to produce the computer game 108, as is well-known in this field of technology. During this development process, the computer game 108 being developed may be executed on one of the games systems 210 in order to test, observe and gather data about the functionality, operation, appearance, etc. of the computer game 108 when it is executed. As such, program code and data may be transferred via the network 212 between the computer system(s) 200 and the games system(s) 210 in order for the games system(s) 210 to execute the computer game 108 under development. Similarly, data may be sent from the games system(s) 210 to the computer system(s) 200 via the network (e.g. data resulting from tests performed when executing a trial version of the computer game 108).
As such, the games system 210 may comprise any personal computer, any games console or any other such processing device that is capable of executing the computer game 108 being developed. The games system 210 may be the same type of device as the games system 106 of
It will be appreciated that other configurations of the producer 102 may be used. For example, in one embodiment, the producer 102 does not comprise the games systems 210 and relies, instead, on executing and testing a computer game 108 under development using only the computer system(s) 200 instead. The producer 102 may comprise just a single computer system 200, so that the network 212 may then be omitted.
1.2) Overview of an Example Games SystemThe games system 300 comprises a games console 302 that is arranged to execute and provide a computer game to a user (player), so that a user of the games system 300 can play the game. The games system 300 also comprises a number of peripheral devices, such as a controller 330, a display (screen or monitor) 322 and one or more speakers 320, with which the games console 302 may interface and communicate to facilitate execution and operation of the computer game 108.
The games console 302 comprises: a media interface 304, a processor 306, a network interface 308, a controller interface 310, an audio processing unit 312, a memory 314 and a graphics processing unit 316, which may communicate with each other via a bus 318. Additionally, the audio processing unit 312 and the graphics processing unit 316 may read data from, and store (or write) data to, the memory 314 directly, i.e. without having to use the bus 318, in order to improve the data access rate.
The media interface 304 is arranged to read data from one or more storage media 324, which may be removable storage media such as a CD-ROM, a DVD-ROM, a Blu-Ray disc, a FLASH memory device, etc. In particular, the media interface 304 may read one or more computer games 108 or computer programs that are stored on the storage medium 324. The media interface 304 may also read other data, such as music or video files (not shown) that may be stored on the storage medium 324. The computer game 108, programs and other data read from the storage medium 324 may be stored in the memory 314 or may be communicated via the bus 318 directly to one or more of the elements of the games console 302 for use by those elements. The media interface 304 may perform these operations automatically itself, or it may perform these operations when instructed to do so by one of the elements of the games console 302 (e.g. the audio processing unit 312 may instruct the media interface 304 to read audio data from the storage medium 324 when the audio processing unit 312 requires certain audio data).
The network interface 308 is arranged to receive (download) and/or send (upload) data across a network 326 (which may be, for example, the network 110 of
The processor 306 and/or the audio processing unit 312 and/or the graphics processing unit 316 may execute one or more computer programs of the computer game 108 in order to provide the game to the user. The processor 306 may be any processor suitable for carrying out embodiments of the invention. To do this, the processor 306 may cooperate with the audio processing unit 312 and the graphics processing unit 316. The audio processing unit 312 is a processor specifically designed and optimised for processing audio data. The audio processing unit 312 may read audio data (e.g. from the memory 314) or may generate audio data itself, and may then provide a corresponding audio output signal (e.g. with sound effects, music, speech, etc.) to the one or more speakers 320 to provide an audio output to the user. Similarly, the graphics processing unit 316 is a processor specifically designed and optimised for processing video (or image) data. The graphics processing unit 316 may read image/video data (e.g. from the memory 314), or may generate image/video data itself, and may then provide a corresponding video output signal (e.g. a series of video fields or frames according to a video format) to the display unit 322 to provide a visual output to the user.
While the speakers 320 are shown as being separate from the display unit 322 in
The user may interact with the games console 302 using one or more game controllers 330. A variety of game controllers are known and available, and they shall not be described in detail herein. The controller interface 310 is arranged to receive input signals from the game controller 330, these signals being generated by the game controller 330 based on how the user interacts with the game controller 330 (e.g. by pressing buttons on, or moving, the game controller 330). The controller interface 310 passes these input signals to the processor 306 so that the processor 306 can coordinate and provide the game in accordance with the commands issued by the user via the game controller 330. Additionally, the controller interface 310 may provide output signals to the game controller 330 (e.g. to instruct the game controller 330 to output a sound or to vibrate) based on instructions received by the controller interface 310 from the processor 306.
While the game controller 330 is shown as being separate from the games console 302 in
Embodiments of the invention relate to computer games in which one or more virtual objects are located within a virtual environment of, and provided by, the computer game 108. The term “virtual environment” means a simulation or representation of a part of a real physical, or an imaginary, universe, world, space, place, location or area, i.e. the virtual environment represents and provides a computer-generated arena in which the game is to be played. The term “virtual object” then refers to a simulation or representation of an object, person, animal, vehicle, item or article present and located within the simulated arena of the virtual environment.
In such games, the games console 302, under the control of the processor 306 executing one or more instructions provided by the computer game 108, determines and controls the movement of one or more of the virtual objects within the virtual environment, e.g. in terms of the path (route or course), speed (or velocity), acceleration, etc. of those objects. In other words, embodiments of the invention provide a method of moving an object within a virtual environment. These objects shall be referred to as computer-controlled objects (although they may also be referred to as Artificial Intelligence (AI) objects or robot objects). Additionally, one or more users may be responsible for controlling the movement of one or more other virtual objects within the virtual environment, e.g. by providing input to the processor 306 via one or more game controllers 330. Such objects shall be referred to as player-controlled objects.
For example:
-
- The virtual environment could represent one or more buildings (which may be fictitious) and the virtual objects could comprise computer-controlled objects representing enemy soldiers that are to be moved within and around the simulated buildings, as well as a player-controlled object representing a player's character.
- The virtual environment could represent space (with planets, stars, etc.) and the virtual objects could comprise computer-controlled objects representing spacecraft and meteors that are to moved within the virtual environment, as well as a player-controlled object representing a player's spaceship.
- The virtual environment could represent an ocean or other body of water (or the air), and the virtual objects could represent objects such as fish, boats, submarines etc. (or birds, aeroplanes and helicopters etc.).
- The virtual environment could represent a racing course (or track) and the virtual objects may comprise computer-controlled and player-controlled objects representing objects to be raced along the race course. The race course could be a racing course for vehicles (such as cars, trucks, lorries, motorcycles, aeroplanes, etc.), with the virtual objects then representing cars, trucks, lorries, motorcycles, aeroplanes, etc. accordingly. Alternatively, the racing course could be a racing course for animals (such as horses or dogs), with the objects then representing the corresponding animal.
In general, though, embodiments of the invention provide a method of controlling the movement of an object within a virtual environment, i.e. embodiments of the invention provide a method for determining how to move a virtual computer-controlled object within the virtual environment. This may be carried out by the games console 302 executing one or more routines or functions forming part of one or more computer programs of the computer game 108.
For this, the games console 302, executing the programs of the computer game 108, causes the computer-controlled object(s) to move along (or travel along or follow or progress along) a path (i.e. a route, course, trajectory, road, etc.) in the virtual environment of the computer game 108. The path may consist of a number of splines, curves or lines plotting a course through the virtual environment. The path may be a path in a plane, i.e. a path in two-dimensional virtual space. The path may be a path in three-dimensional virtual space having an altitude component (e.g. a path on a three-dimensional surface).
The path may have a curved section (i.e. a corner, a bend, etc.), for example if the path is a closed loop. The curved section may be an angled section (such as a right-angle, or some other angle), in which case the curve need not be a “smooth” curve. Additionally, or alternatively, some curved sections of the path may be smoothly curved. Thus, the term “curved section” is intended to distinguish a portion or part of the path that is distinct from a substantially straight section of the path, e.g. the direction of travel along the curved section changes by over a threshold amount during that curved section.
As is known, in the real world, an object travelling along a substantially straight section of path will usually need to reduce its speed when entering a subsequent curved section of path in order to successfully negotiate the curved section of path. In other words, the object can usually travel along a straight section of a path more quickly than it can travel along a curved section of the path whilst remaining within the bounds of the path (i.e. whilst staying on the path without crossing over one of the edges or boundaries of the path). As the computer game 108 usually intends to mimic (or at least be loosely based upon) the physical properties of the real world, embodiments of the invention take this reduction in speed into account when controlling the movement of an object around a curved section of a path.
When the computer-controlled object encounters, or reaches, such a curved section of the path, then the computer game 108 causes the games console 302 to limit the speed of that computer-controlled object, i.e. the velocity of that object is controlled (set or managed). The computer game 108 does this in a manner to ensure that that object successfully negotiates that curved section of path. The object may be considered to have successfully negotiated the curved section of path if one or more of the following apply: (a) the object has travelled along the curved section of path whilst staying on the path (i.e. remaining within the path boundaries); (b) the object has travelled along the curved section of path without sliding along a surface of the path more than an allowable amount i.e. without travelling in a direction other than the intended route (e.g. perpendicular to the intended route) along the curved section of path, or without travelling more than a predetermined threshold amount in a direction other than the intended route (e.g. perpendicular to the intended route) so that a predetermined threshold amount of skidding or sliding is allowable (for example a car travelling on a racing track may skid a certain amount when travelling around a bend, but if the car skids too much it will not successfully negotiate the bend); (c) the object has travelled along the curved section of path without colliding with barriers (e.g. trees, objects, safety barriers, hedges, etc.) along an edge (boundary or side) of the path; and (d) the object has travelled along the curved section of path such that the object can travel on to a subsequent section of the path in a continuous fashion.
The point at which the games consoles 302 starts reducing the speed of the object (i.e. at which games console 302 instigates braking or deceleration for the virtual object) in order for the object to be at a suitable speed for successfully travelling along the curved section 410 of the path 400 can be called the “braking line”. The position of the braking line will vary depending on many factors including but not limited to: (a) the initial speed of the object along the straight path section 412a prior to the curved section 410; (b) the simulated grip or friction between the object and a surface of the path 400; (c) the curvature (or radius of curvature) of the curved section 410 of the path 400; and (d) the simulated ability of the object to decelerate (e.g. how good the brakes on a virtual car actually are). In
The generation of the computer game 108 may be performed in whole or in part by one or more computer systems 200 of
The processor 500 is arranged to execute, or provide, a game generation module 502, an environment generation module 504 and an object control module 506 in communication with each other. The game generation module 502, the environment generation module 504 and the object control module 506 may be provided, for example, by the processor 500 executing one or more computer programs 552 stored in the memory 550. The purpose and function of these modules shall be described in more detail later.
The memory 550 stores various components 560 for forming a part of the computer game 108. These components 560 will have been prepared by the game developer executing the programs 552. The specific form of the components 560 will depend on the particular nature of the computer game 108 being generated, but may include, for example:
-
- One or more computer programs 562 for execution by a games system 106 in order to execute or run the computer game 108.
- Various game-related data 564, for use by one or more of the computer programs 562 when executed by a games system 106 in order to provide the computer game 108. The game-related data 564 may include, for example:
- Audio data 566 (such as music or speech) for audio output during execution of the computer game 108.
- Video and image data 568 for visual output during execution of the computer game 108.
- Path data 570 specifying the geometry of a path 400 for the computer game 108. The computer game 108 may involve multiple paths 400 (e.g. different racing courses), in which case there may be multiple instances of the path data 570, each with data defining the geometry of a respective path 400. The path data 570 may define a path 400 in a variety of ways, such as the parameters of one or more splines, curves, lines and slopes, the coordinates of various parts of the path, locations of various points of interests (e.g. the starting point or line and ending point or line for a curved section of the path 400), data defining a width of the path, data defining a preferred route through the path (e.g. a so-called racing line which represents a route for travelling along the path in the shortest time), etc. as is well-known in this field of technology.
- Object data 572 specifying the properties of one type of virtual object within the virtual environment of the computer game 108. The computer game 108 may involve multiple types of virtual object (e.g. different models of car), in which case there may be multiple instances of the object data 572, each with data defining the properties of a respective object type. The object data 572 may itself include the following kinds of data:
- Appearance data 574 specifying how the respective object should be visually rendered (e.g. shape, colour, texture, etc.).
- Dynamics data 576 specifying how the respective object can move (e.g. maximum speed, possible rates of acceleration and deceleration, turning angles, aerodynamic properties such a drag factors, grip properties such as the degree of friction between the object and one or more surfaces of one or more paths 400, etc.)
- Mapping data 578, the purpose of which shall be described in more detail below.
As described in more detail below, embodiments of the invention generate and make use of mapping data 578. The mapping data 578 for an object defines a relationship between the curvature of a path and a corresponding speed with which that object can successfully travel along (or negotiate) a path having that curvature. The term curvature can be understood in its mathematical sense, i.e. the ratio of the change in the angle of a tangent that moves over a given arc to the length of the arc (although other mathematical definitions may be used, for example the curvature at a point on an arc/path is the inverse of the radius of the osculating circle for that point). However, in this description the term “curvature” may also be understood to mean any metric for measuring deviation from a straight line, or any metric for measuring how much a path bends or curves. We note here that this description uses the term “curvature”, but the term “radius of curvature” could equally be used instead as the values curvature and radius of curvature are simply reciprocals of each other. The curvature may be the curvature of a line along the path (e.g. a racing line along the path or an edge of the path or a line along the middle/centre of the path).
The mapping data 578 for an object may simply be in the form of a table that specifies, for a number of different curvature values, a corresponding speed value or a table that specifies, for a number of different speed values, a corresponding curvature value. Then, during actual game play, for an arbitrary curvature, a corresponding speed may be deduced from these tables (e.g. by interpolation or curve fitting). Alternatively, the mapping data 578 for an object may be data defining a formula or equation specifying how the speed at which the object can successfully negotiate a curved section of path with a specific curvature depends on that curvature value.
In summary, the game generation module 502 is responsible for the overall generation of the game. The game developers, using the game generation module 502, may generate the various components 560 for the computer game 108 and then combine and/or store them together to produce the final computer game 108 for provision to the computer game distributor 104 (as is well known in this field of technology).
To generate the mapping data 578, the game generation module 502 makes use of the environment generation module 504 and the object control module 506. The environment generation module 504 contains the functionality to generate a simulated path within a virtual environment for the computer game 108 with one or more virtual objects therein. The environment generation module 504 may use one or more of the game components 560 for this. The object control module 506 contains the functionality to move an object within the generated virtual environment (e.g. based on the dynamics data 576 for that object and the physical properties of the virtual environment being simulated, such as gravity, friction, air resistance, etc., which may involve, for example, code and functionality to simulate the laws of Newtonian mechanics). The game generation module 502 then performs a number of trials or simulations, in which the environment generation module 504 provides a number of paths that have curved sections having different respective curvatures and in which the object control module 506 moves one or more objects along these paths at various speeds to determine the speeds at which those objects can, or cannot, successfully negotiate the curved sections of those paths. Based on these various trials, the game generation module 502 then generates, and stores in the memory 550, the mapping data 578. This is described in more detail below with respect to
The computer game 108 may make use of one or more types of object. For example, a car racing game may simulate different types of cars. At a step S702, the game generation module 502 selects one of the one or more types of virtual object for the computer game 108.
Then, at a step S704, the game generation module 502 uses the environment generation module 504 and the object control module 506 to determine (or generate or calculate) corresponding mapping data 578 for that object type. This shall be described in more detail later with reference to
Next, at a step S706, the game generation module 502 determines whether the computer game 108 makes use of (or may simulate) another type of object for which corresponding mapping data 578 is also to be determined. If such another type of object exists, then processing returns to the step S702 at which that another type of object is selected by the game generation module 502, so that at the step S704, mapping data corresponding to that another type of object is generated. Processing then continues at the step S706. If, on the other hand, no further object types exist for which mapping data 578 still needs to be generated, then processing continues at a step S708.
At the step S708, the game generation module 502 uses the generated mapping data 578 for the various object types to generate the computer game 108. This may involve, for example, compiling, linking and building the various computer programs 562 for the computer game 108 and storing those computer programs 562 along with the various game-related data 564 (including the generated mapping data 578), as is well-known in this field of technology. However, it will be appreciated that the steps of compiling, linking and building may have been performed previously, in which case the new computer game is generated by adding this game-related data 564 to the already-existing game.
Then, at a step S710, the generated computer game 108 may be provided to the distributor 104 for distribution to games systems 106 and users thereof as described above.
At a step S802, the game generation module 502 sets the speed V for the object to a maximum speed Vmax. This maximum speed may correspond to the maximum speed with which the object can move (and may therefore depend on the particular type of object being considered); the maximum speed for a given level of difficulty or skill for the computer game 108; or any other maximum speed specified (or set) by the developer of the computer game 108.
At a step S804, the game generation module 502 sets the curvature K for the curved section(s) 604 of the path 600 to a maximum curvature Kmax. The maximum curvature may correspond to the maximum curvature which can be represented within the computer game 108; the maximum curvature for a given level of difficulty or skill for the computer game 108; or any other maximum curvature specified (or set) by the developer of the computer game 108 (for example based on a maximum intended tightness for a bend). The game generation module 502 then instructs the environment generation module to generate or simulate the path 600, where the curvature of the curved sections 604 is the value K.
At a step S806, the game generation module 502 instructs the object control module 506 to move the object with the speed V around a curved section 604 of the simulated path 600 whose curvature is the value K.
At a step S808, the game generation module 502 determines whether or not the object, moving at speed V, successfully negotiated the curved section 604 of the path 600 with curvature K. This may involve, for example, determining whether or not the object, in travelling around the whole of this curved section 604 of path 600 at the speed V, has remained on the path 600 (i.e. has stayed between the outer boundary 602a and the inner boundary 602b), in which case the object has successfully negotiated the curved section 604, or has departed from the path 600 (i.e. crossed over the outer boundary 602a or the inner boundary 602b), in which case the object has not successfully negotiated the curved section 604. Additionally, or alternatively, this may involve determining whether or not the object, in travelling around the whole of this curved section 604 of path 600 at the speed V, skidded or slid along the surface of the path 600 less than a predetermined amount, in which case the object has successfully negotiated the curved section 604, or has skidded or slid more than the predetermined amount, in which case the object has not successfully negotiated the curved section 604. Additionally, or alternatively, this may involve determining whether or not the object, in travelling around the whole of this curved section 604 of path 600 at the speed V, avoided other objects along or features of the curved section 604 such barriers at the edges of the curved section 604 (i.e. the object did not “crash”), in which case the object has successfully negotiated the curved section 604, or has collided or made contact with such other objects along or features of the curved section 604 (i.e. the object has “crashed”), in which case the object has not successfully negotiated the curved section 604. It will be appreciated that other methods for determining whether or not the object has successfully negotiated the curved section 604 may be used as appropriate.
If it is determined at the step S808 that the object has successfully negotiated the curved section 604 of the path 600, then processing continues at a step S818, at which the game generation module 502 stores the pair of values of K and V as part of the mapping data 578 for this object. Processing then continues at a step S814, which shall be described shortly.
If on the other hand, it is determined at the step S808 that the object has not successfully negotiated the curved section 604 of the path 600, then processing continues at a step S810, at which the game generation module 502 decreases the curvature K by a predetermined amount, to signify that the object was not able to successfully travel around a bend of the previous curvature value at the speed V, i.e. such a bend is too sharp at that speed V, and hence the bend should be made less sharp. The environment generation module 504 then re-generates the path 600 to have curved sections 604 having a curvature of the new curvature value K.
Then, at a step S812, the game generation module 502 compares the curvature K to a minimum curvature Kmin. The minimum curvature may correspond to any minimum curvature specified by the developer (e.g. the minimum curvature allowable for a given level of difficulty). This minimum curvature may correspond to a straight line path. If it is determined that the curvature K is not less than the minimum curvature Kmin, then processing returns to the step S806 at which the object control module 506 attempts to move the object at the speed V along a curved section 604 of the path 600 having the decreased curvature value K.
If the curvature K is less than the minimum curvature Kmin then processing continues at the step S814, at which the game generation module 502 decreases the speed V by a predetermined amount.
Then, at a step S816, the game generation module 502 compares the speed of the object V to a minimum speed allowable Vmin. The minimum speed may correspond to any minimum speed specified by the developer (e.g. the minimum speed allowable for a given level of difficulty). If the speed V is less than the minimum speed Vmin, the method exits at a step S820; otherwise, processing returns to the step S804 at which the processing is repeated in respect of the newly decreased speed value V.
In this way, a plurality of pairs of speed V and corresponding curvature K are determined to specify the mapping data 578 for that object type. The steps of the flowchart illustrated in
At a step S902, the game generation module 502 sets the curvature K for the curved section(s) 604 of the path 600 to a maximum curvature Kmax. The maximum curvature may correspond to the maximum curvature which can be represented within the computer game 108; the maximum curvature for a given level of difficulty or skill for the computer game 108; or any other maximum curvature specified (or set) by the developer of the computer game 108 (for example based on a maximum intended tightness for a bend). The game generation module 502 then instructs the environment generation module 504 to generate or simulate the path 600, where the curvature of the curved sections 604 is the value K.
At a step S904, the game generation module 502 sets the speed V for the object to a maximum speed Vmax. This maximum speed may correspond to the maximum speed with which the object can move (and may therefore depend on the particular type of object being considered); the maximum speed for a given level of difficulty or skill for the computer game 108; or any other maximum speed specified (or set) by the developer of the computer game 108.
At a step S906, the game generation module 502 instructs the object control module 506 to move the object with the speed V around a curved section 604 of the simulated path 600 whose curvature is the value K.
At a step S908, the game generation module 502 determines whether or not the object, moving at speed V, successfully negotiated the curved section 604 of the path 600 with curvature K. This may be performed in the same way as the step S808 of
If it is determined at the step S908 that the object has successfully negotiated the curved section 604 of the path 600, then processing continues at a step S918, at which the game generation module 502 stores the pair of values of K and V as part of the mapping data 578 for this object. Processing then continues at a step S914, which shall be described shortly.
If, on the other hand, it is determined at the step S908 that the object has not successfully negotiated the curved section 604 of the path 600, then processing continues at a step S910, at which the game generation module 502 decreases the speed V by a predetermined amount, to signify that the object was not able to successfully travel around a bend of curvature K at the speed V, i.e. such a bend is too sharp at that speed V, and hence the speed should be reduced.
Then, at a step S912, the game generation module 502 compares the speed of the object V to the minimum speed allowable Vmin. The minimum speed may correspond to any minimum speed specified by the developer (e.g. the minimum speed allowable for a given level of difficulty). If the speed V is not less than the minimum speed Vmin then processing returns to the step S906 at which the object control module 506 attempts to move the object at the reduced speed V along a curved section 604 of the path 600 having the curvature value K.
If the speed V is less than the minimum speed Vmin then processing continues at the step S914, at which the game generation module 502 decreases the curvature K by a predetermined amount. The environment generation module 504 then re-generates the path 600 to have curved sections 604 having a curvature of the new curvature value K.
Then, at a step S916, the game generation module 502 compares the curvature K to a minimum curvature Kmin. The minimum curvature may correspond to any minimum curvature specified by the developer (e.g. the minimum curvature allowable for a given level of difficulty). This minimum curvature may correspond to a straight line path. If it is determined that the curvature K is less than the minimum curvature Kmin, the method exits at a step S920; otherwise, processing returns to the step S904 at which the processing is repeated in respect of the newly decreased curvature value K.
In this way, a plurality of pairs of speed V and corresponding curvature K are determined to specify the mapping data 578 for that object type. The steps of the flowchart illustrated in
It will be appreciated that, in the physical world, the speed at which an object resting on a path (such as a car on a road) can travel around a curved path will depend not only on the speed of the object and the curvature of the curved path, but will also depend on the traction or friction between the object and the path, or, put another way, the amount of grip between the object and the path. It will be appreciated that the term “grip” or “traction” can represent one or more properties of (i) a surface of the path (e.g. a coefficient of friction or a type of substance of the surface) and/or (ii) a surface of the object moving along the path (e.g. a coefficient of friction or a type of substance of the surface), and/or (iii) the interaction of a surface of the path with a surface of the object, where these properties affect how the object may travel along the path. As such, some embodiments of the invention model this aspect of the physical world by taking into account this grip factor, as discussed below. Other embodiments, however, may disregard this grip factor (e.g. when the virtual environment represents space, such that friction does not occur).
The grip or traction G represents a degree (or simulation or measure or amount) of the grip (or traction, hold, friction, etc.) between the object and a path 600 (or a surface thereof). During actual play of the computer game 108 itself, the grip may depend on a number of factors, such as one or more of: (a) features of the path 600, for example the virtual material forming the surface of the path 600 or whether a “slippery substance” (such as “virtual oil”) or a “sticky substance” is present on the surface of the path 600; (b) features of the object (and therefore features of the particular type of object), for example if the object is a vehicle, the grip G may depend on the type of tyres, the simulated weight, or other features of the vehicle; (c) any other conditions which may affect the speed with which the object can successfully negotiate a curved section 604 of the simulated path 600, for example simulated weather conditions such as a side-wind, a degree of bumpiness or unevenness of a surface of the simulated path 600 (e.g. size and frequency of bumps), etc.
At a step S1001, the game generation module 502 sets the grip G to a minimum grip Gmin. The minimum grip Gmin may correspond to the minimum grip which can be represented within the computer game 108; the minimum grip for a given level of difficulty or skill for the computer game 108; or any other minimum grip specified (or set) by the developer of the computer game 108 (for example based on the minimum intended grip between the path surface and the object).
At a step S1002, the game generation module 502 sets the speed V for the object to a maximum speed Vmax. This maximum speed may correspond to the maximum speed with which the object can move (and may therefore depend on the particular type of object being considered); the maximum speed for a given level of difficulty or skill for the computer game 108; or any other maximum speed specified (or set) by the developer of the computer game 108.
At a step S1004, the game generation module 502 sets the curvature K for the curved section(s) 604 of the path 600 to a maximum curvature Kmax. The maximum curvature may correspond to the maximum curvature which can be represented within the computer game 108; the maximum curvature for a given level of difficulty or skill for the computer game 108; or any other maximum curvature specified (or set) by the developer of the computer game 18 (for example based on a maximum intended tightness for a bend). The game generation module 502 then instructs the environment generation module 504 to generate or simulate the path 600, where the curvature of the curved section(s) 604 is the value K. The environment generation module 504 does this in a manner such that the simulated grip between the object and the path 600 is in accordance with the grip value G (e.g. by varying the simulated nature of the surface of the path 600, or by varying the simulated nature of a surface of the object that is in contact with the path 600, or by varying a simulated weight of the object).
At a step S1006, the game generation module 502 instructs the object control module 506 to move the object with the speed V around a curved section 604 of the simulated path 600 whose curvature is the value K, such that the grip associated with the object moving along the curved section 604 of the simulated path 600 is the value G.
At a step S1008, the game generation module 502 determines whether or not the object, moving at speed V, successfully negotiated the curved section 604 of the path 600 with curvature K, when the grip associated with the object moving along the curved section 604 of the path 600 is G. This may be performed in the same way as the step S808 of
If it is determined at the step S1008 that the object has successfully negotiated the curved section 604 of the path 600, then processing continues at a step S1018 at which the game generation module 502 stores the values of G, K and V as part of the mapping data 578 for this object. Processing then continues at a step S1014, which shall be described shortly.
If on the other hand, it is determined at the step S1008 that the object has not successfully negotiated the curved section 604 of the path 600, then processing continues at a step S1010, at which the game generation module 502 decreases the curvature K by a predetermined amount, to signify that the object was not able to successfully travel around a bend of the previous curvature value at the speed V, when the associated grip is G, i.e. such a bend is too sharp at that speed V and grip G, and hence the bend should be made less sharp. The environment generation module 504 then re-generates the path 600 to have curved sections 604 having a curvature of the new curvature value K.
Then, at a step S1012, the game generation module 502 compares the curvature K to a minimum curvature Kmin. The minimum curvature may correspond to any minimum curvature specified by the developer (e.g. the minimum curvature allowable for a given level of difficulty). This minimum curvature may correspond to a straight line path. If it is determined that the curvature K is not less than the minimum curvature Kmin, then processing returns to the step S1006 at which the object control module 506 attempts to move the object at the speed V along a curved section 604 of the path 600 having the decreased curvature value K.
If the curvature K is less than the minimum curvature Kmin then processing continues at the step S1014, at which the game generation module 502 decreases the speed V by a predetermined amount.
Then, at a step S1016, the game generation module 502 compares the speed V of the object to a minimum speed allowable Vmin. The minimum speed may correspond to any minimum speed specified by the developer (e.g. the minimum speed allowable for a given level of difficulty). If the speed V is not less than the minimum speed Vmin processing returns to the step S1004 at which the processing is repeated in respect of the newly decreased speed value V.
If the speed V is less than the minimum speed Vmin then processing continues at a step S1020, at which the game generation module 502 increases the grip G by a predetermined amount.
Then, at a step S1022, the game generation module 502 compares the grip G to a maximum grip allowable Gmax. The maximum grip Gmax may correspond to any maximum grip specified by the developer (e.g. the maximum grip allowable for a given level of difficulty). If the grip G is greater than the maximum grip Gmax, the method exits at a step S1024; otherwise, processing returns to the step S1002 at which the processing is repeated in respect of the newly increased grip value G.
In this way, a plurality of triples of grip value G, speed value V and curvature value K are determined to specify the mapping data 578 for that object. These steps may then be repeated for each of a plurality of different object types.
At a step S1101, the game generation module 502 sets the speed V for the object to a maximum speed Vmax. This maximum speed may correspond to the maximum speed with which the object can move (and may therefore depend on the particular type of object being considered); the maximum speed for a given level of difficulty or skill for the computer game 108; or any other maximum speed specified (or set) by the developer of the computer game 108.
At a step S1102, the game generation module 502 sets the curvature K for the curved section(s) 604 of the path 600 to a maximum curvature Kmax. The maximum curvature may correspond to the maximum curvature which can be represented within the computer game 108; the maximum curvature for a given level of difficulty or skill for the computer game 108; or any other maximum curvature specified (or set) by the developer of the computer game 108 (for example based on a maximum intended tightness for a bend).
At a step S1104, the game generation module 502 sets the grip G, associated with the object moving along the curved sections 604 of the path 600, to a minimum grip Gmin. The minimum grip may correspond to the minimum grip which can be represented within the computer game 108; the minimum grip for a given level of difficulty or skill for the computer game 108; or any other minimum grip specified (or set) by the developer of the computer game 108 (for example based on the minimum intended grip between the path surface and the object). The game generation module 502 then instructs the environment generation module 504 to generate or simulate the path 600, where the curvature of the curved section(s) 604 is the value K. The environment generation module 504 does this in a manner such that the simulated grip between the object and the path 600 is in accordance with the grip value G (e.g. by varying the simulated nature of the surface of the path 600, or by varying the simulated nature of a surface of the object that is in contact with the path 600, or by varying a simulated weight of the object).
At a step S1106, the game generation module 502 instructs the object control module 506 to move the object with the speed V around a curved section 604 of the simulated path 600 whose curvature is the value K, such that the grip associated with the object moving along the curved section 604 of the simulated path 600 is the value G.
At a step S1108, the game generation module 502 determines whether or not the object, moving at speed V, successfully negotiated the curved section 604 of the path 600 with curvature K, when the grip associated with the object moving along the curved section 604 of the path 600 is G. This may be performed in the same way as the step S808 of
If it is determined at the step S1108 that the object has successfully negotiated the curved section 604 of the path 600, then processing continues at a step S1118 at which the game generation module 502 stores the values of G, K and V as part of the mapping data 578 for this object. Processing then continues at a step S1114, which shall be described shortly.
If on the other hand, it is determined at the step S1108 that the object has not successfully negotiated the curved section 604 of the path 600, then processing continues at a step S1110, at which the game generation module 502 increases the grip G by a predetermined amount, to signify that the object was not able to successfully travel around a bend of curvature K, at the speed V, with the previous associated grip G, i.e. such a bend is too sharp at that speed V and grip G, and hence the grip should be increased.
Then, at a step S1112, the game generation module 502 compares the grip G to a maximum grip allowable Gmax. The maximum grip Gmax may correspond to any maximum grip specified (set) by the developer (e.g. the maximum grip allowable for a given level of difficulty). If it is determined that the grip G is not greater than the maximum grip Gmax, then processing returns to the step S1106 at which the object control module 506 attempts to move the object at the speed V along a curved section 604 of the path 600, such that the grip associated with the object moving along the curved section 604 of the path 600 is the new value G.
If the grip G is greater than the maximum grip Gmax then processing continues at the step S1114, at which the game generation module 502 decreases the curvature K by a predetermined amount. The environment generation module 504 then re-generates the path 600 to have curved sections 604 having a curvature of the new curvature value K.
Then, at a step S1116, the game generation module 502 compares the curvature K to a minimum curvature allowable Kmin. The minimum curvature may correspond to any minimum curvature specified by the developer (e.g. the minimum curvature allowable for a given level of difficulty). If the curvature K is not less than the minimum curvature Kmin, processing returns to the step S104 at which processing is repeated in respect of the newly decreased curvature value K.
If the curvature K is less than the minimum curvature Kmin then processing continues at a step S1120, at which the game generation module 502 decreases the speed V by a predetermined amount.
Then, at a step S1122, the game generation module 502 compares the speed of the object V to a minimum speed allowable Vmin. The minimum speed may correspond to any minimum speed specified by the developer (e.g. the minimum speed allowable for a given level of difficulty). If the speed V is less than the minimum speed Vmin, the method exits at a step S1124; otherwise, processing returns to the step S1102 at which the processing is repeated in respect of the newly decreased speed value V.
In this way, a plurality of triples of speed value V, curvature value K and grip value G are determined to specify the mapping data 578 for that object. These steps may then be repeated for each of a plurality of different object types.
It will be appreciated that in
It will be appreciated that the foregoing descriptions of methods for determining the mapping data 578 are exemplary only and that any suitable method for determining the mapping data 578 may be used. In particular the order of changing the values G, V and K may be changed. Additionally or alternatively a method for determining the mapping data 578 may begin by setting V and/or K respectively to Vmin and/or Kmin and these values may then be increased in order to determine the mapping data. Similarly, a method for determining the mapping data 578 may begin by setting the value G to Gmax and subsequently decreasing the value G in order to determine the mapping data 578. Furthermore, it will be appreciated that whilst the foregoing examples describe determining mapping data 578 on an object-by-object basis, a mapping may also be determined for a single object and this mapping used for all objects of interest. Moreover, the foregoing examples mentioned the increments or decrements of speed V, curvature K and grip G by predetermined amounts. However, this is purely exemplary and predetermined amounts need not be used—for example, more data points may be determined for lower curvature values than for higher curvature values, so that the decrements of the curvature K may themselves lessen as the curvature K is reduced.
As an alternative to the above-mentioned methods, some embodiments of the invention may simply specify a plurality of predetermined values for one of the variables V or K (or one or more of V, K and G if grip is being used too) and then determine values for the other variables. For example, a plurality of predetermined pairs of K and G may be specified, and then the processing at the step S704 may simply determine corresponding values for V.
In any case, the processing at the step S704 generates a plurality of pairs (V,K) or triples (V,K,G) such that an object can successfully travel at a speed V around a curved section 604 of the path 600 with curvature K (and with a grip G when grip is being used). This speed V is, preferably, a maximum speed at which that object can successfully travel around that curved section 604.
Similarly,
It will be appreciated that the mapping data 578 may be stored in the memory 550 and as part of the computer game 108 in a variety of formats.
For example, the mapping data 578 may specify a number of the example data points 1208a (or 1208b) to indicate the relationship between the curvature, speed and (where applicable) grip. In particular, for example, the mapping data 578 may comprise, for each grip value G1, G2 and G3, a separate table comprising a number of curvature values K and the corresponding speed values V.
Alternatively, the mapping data 578 may simply comprise a number of pairs comprising a curvature value K and a corresponding speed value V, and/or a number of triples comprising a curvature value K, a corresponding speed value V, and a corresponding grip value G.
When the grip value G is not being used, then the various pairs of curvature K and speed V define a curve in the K-V coordinate system. As such, the mapping data 578 may comprise one or more parameters that specify a formula or equation for (or at least approximating) that curve in the K-V coordinate system. The parameters may specify, for example, a polynomial or an exponential curve. When the grip value G is being used, then the mapping data 578 may comprise, for each of a plurality of grip values, one or more corresponding parameters that specify a formula or equation for (or at least approximating) the curve associated with that grip value in the K-V coordinate system.
Similarly, when the grip value G is being used, then the various triples of curvature K, speed V and grip G define a surface in the K-V-G coordinate system. As such, the mapping data 578 may comprise one or more parameters that specify a formula or equation for (or at least approximating) that surface in the K-V-G coordinate system.
3) Executing the Computer Game According to an Embodiment of the InventionThe memory 314 stores the various components 560 of the computer game 108. These components 560 were described in detail earlier with reference to
The processor 306 is arranged to execute, or provide, a game execution module 1302, an environment generation module 1304 and an object control module 1306 in communication with each other. The game execution module 1302, the environment generation module 1304 and the object control module 1306 are provided by the processor 306 executing one or more of the computer programs 562 that are part of the various components 560 stored in the memory 314 as part of the computer game 108.
In summary, the game execution module 1302 is responsible for the overall execution (provision) of the game. The game execution module 1302 makes use of the environment generation module 1304 and the object control module 1306 together with the game data 564 to execute the computer game 108.
The environment generation module 1304 essentially performs the same, or similar, function as the environment generation module 504 of
The object control module 1306 essentially performs the same, or similar, function as the object control module 506 of
As an overview, during game execution, the game execution module 1302 uses the mapping data 578 to determine the speed with which a computer-controlled object can successfully negotiate a curved portion (section) 410 of the simulated path 400 (in particular, a curved portion 410 that that object is approaching and is about to encounter). Based on the determined speed, the object control module 1306 then moves the object along that curved section 410 of the path 400, which includes limiting the speed of the object during that curved section 410 to the determined speed. This is described in more detail below with respect to
At a step S1404, the environment generation module 1304 generates an output image to represent a view of the simulated environment (including some or all of the path 400 and, potentially, some of the objects in the virtual environment).
Then, at a step S1406, the game execution module 1302 outputs the image generated at the step S1404.
Processing then continues at a step S1408, at which the game execution module 1302 determines if the computer game 108 is over. If the computer game 108 is determined to be over at the step S1408, then processing moves to a step S1412, at which the game ends.
If on the other hand, the game execution module 1302 determines that the game is not over, then processing continues at a step S1410 at which the game execution module 1302 uses the object control module 1306 to move one or more objects in the virtual environment along the simulated path 400, i.e. to update (change) the position of these objects within the virtual environment. This may be based on the dynamics data 576 for the object(s), the current position of the object(s) within the virtual environment, and the mapping data 578 for the object(s). This shall be described in more detail later with reference to
It will be appreciated that the movement of the object(s) within the virtual environment will also depend on other factors, such as input from a user (player) of the computer game 108 and game rules specifying tactics or characteristics of the object(s). However, for the sake of clarity only the steps of executing the computer game 108 which are related to the current invention are shown here.
At a step S1500, the game execution module 1302 chooses a first object. Then at a step S1502, the game execution module 1302 uses the object data 572 to identify the type of object. The type of object may, for example, be identified from a list of possible objects defined by the developer of the computer game 108, and identification may be based on a specified feature of the object or the name of the object etc.
Next, at a step S1504, the game execution module 1302 determines the current speed V, with which the object is moving along the path 400. Then, at a step S1506, the game execution module 1302 determines the current position of the object on the path 400. The current speeds and positions of the objects in the virtual environment may be stored as data in the memory 314.
At a step S1508, the game execution module 1302 uses the path data 570, the current object speed Vc and the current object position to determine if the section of the path 400 ahead of the current position of the object includes a curved section 410 of the path 400. For example, the game execution module 1302 may determine, based on the current speed Vc and position of the object, whether that object will encounter a curved section 410 of the path 400 within a predetermined time period (e.g. a predetermined number of output frames or a predetermined number of game updates), based upon an indication from the path data 570 about the location of the start of the next curved section 410 that will be encountered by the object as it moves along the path 400.
If it is determined at the step S1508 that the section of the path 400 ahead of the object does not include a curved section 410 of the path 400, then at a step S1512 the object control module 1306 updates the position of the object so that the distance between the updated position and the current position corresponds to the current speed V, of the object.
If on the other hand, it is determined at the step S1508 that the section of the path 400 ahead of the object includes a curved section 410 of the path 400, then processing continues at a step Si 510 at which the object control module 1306 may control the object speed based on the mapping data 578. This is described in more detail with reference to
At a step S1514, the game execution module 1302 determines if there is another object to be moved, i.e. if there is another object whose position must be updated. If it is determined at the step S1514 that there is another object to be moved, then at a step S1516, the game execution module 1302 selects a next object to move and processing continues at the step S1502. If, on the other hand, it is determined that there is no other object to move, then processing moves to a step S1518, at which the step S1410 of moving the objects finishes.
At a step S1600 the object control module 1306 determines the curvature of the curved section 410 of the path 400 ahead of the current position of the object. This curvature may be, for example, the curvature of a preferred route or line through the curved section 410 (sometime known as a “racing line” for the curved section 410), or some other line (such as an edge 402a, 402b of the path 400, or a line along the middle of the path 400), or a combination of curvatures of such lines (e.g. the average of such curvatures, such as the average of the curvatures of the edges 402a, 402b). These curvature values may be stores as part of the path data 570. For embodiments in which the mapping data 578 is based on grip values too, then the object control module 1306 also determines a grip or traction value representing a degree of grip/traction between the current object and the surface of the curved section 410 of the path 400—this would be based on the one or more properties upon which the traction value is dependent (as has been described above).
Then, at a step S1602, the object control module 1306 uses the mapping data 578 and the determined curvature value (and, for embodiments that also use grip values, the determined grip value) to determine a speed (referred to here as a limit speed) VL at which the object can successfully negotiate the curved section 410 ahead.
The object control module 1306 may determine the limit speed VL from the mapping data 578 in a number of ways. For example, when the mapping data 578 is stored as a table of values, then the object control module 1306 may simply look-up in the table a speed value associated with the determined curvature value (and, when used, the determined grip value). This may involve ascertaining the entry in the table that has the closest curvature and/or grip values to the determined curvature and/or grip values.
Alternatively, the object control module 1306 may determine the limit speed VL from the mapping data 578 in table form using interpolation (or curve fitting). An example of this is shown in
Alternatively, when the mapping data 578 is stored in the form of one or more parameters defining a formula or equation for a curve or a surface, then the object control module 1306 may use that formula or equation to determine the speed at which the object can successfully negotiate the curved section 410 of the path 400 with the determined curvature (and grip value).
Next, at a step S1604 the object control module 1306 determines if the current speed Vc of the object is greater than the limit speed VL determined from the mapping data 578. If it is determined that the current speed Vc is not greater than the limit speed VL then processing for the step S1510 terminates at a step S1612, as the object is considered not to be going too fast (i.e. the object, with its current speed, can successfully negotiate the forthcoming curved portion 410). Otherwise, the object is considered to be going too fast to be able to successfully negotiate the forthcoming curved portion 410, and hence the object control module 1306 should reduce the speed of the object accordingly in order to ensure that the object will, when it reaches the curved portion 410, be going at a more suitable speed. Processing therefore continues at a step S1606.
At the step S1606 the object control module 1306 determines the position of a braking line 406 (or 408) for the curved section 410 ahead based on, for example, the dynamics data 576 for the object, the path data 570, the current speed Vc and the limit speed VL. In essence, the position of the braking line 406 is determined so that the object, when it reaches the braking line 406 at the current speed Vc is able (based on its deceleration capabilities, as specified by the dynamics data 576) to reduce its speed to the limit speed VL by the time that the object has reached the beginning of the curved portion 410 of the path 400. Methods for determining the braking line 406 position are well-known and shall not be described in more detail herein.
Next, at a step S1608 the object control module 1306 determines whether the current position of the object is at or after the braking line 406. If the object control module 1306 determines that the current object position is not at or after the braking line 406, i.e. the object has not yet reached the braking line 406, then processing terminates at the step S1612.
If, on the other hand, the object control module 1306 determines that the current object position is at or after the braking line 406, then at a step S1610 the object control module 1306 updates or controls the object speed so as to reduce the speed towards the limit speed VL. The object control module 1306 causes the object to decelerate with the aim of the object achieving the limit speed VL by the time that the object has reached the beginning of the curved portion 410 of the path 400. In this way, the object will be travelling at a speed at which it can successfully travel around that curved potion 410. Processing then terminates at the step S1612. In this way, the object control module 1306 slows down the object to the desired velocity (the limit speed VL), if required, over a period of one or more frames or game updates.
It will be appreciated that, when the object is actually located on, and travelling around, the curved portion 410, then the game execution module 1302 is arranged to limit the speed of that object to the determined limit speed VL.
In this way, the speed of the object is controlled so that, when the object reaches and travels along a curved section 410 of the path 400, that object can successfully travel along that curved section 410. This is achieved by determining a suitable limit speed using the predetermined mapping data 576 of the computer game 108 and then controlling the movement of the object so as to limit the speed of the object to the determined limit speed whilst the object travels along the curved section 410.
4) AlternativesIt will be appreciated that, whilst the above embodiments have been described with reference to curvature values, other embodiments may equally use radii of curvature instead. Moreover, other embodiments may use a different indication of curvature—for example, some embodiments may classify a curved portion 410 of a path 400 as being one of a plurality of predetermined curve sharpness or tightness values (where a sharpness value may correspond to a predetermined range of curvature values).
It will be appreciated that the method of updating the position of the object(s) described with reference to
Additionally, or alternatively, the object control module 1306 may determine the limit speed with which the object should be moved along the curved section 410 of a path 400 when the current object position is at the braking line. The game object control module 1302 may then move the object according to the determined limit speed, until it is determined that the object has passed or completed the curved section 410, at which time the speed of the object may be control according to some other criteria. In this manner the game execution module 1302 only determines a limit speed for the object at the beginning and end of each curved section.
It will be appreciated that the curvature of a section of a path 400 may not be continuous throughout the entire section. Accordingly, the curvature determined at the step S1600 and used to determine a speed from the mapping data 578 may be the average or the maximum curvature along the section of the path.
In some embodiments, it may be desirable to control the speed of the computer controlled objects also in dependence upon a current level of difficulty for the computer game 108 (such as a user-specified level setting, such as “easy”, “medium” or “hard”, which may be stored in the memory 316 as a game parameter). For example, it may be possible to make the game easier by artificially slowing down the computer controlled objects, or to make the game harder by artificially making the computer controlled objects able go faster. One way to achieve this is to adjust the curvature value and/or the grip value determined at the step S1600 based on the current level of difficulty for the game.
For example, the object control module 1306 may adjust the curvature value K determined at the step S1600 so as to decrease the curvature value K for higher levels of difficulty, thereby simulating that the curved portions 410 have less tight bends and hence the computer controlled objects can travel faster around the curved portions. For example, an updated curvature value αLK may be used, where a is a predetermined value greater than 1 and L represents the level of difficulty (with L=0 representing the highest difficulty level and larger values of L representing less difficult levels). Similarly, the updated curvature value could be (K+βL), for some positive value A, or some other function involving L and K.
Similarly, the object control module 1306 may adjust the grip value G determined at the step S1600 so as to increase the grip value G for higher levels of difficulty, thereby simulating that it is possible for the computer controlled objects to travel faster around the curved portions 410. For example, an updated grip value αLG may be used, where α is a predetermined value between 0 and 1 above 1 and L represents the level of difficulty (with L=0 representing the highest difficulty level and larger values of L representing less difficult levels). Similarly, the updated grip value could be (G-βL), for some positive value β, or some other function involving L and G.
In some embodiments, the limit speed determined at the step S1602 from the mapping data 578 is modified according to the camber (cant; banking; or direction in which the path slopes from its centre) of the curved section 410 of the path 400. The curved section 410 of the path 400 is considered to have a positive camber if the path tilts on the opposite side to that which an object leans to when travelling along the curved section, e.g. on a right hand bend if the curved section of path slopes downwards from left to right. A positive camber causes an increase in the cornering force, i.e. the centripetal force is caused to push the object toward the surface of the path, and therefore the speed with which an object can successfully negotiate a curved section of path with a positive camber is higher than the speed with which the object could otherwise successfully negotiate that section of path. On the other hand, the curved section of path is considered to have a negative (or adverse) camber if the path tilts on the same side that an object leans to when travelling along the curved section, e.g. on a right hand bend if the curved section of path slopes downwards from right to left. A negative camber causes a reduction in the cornering force, i.e. the centripetal force is caused to lift the object away from the surface of the path, and therefore the speed with which an object can successfully negotiate a curved section of path with an adverse camber is lower than the speed with which the object could otherwise successfully negotiate that section of path.
Therefore, at the step S1602, an embodiment of the invention may modify the limit speed determined from the mapping data 578 based on the camber for the forthcoming curved portion 410. This may be achieved, for example, by multiplying the determined limit speed by a multiplication factor, the value of which depends on the camber of the curved section of path.
In some embodiments, the speed determined from the mapping data 578 can be modified according to the incline (slope) of the curved section 410 of the path 400. This is because the speed with which an object can successfully negotiate a curved section of path with an uphill incline is higher than that with which the object could otherwise successfully negotiate that section of path. Similarly, the speed with which an object can successfully negotiate a curved section of path with a downhill incline is lower than the speed with which the object could otherwise successfully negotiate that section of path. Thus, the object control module 1306 may increase the limit speed based on a positive angle of inclination of the path 400 in the direction of object travel, and decrease the limit speed based on a negative angle of inclination of the path 400 in the direction of travel.
It will be appreciated that embodiments of the invention may be implemented using a variety of different systems. In particular,
It will also be appreciated that embodiments of the invention are not limited to “computer games”, but may be used in non-game applications too. For example, embodiments of the invention may be used in driving or flight simulators, in which drivers or pilots learn to drive a car or fly an aircraft. For such applications, one or more computer-controlled vehicles may be simulated and moved within a virtual environment provided by the simulator.
It will be appreciated that, insofar as embodiments of the invention are implemented by a computer program, then a storage medium and a transmission medium carrying the computer program form aspects of the invention. The computer program may have one or more program instructions, or program code, which, when executed by a computer carries out an embodiment of the invention. The term “program,” as used herein, may be a sequence of instructions designed for execution on a computer system, and may include a subroutine, a function, a procedure, an object method, an object implementation, an executable application, an applet, a servlet, source code, object code, a shared library, a dynamic linked library, and/or other sequences of instructions designed for execution on a computer system. The storage medium may be a magnetic disc (such as a hard drive or a floppy disc), an optical disc (such as a CD-ROM, a DVD-ROM or a BluRay disc), or a memory (such as a ROM, a RAM, EEPROM, EPROM, Flash memory or a portable/removable memory device), etc. The transmission medium may be a communications signal, a data broadcast, a communications link between two or more computers, etc.
Claims
1. A method of forming a computer game that is arranged to move an object along a path in a virtual environment of the computer game, wherein the method comprises steps of:
- (a) performing a plurality of object movement simulations for an object, wherein each simulation comprises moving that object with a respective speed along a path with a respective curvature in the virtual environment to determine whether that object can successfully travel along that path at that speed;
- (b) using the simulations to determine a relationship between curvature and a corresponding speed with which the object can successfully travel along a path with that curvature; and
- (c) storing data indicating the relationship as a part of the computer game.
2. The method of claim 1, wherein, for a simulation, it is determined that the object successfully travelled along the path for that simulation if the object did not leave the path.
3. The method of claim 1, wherein, for a simulation, it is determined that the object successfully travelled along the path for that simulation if a distance travelled by the object in a direction perpendicular to a direction of travel along the path is not greater than a predetermined threshold distance.
4. The method of claim 1, wherein the step of storing data comprises one of:
- storing a table of values indicating the relationship; and
- storing data specifying an equation defining the relationship.
5. The method of claim 1, wherein:
- each simulation comprises moving the object with a respective speed along a path with a respective curvature in the virtual environment with a respective traction value that defines a degree of traction between the object and a surface of the path to determine whether that object can successfully travel along that path at that speed with that traction value; and
- the step (b) comprises using the simulations to determine a relationship between traction value, curvature and a corresponding speed with which the object can travel along a path with that curvature for that traction value.
6. The method of claim 1, comprising performing the steps (a), (b) and (c) for each of a plurality of different object types.
7. The method of claim 1, wherein the simulated object represents a vehicle and the simulated path represents a racing track.
8. A method of moving an object along a path in a virtual environment of a computer game, the method comprising:
- determining an indication of a curvature of a portion of the path;
- determining a limit speed for the object by using predetermined reference data of the computer game together with the indication of curvature, wherein the predetermined reference data defines a relationship between curvature and a corresponding speed with which the object can successfully travel along a section of path having that curvature; and
- moving the object along the portion of the path, wherein moving the object comprises limiting the speed of the object based on the limit speed.
9. The method of claim 8, wherein the indication of curvature is one of:
- a curvature of the portion of the path;
- a radius of curvature of the portion of the path;
- an average curvature along the portion of the path; and
- an average radius of curvature along the portion of the path.
10. The method of claim 8, further comprising adjusting the limit speed to account for a camber of the portion of the path.
11. The method of claim 10, wherein adjusting the limit speed comprises reducing the limit speed if the portion of the path has a negative camber and increasing the limit speed if the portion of the path has a positive camber.
12. The method of claim 8, further comprising adjusting the limit speed to account for a slope of the portion of the path.
13. The method of claim 12, wherein adjusting the limit speed comprises reducing the limit speed if the portion of the path has a downward slope with respect to the direction of movement of the object; and increasing the limit speed if the portion of the path has an upward slope with respect to the direction of movement of the object.
14. The method of claim 8, comprising modifying the determined indication of curvature according to a current level of difficulty for the computer game.
15. The method of claim 8, wherein:
- the predetermined reference data defines a relationship between a traction value, curvature and a corresponding speed with which the object can successfully travel along a section of path having that curvature for that traction value, where the traction value defines a degree of traction between the object and a surface of that section of path;
- the method comprises determining an indication of a traction value representing a degree of traction between the object and a surface of the portion of the path; and
- the step of determining a limit speed comprises determining a limit speed for the object by using the predetermined reference data of the computer game together with the indication of curvature and the indication of traction value.
16. The method of claim 15, comprising modifying the determined indication of traction value according to a current level of difficulty for the computer game.
17. The method of claim 8, wherein the simulated object represents a vehicle and the simulated path represents a racing track.
18. An apparatus arranged to form a computer game, the apparatus comprising:
- a memory; and
- a processor arranged to: (a) perform a plurality of object movement simulations for an object, wherein each simulation comprises moving that object with a respective speed along a path with a respective curvature in the virtual environment to determine whether that object can successfully travel along that path at that speed; (b) use the simulations to determine a relationship between curvature and a corresponding speed with which the object can successfully travel along a path with that curvature; and (c) store in the memory data indicating the relationship as a part of the computer game.
19. An apparatus arranged to execute a computer game by moving an object along a path in a virtual environment of the computer game, the apparatus comprising a processor arranged to:
- determine an indication of a curvature of a portion of the path;
- determine a limit speed for the object by using predetermined reference data of the computer game together with the indication of curvature, wherein the predetermined reference data defines a relationship between curvature and a corresponding speed with which the object can successfully travel along a section of path having that curvature; and
- move the object along the portion of the path, wherein moving the object comprises limiting the speed of the object based on the limit speed.
20. A computer readable medium storing computer instructions, which, when executed by a computer, carry out the method of claim 1.
21. A computer readable medium storing computer instructions, which, when executed by a computer, carry out the method of claim 8.
Type: Application
Filed: Mar 31, 2009
Publication Date: Sep 30, 2010
Applicant: Codemasters Software Company Ltd. (Southam)
Inventors: Nicholas Melder (Southam), Karl Johan Hammarling (Southam)
Application Number: 12/415,100
International Classification: A63F 9/24 (20060101);