MV Simple minigame?

What i need is something simple and straightforward that can be played against AI. No complicated things like cards, and more like a... pong, for example? I know there were such plugin for MV but the author's links are gone with the author, maybe someone has the plugin? Or something simillar to that. Anything that would fit for a duel. Maybe even a fighting game, but i doubt that someone made anything that complicated.

And it would be simply amazing if you could configure the size of that minigame's window, so you can adjust it to the screen's size on this level so it would look like it's being translated on the big screen in the middle:
1744751849688.png

The overall idea behind that that the boss decides to handle the disagreement like a real man would: playing the game. Who needs violence anyway if you can settle things in virtual space? But it seems like i can't find any fitting plugin for that. Help?
How about tick tack toe? It is pretty easy to create with just events. All you need is the playfield in a tileset, and a character that shows a red X or a blue O.

I could walk you trough it, but that would be a 1 hour post, and it is 2:30 am, and I have to wake up early to work all day.

The short version is:
You need 9 variables and 9 events.
Each variable is linked to an event.

Make the event show the red X when that variable is 1, and show the blue O when it is 2. Show nothing when it is 0.

Place the events in the following pattern:

(Phone style)
1 2 3
4 5 6
7 8 9

or

(Numpad Style)
7 8 9
4 5 6
1 2 3

Both work equally great. Whatever you prefer.

Like this:
1744763960172.png


Start a new autorun event, that lets the player choose where to place the X.
Turn the chosen variable from 0 to 1.

Nou you are going to make a whole bunch of conditional branches, to see what position would be the best for your AI to play next. Turn the chosen variable from 0 to 2. (And those conditions take the most time to explain, so I kinda hope you're experienced enough to figure those out)

Make sure the player and the AI can only choose variables that are set to 0.

After each turn (the player's and the AI's) check if var 1,2,3 are the same, or 4,5,6, or 7,8,9, or 1,4,7, or 2,5,8 or 3,6,9 or 1,5,9 or finally 3,5,7. That is another large group of conditional branches.

If those are indeed all the same, then the player who took last turn, wins the game. If not, repeat the whole process.

When the game is won, and you want to reply, just set all 9 variables back to 0 and you're good to go.

Edit: It is 2:51 now, so it still took me 20 minutes to do the "quick" version. 😛

Edit again: You can even make this play on the actual screen you see in your screenshot.

Edit: One more time. I quickly made some graphics for a tic tac toe game, which you may use if you want.

Save this one in your characters, make sure you start the filename with !, like "!filename.png", otherwise it won't line up with the grid.
1744765272172.png


Add this to your tileset:
1744765303283.png


Feel free to edit and use in any game or any way you like, no credits needed.
Start a new autorun event, that lets the player choose where to place the X.
How can i do that if the choice is limited to 6 options and there is 9 tiles to chose from?
(And those conditions take the most time to explain, so I kinda hope you're experienced enough to figure those out)
Maybe >_< It would be something like - if player chose 1, then any 3 tiles around it are viable.
But that would limit ai only to counter player's actions, that will eventually lead to draw. Or not.
Also how do i prevent ai from placing it in same spot every time just because that option comes first?
Make sure the player and the AI can only choose variables that are set to 0.
So i need to make a second conditional branch that will check if target variable is 0, right?
I quickly made some graphics for a tic tac toe game, which you may use if you want.
Thanks, it will do great!
Feel free to edit and use in any game or any way you like, no credits needed.
I think you are already in credits ^_^
Thank you for detailed guide!

UPDATE: Another question - how do i prevent player from having an already existing tile as a choice? I can make a new show choice after each player's choice that will not have previously used number available, but that will require 511 show choice events in total to account for all possible combinations player can go for.
if you want by choices, hime large choices can help you.
you can disable the command or hide if already there.

another way is make the events clickable 🙂
another way is make the events clickable
Can't if they are on vertical screen, the character can't reach them.
The entire idea is that she and the boss sit bellow the screen with gamepads and play the game.
clickable could work with mouse, with gamepad, thats a different story.
in that way, you might want to use an indicator as cursor selection.

so instead of using events, you could event it by pictures.

the idea through that is also mostly the same by checking all 8 available checks.

1,2,3 ; 4,5,6 ; 7,8,9 ; 7,4,1 ; 8,5,2 ; 9,6,3 ; 7,5,3 and 1,5,9.

you could use conditional branch+ to make this change easier.
1-9 variables, depending how you want to check it. but shouldn't be to difficult.
Uhm... Don't use choices. Use number input in a mew variable.

You tell the player about the
1,2,3
4,5,6
7,8,9
And then they tell you bu input number, there they want to play.

Clickable events would be even better. That is how I did it in my own tic tac toe game.

This isn't for the jam, right? This weekend I have more time, I'll help you with the conditions, if you still need it. If it is for the jam, then I realize that it would be too late.
Use number input in a mew variable.
Sorry, i don't understand. How would you input numbers in RM? The numbers on keyboard aren't working as soon as i know, and even if there are plugin to make them work, i assume that will not work on gamepad.
This isn't for the jam, right? This weekend I have more time, I'll help you with the conditions, if you still need it. If it is for the jam, then I realize that it would be too late.
No, its not for jam, i have a lot of time yet since there is other issues with the project that i also have no idea how to fix and looking for solutions) And then i will have to make VO and testing... do not hurry, do important things first, and if you will have spare time - i will appreciate the help.

Actually, if i will understand what you meant about event selection the last question might become irrelevant, depending on how your solution works. What else can you use within an event to let the player choose?
1744863657872.png


There is a function to select numbers right here. You've used RPG maker for at least 9 years and never noticed? 😛
View attachment 337846

There is a function to select numbers right here. You've used RPG maker for at least 9 years and never noticed? 😛
Yep. More than 10, actually. I just quicly forget things that i don't use constantly, that's why i can't learn almost anything. So i still spend quite some time to search even common functions that are not oftenly used like add item, change transperrancy, etc. And things like this... maybe i knew about it once, but totally forgot.
Ok, i tried it, but don't understand. First - the arrows for number celection are offset, one of them are nearly out of map's borderds.
1744900417883.png
See that white piece on the left? That's the down arrow.
Also if i click enter instead of the checkmark, the menu will disappear entirely.

So i made this event so far
1744901362947.png


But i got really lost on enemy check. I can make conditional branch check only one of the surrounding event's variable at once. I can make 3 checks one after another, but how do i combine the result later, and how do i make it not only chose one of the surrounding events, but also make sure that the player does not have two other events already active and ready and missing just one part to make a bridge between them?

And i am guessing that putting the responce not around the player's move are out of the question, i can't even imagine the logic behind that.
Yep. More than 10, actually. I just quicly forget things that i don't use constantly, that's why i can't learn almost anything. So i still spend quite some time to search even common functions that are not oftenly used like add item, change transperrancy, etc. And things like this... maybe i knew about it once, but totally forgot.
Ok, i tried it, but don't understand. First - the arrows for number celection are offset, one of them are nearly out of map's borderds.View attachment 337874See that white piece on the left? That's the down arrow.
Also if i click enter instead of the checkmark, the menu will disappear entirely.

So i made this event so far
View attachment 337877

But i got really lost on enemy check. I can make conditional branch check only one of the surrounding event's variable at once. I can make 3 checks one after another, but how do i combine the result later, and how do i make it not only chose one of the surrounding events, but also make sure that the player does not have two other events already active and ready and missing just one part to make a bridge between them?

And i am guessing that putting the responce not around the player's move are out of the question, i can't even imagine the logic behind that.
You can make a conditional branch, in a conditional branch in a conditional branch. Tomorrow I got the day off. I'll have time to help you more.

I'll write a tutorial on how to create a tic-tac-toe without plugins, although using a plugin to select the square with the mouse would be better. I use YEP_EventClickTrigger by Yanfly.

Yes, I did make a tic tac toe game myself in the past. If you want to see it, you can check it out here: https://johndoenews.itch.io/super-tic-tac-toe

(webgame, no download required, play with your mouse. For 2 players.)

I didn't make an AI for this game, but I did make an AI for my card games. If I can do that, I should be able to make an AI for tic tac toe.

Just note this: If the AI is build well, it will be unbeatable. Tic tac toe will always end in a draw if both players know how not to lose tic tac toe. (And don't worry. Making an AI sounds insane, but in this case it is easy enough for me to teach you. But well, right now I am beat from working all week. I'm too tired to concentrate and focus that hard. (I mean.... before I can teach you how to build the AI, I have to figure out all the conditions, which will be plenty.

It might be a mini game, completed in less than a minute, but it is hours to create, so be prepared for that. 😛 But hey, that is game development.
You can make a conditional branch, in a conditional branch in a conditional branch.
But then there is a problem, if first conditional branch in sucsess, it will jump to outcome without checking the others. And if outcome will still involve checking the others, how would it pick the spot?
although using a plugin to select the square with the mouse would be better.
Sadly i want it to be playable with controller as well. Maybe it's possible to just highlight the tiles and select them this way? Like options in menu.
If you want to see it, you can check it out here:
Tried it, works well, but didn't understood the multi-field thing. Due to same player able to make multiple moves on same field before other player responds makes it impossible to stop him.
Just note this: If the AI is build well, it will be unbeatable.
I know. I don't even need it to be a real challenge, i make relaxing story-driven game where player should laugh on jokes, and not tryhard. So making it so ai does not instantly lose will be enough.
But then there is a problem, if first conditional branch in sucsess, it will jump to outcome without checking the others. And if outcome will still involve checking the others, how would it pick the spot?
Okay, for this example, I show made 9 variable:
1744913176271.png


As you know, each variable is a place on the play board. If they are set to 1, it is X, set to 2, they are O.
So we do this:
1744913246909.png


And we do it again, this time for Up left and Up right,
Then we get this:
1744913316295.png

Do this for all 8 winning combinations (I wrote them out in an earlier post) and you have yourself the win conditions.

you can find out if those variables are 1 or 2 to make a complete set, but it is way easier to just declare the current player the winner.


Sadly i want it to be playable with controller as well. Maybe it's possible to just highlight the tiles and select them this way? Like options in menu.
Yes, but that would be complicating the tutorial by 100. I'm sure it can be done, but it will take me more than a single afternoon to get that explained (and designed, cause I have to create it myself before I can teach you every single step) It's way to much work for a minigame you only spend 1 minute playing. 😛

Although... Now I think about it... I think I indeed know an easy way to highlight them controlled by arrows. Yes, I can do that.


Tried it, works well, but didn't understood the multi-field thing. Due to same player able to make multiple moves on same field before other player responds makes it impossible to stop him.
If in the small game you play "Top Left", then the next player has to play in the top left game. And if in the top left game they play in the center square, the next player needs to play in the centered game. If there are no squares available in the square you got to play in, you can play in any square you like.

It is actually a very interesting game (which I didn't invent myself... We did this with pencil and paper as kids. I was reminded by youtube.)

I know. I don't even need it to be a real challenge, i make relaxing story-driven game where player should laugh on jokes, and not tryhard. So making it so ai does not instantly lose will be enough.
Yeah, but that is the thing. I can write the AI to make the best move possible... I can't make the AI guess... Unless you want to program a wrong move in there on purpose. Of course, the easy way would be making the AI completely random. That would be beatable easily and would save me an afternoon explaining, I guess. 😛 I can explain that in 12 minutes or less. 😛
you can find out if those variables are 1 or 2 to make a complete set, but it is way easier to just declare the current player the winner.
But i need to know if player loses or wins the game, and add different outcome to that.
Of course, the easy way would be making the AI completely random.
You are right, no need to spend too much time on something so small. I appreciate the help, but don't want you to sit whole day on it)
I think random will do. But that is why i also was looking toward action-based minigames like pong - unlike turn-based, it's much easier to make imperfect ai there, while in turn-based you basicly need to make it lose on purpose.
But if there are no other options, the random is fine, after all the game is mostly symbolic and isn't meant to be challening for the player.
Well, if it was the players turn when the game ends, he wins, if it was the AI's turn when the game ends, then the player loses.

I don't mind working an afternoon on an AI. That's a fun way to spend my afternoon, if you ask me. And if it helps you make a great in0game minigame, with a purpose even, then I am happy to help.
Well, if it was the players turn when the game ends, he wins, if it was the AI's turn when the game ends, then the player loses.
So i need to add check - if (last tile checked) has 1 or 2 on it to determine the winner, right?
So i need to add check - if (last tile checked) has 1 or 2 on it to determine the winner, right?
That is one way.... But it is easier to just declare the winner to the active turn. Is it the players turn, the player wins, is it the AI's turn, the AI wins.
That is one way.... But it is easier to just declare the winner to the active turn. Is it the players turn, the player wins, is it the AI's turn, the AI wins.
That sounds logical, but... how would i inform the game about who's turn is that, if not checking the value? I can't see the other way to check who's turn is that.
if you want, I can make it a click based and keyboard support through html.

so you have a htmlTicTacToe in your game, the build is similar to my other
html manipulation, and you could set the width/height otherwise.

this require some time though, so you can have expert mode and noobie mode.
noobie always lose 😛 expert is mostly losing 😀
if you want, I can make it a click based and keyboard support through html.

so you have a htmlTicTacToe in your game, the build is similar to my other
html manipulation, and you could set the width/height otherwise.

this require some time though, so you can have expert mode and noobie mode.
noobie always lose 😛 expert is mostly losing 😀
If it will work with gamepad and will not require separate window (so it will still be placed on a screen) - sure, that would be great. I guess no need to code both modes (unless you already done that), since i will only use it once. Ai should lose, but, preferably, not instantly.

Original thread: https://forums.rpgmakerweb.com/threads/simple-minigame.176987/