Difference between revisions of "Notes on Checkpoints"

From X-Moto
Jump to: navigation, search
(Adding Checkpoints without Inksmoto)
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
==General Info==
 +
 
Since X-Moto 0.5.3, checkpoints are supported.
 
Since X-Moto 0.5.3, checkpoints are supported.
 
Checkpoints are level entities, which enable a respawn of the player to its position once the player dies. By using checkpoints, you can prevent a major frustration experience of the xmoto player, since starting from the beginning of a level and doing difficult passages over and over just to get beyond a certain point is not a nice gameplay. For improving that gameplay issue we implemented checkpoints.
 
Checkpoints are level entities, which enable a respawn of the player to its position once the player dies. By using checkpoints, you can prevent a major frustration experience of the xmoto player, since starting from the beginning of a level and doing difficult passages over and over just to get beyond a certain point is not a nice gameplay. For improving that gameplay issue we implemented checkpoints.
 
Nevertheless you have to pay attention to several issues presented here:
 
Nevertheless you have to pay attention to several issues presented here:
 +
  
 
==Checkpoint placement==
 
==Checkpoint placement==
Line 8: Line 11:
 
To find a good position for checkpoints, test your level a lot, and find out where the really difficult passages are. Its good to place a checkpoint directly after such passages, because the player will be happy to finally have proceeded over that point (he tried so much), and can concentrate on the further parts, which is '''fun in gameplay'''.<br>
 
To find a good position for checkpoints, test your level a lot, and find out where the really difficult passages are. Its good to place a checkpoint directly after such passages, because the player will be happy to finally have proceeded over that point (he tried so much), and can concentrate on the further parts, which is '''fun in gameplay'''.<br>
 
Note that its also a '''motivation''' for the player, if he just sees, that there are checkpoints in a level, because like this he is aware of the fact, that he may finish the level although the needed skills are pretty high!
 
Note that its also a '''motivation''' for the player, if he just sees, that there are checkpoints in a level, because like this he is aware of the fact, that he may finish the level although the needed skills are pretty high!
 +
  
 
==Script barriers==
 
==Script barriers==
  
Unfortunately theres no mechanism implemented (yet), that allows (re)setting script parameters to certain states. Therefore you have to pay attention to your checkpoint placement if your level is scripted!
+
'''Pay attention to your checkpoint placement if your level is scripted!'''<br>
 
For example, if we have a level with a checkpoint and an elevator following, it may be impossible for the player to finish the level, because if the elevator got up and never back down after the player died, he will find no elevator after respawn (because it was gone before), so he has no other choice than complete level restart.<br>
 
For example, if we have a level with a checkpoint and an elevator following, it may be impossible for the player to finish the level, because if the elevator got up and never back down after the player died, he will find no elevator after respawn (because it was gone before), so he has no other choice than complete level restart.<br>
Only strawberrys and player position are resetted on respawn!<br>
+
'''Only strawberrys and player position are resetted on respawn by default!'''<br>
 +
To deal with this, theres a LUA-Script function named OnUse(), which is called after a certain checkpoint is used. Use this to manually (re-)set script paramers to keep your level working!<br>
 
'''Consider this problem in your level design and checkpoint placement!'''
 
'''Consider this problem in your level design and checkpoint placement!'''
 +
 +
 +
==Adding Checkpoints using Inksmoto 0.7.0==
 +
 +
In actual [[Inksmoto-0.7.0|Inksmoto]] versions, you can easily add checkpoints using the entity menu, or by selecting a block and pressing the 'd'-key (if keyboard shortcuts are installed).
 +
 +
 +
==Adding Checkpoints without Inksmoto 0.7.0==
 +
 +
If you dont have the required Inksmoto version to set level checkpoints, you can do it manually like this:<br>
 +
*When editing your level, place a sprite entity where you want your checkpoint to be. Give it a name which you can later identify easily (e.g. by pressing "i" -> enter "CP1"). Make sure the collision circle of the entity is above the ground. Placing it high enough that the image is above the block would be nice too.<br>
 +
*After you exported and finished your level design, open the .lvl file manually and find the XML-Tag of the sprite (by using the search function of your favourite editor). Now change the type-ID to "Checkpoint" and remove the line with the <name> tag, for you get something like this:
 +
<entity id="CP1" typeid="Checkpoint">
 +
<position y="0.30" x="23.26"/>
 +
<size r="0.4"/>
 +
</entity><br>
 +
*Save your level and test, if all worked fine. You may have to re-adjust the y-coordinate to get the perfect respawn position.

Latest revision as of 18:35, 17 May 2013

General Info

Since X-Moto 0.5.3, checkpoints are supported. Checkpoints are level entities, which enable a respawn of the player to its position once the player dies. By using checkpoints, you can prevent a major frustration experience of the xmoto player, since starting from the beginning of a level and doing difficult passages over and over just to get beyond a certain point is not a nice gameplay. For improving that gameplay issue we implemented checkpoints. Nevertheless you have to pay attention to several issues presented here:


Checkpoint placement

As previously stated, checkpoints allow respawn after players death. Since a level has to keep a good balance between demand of the players skill and the ability to proceed in the level parcour, place your checkpoints wisely!
To find a good position for checkpoints, test your level a lot, and find out where the really difficult passages are. Its good to place a checkpoint directly after such passages, because the player will be happy to finally have proceeded over that point (he tried so much), and can concentrate on the further parts, which is fun in gameplay.
Note that its also a motivation for the player, if he just sees, that there are checkpoints in a level, because like this he is aware of the fact, that he may finish the level although the needed skills are pretty high!


Script barriers

Pay attention to your checkpoint placement if your level is scripted!
For example, if we have a level with a checkpoint and an elevator following, it may be impossible for the player to finish the level, because if the elevator got up and never back down after the player died, he will find no elevator after respawn (because it was gone before), so he has no other choice than complete level restart.
Only strawberrys and player position are resetted on respawn by default!
To deal with this, theres a LUA-Script function named OnUse(), which is called after a certain checkpoint is used. Use this to manually (re-)set script paramers to keep your level working!
Consider this problem in your level design and checkpoint placement!


Adding Checkpoints using Inksmoto 0.7.0

In actual Inksmoto versions, you can easily add checkpoints using the entity menu, or by selecting a block and pressing the 'd'-key (if keyboard shortcuts are installed).


Adding Checkpoints without Inksmoto 0.7.0

If you dont have the required Inksmoto version to set level checkpoints, you can do it manually like this:

  • When editing your level, place a sprite entity where you want your checkpoint to be. Give it a name which you can later identify easily (e.g. by pressing "i" -> enter "CP1"). Make sure the collision circle of the entity is above the ground. Placing it high enough that the image is above the block would be nice too.
  • After you exported and finished your level design, open the .lvl file manually and find the XML-Tag of the sprite (by using the search function of your favourite editor). Now change the type-ID to "Checkpoint" and remove the line with the <name> tag, for you get something like this:
<entity id="CP1" typeid="Checkpoint">
	<position y="0.30" x="23.26"/>
	<size r="0.4"/>
</entity>
  • Save your level and test, if all worked fine. You may have to re-adjust the y-coordinate to get the perfect respawn position.