Minigame


Hello!

Today I'm gonna explain how I did the minigame of battles in real time.

Originally, the minigame was going to be about clicking runes on the screen, but since I only had 2 months to do it, I switched to something that seemed simpler.

Original concept about the game, lol.

Well, to start, I made the variables: PVpropio (own pv, I'm spanish XD), PVenemigo (pvenemy), pv,  damage, fight.

At the beggining of the battle:
f.PVenemigo=6
f.PVpropio=5
f.PVpropio+=f.pv

Why is this? In the game, some choices makes an add+1 to the pv, so, in battles you have your PVpropio with pv.

When the fight starts I put too:
f.PVpropio-=f.damage
f.damage=0

Ok, the minigame is about an image button appearing and disappearing on the screen three times, you have to click on it before the third time or the f.damage+=1 that means that the bucle for the fight goes back and it reads that PVpropio is now 4, so it goes to another label, and f.damage goes to 0 or it becomes exponential (next time -2, -3...) so every enemy hit only takes 1.

Funny fact, it's the first game I do, so I didn't know how to erase the image button (page break) so I used the TyranoScript [cm] XDXD

I had 4 different patterns for the enemies, they actives with the f.fight=Math.floor(Math.random()*)+1 that variable in random between 1 to 4, so it jumps to the pattern randomly :)

When PVenemigo is 0 it jumps to the label win, and if PVpropio is 0 it jumps to lose.

Just playing with labels, jump, variables...

Files

geniiofchildrenforjam.zip 86 MB
Sep 26, 2018

Get Genii of Children

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.