Quickstart Guide
Quick-start guide on how to get up and running quickly and easily The main reason why T.A.R.B.S. engine is different from other engines is due to the limitations. It isn't limited at all. T.A.R.B.S. engine doesn't limit you with GUI or story-line. You aren't even required to build a story. That's all up to you. T.A.R.B.S. engine provides all of the functionality, all you have to do is the easy part. You just need to call the functions.
First, you need to import the module.
An important step in software development is debugging. Luckily, T.A.R.B.S. comes with a debugger. We can enable it by setting the TARBSengine.debug
variable to true. We can also enable logging by calling the TARBSengine.initlogging()
.
T.A.R.B.S. comes with some default output so you don't have to manually program each output after calling a function. If you'd prefer, you could leave it disabled, but for this project, I'm going to enable it
Next, you need to create a player instance from the Player class
To do that, you need four arguments: name, HP, minimum Attack damage, and maximum attack damage.
Now, we can create an enemy from the Enemy class.
For the enemy class, you will need only four arguments: name, HP, (this is the same as maximum HP.) (This is because enemies cannot heal as of now) minimum Attack damage, and maximum attack damage.
We have an enemy. Let's give him a purpose. His purpose is to defend a princess. We need a princess though. For that, we will use the NPC
class.
Now, lets attack Dave. We can do that by calling the Player.atk()
function.
Let's have Dave attack the player now. That can be done with the Enemy.atk()
function.
Thanks to debugging, we can see exactly how much damage the attack did and how much HP the player has left. Let's attack Dave one more time.
Dave is dead. We can now talk to the princess. The princess is going to give us something. We can create a potion using the Potion
class. Let's make a healing potion.
Now, let's make the Princess talk to us and give us the potion. We can do that by using the NPC.talkto()
function in the NPC
class.
Now, let's edit the player's inventory to add a potion.
Now that the player has the magic potion, let's use the Player.usepotion()
function to drink the potion and heal.
Here is the full code if you want to copy it:
Last updated