Minigame help (map reset, exp recognition)

MizukiUki

Warper
Member
Joined
Jan 24, 2016
Messages
4
Reaction score
0
First Language
English
Primarily Uses
I'm trying to make a minigame set, using spinoffs of age-old popular games like hide-and-seek, vine climber, space invaders, and (most importantly for this question) pacman.


You start off with only one available minigame, the rest must be unlocked by earning gold in the game. Game 1 is free, game 2 is 400 gold, game 3 is 900, etc.


My problem, currently, is game 1, Pacman (or Kidney Eater, as it's called in my game, since it's horror-themed). 


The "dots" were originally each worth 2 points, and the "pills" were 3 points, to give a total of about 254 gold upon completion. My plan was to have an autorun event that would sense when the player got all 254 gold available, at which point it would say "Level complete" and push the player back to the minigame selection screen with his/her gold.


Then it dawned on me that if the player went back in, which they would have to in order to unlock game 2, the auto-run even would immediately say they won, and kick them back out. So I thought "I'll just change gold to experience for the minigame, and then when they leave the minigame, it'll exchange the experience for gold. Except I don't know how to make the conditional branch sense experience.


On top of that, I want the ghosts to be 4 points if eaten by the player. However, if the player eats 3 ghosts, that's 6 "dots" the player doesn't have to eat for the game to clarify them as a winner. I'm not sure how to take into account the possibility of the player nothing but ghosts, while also considering the occasional player who will avoid the ghosts completely and clear the board as quickly as possible.


Moving on to game 2, it's going to be object hide-and-seek, where the player has to find a knife that is hidden in a different location each time the map opens, before the timer runs out, or else the player will die. My plan is that when the timer runs out, a cutscene will play where the killer comes in with his knife, talks a little bit, then kills you. If you click on the right spot before then, however, and find the knife, a cutscene plays where the killer comes in, tries to go for his knife, and you kill him instead, making you the winner. Other than the cutscenes and the actual finding of the knife, I'm not entirely sure how to make this work.


On top of that, I have no idea how to make the maps and experience reset upon entry or death, which I feel is rather important. I don't want the gold to disappear, only whatever was changed since entry. Also, I think it'd be cool if the map randomized each play, perhaps between 3-5 different layouts.


As complex as this probably sounds, this is really just a warm-up for my actual RPG game. If I can figure out how to work these things, I should have no problems with the real game.


Additional minigame ideas and suggestions on how to make them work would also be great. I have only 4 ideas, and room for 8 games.
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
722
Reaction score
578
First Language
French
Primarily Uses
Hi!


For your first minigame, just use variables instead of checking gold or experience.


What i mean by this is when eating a pellet you increase the variable corresponding to the number of pellets eaten.


Then check it against a limit that is also a variable corresponding to the total points you can earn. You can then increase both the limit and the points variable as you eat a ghost so that a player eating ghosts will increase its points but still need to eat every pellet to win.


That solves both problems. At the end of the game just convert the points variable into gold and then set it back to 0.


Example of how i would do it


Map initialisation: V[points]=0


                            V[limit]=254


When you eat a pellet V[points]+=2


When you eat a ghost V[points]+=4, V[limit]+=4


When V[points]=V[limit] the game is won, Make player gain gold based on V[points].


When they start the map again, the map initialisation event sets the points back to 0 again and the limit back to its original value as well.


Setting all objects back into place once you restart the map is just a matter of switches, when you transfer the player back to the menu simply make all switches you turned on in the pellets and ghost events off again. (One way i would do it is to have all your pellets and ghosts turn a self switch on when you eat them and have an event page that reacts when you turn on a switch, lets call it reinitialize, when you turn reinitialize on, it turns the self switch off again. Or use a numbered switch per pellet but that's bound to be extremely tedious.)


Map randomizing is another problem entirely. It could very easily be done if you wanted to simply hand craft evey maze possibility and then just tranfer the player to a random map depending upon a random number picked when choosing the game. But if you want the maps to be proceduraly generated i have no idea how to even start doing that.


Second minigame you will need to make a timer:


I'd do it this way: in a parallel process event have a wait 1 frame then V[timer]+=1, upon initialisation of the minigame set V[timer limit] to whatever you want it to be.


Note that if you do it this way the timer will stop if you enter the menu, i have no easy solution for how to keep increasing the timer in the menu (you'd most likely need scripts).


In the same event then two conditionals:


when V[timer]=V[timer limit] --> death cutscene


or when [knife] is possessed --> victory cutscene


If you want to use the built in timer function then i have no idea on how to do it, as i have never used that function before (and i did not actually know one existed before reading this post).


Hope i helped.


If you see anything wrong with what i wrote please point it out!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:

Forum statistics

Threads
105,855
Messages
1,017,007
Members
137,563
Latest member
MinyakaAeon
Top