MV/MZ SDJB_htmlTicTacToe

PluginName: SDJB_ htmlTicTacToe
Author: ShadowDragon

TicTacToe.gif


WIP html TicTacToe is a new awesome plugin
Fully styled inside the CSS, currently with the following layout

Spoiler: How to use
Code:
An awesome classic game Tic Tac Toe, now right from your game!

 it's unique design in HTML DOM to manipulate and best of all,
 you as developer can design your own look and effect!

 How it works is easy to setup and even powerful enough on how.

 htmlTTT.open();
 ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
 This opens the a mini setup to start the game you want to do:
 player vs player  or  player vs computer.

 If Player vs Player => game start so each turn, the player
 set an X or O.

 If Player vs Computer => you can choose game mode:
 Easy, Normal, Hard, Extreme.


 htmlTTT.open({com:false});
 ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
 This start Player vs Player directly


 htmlTTT.open({com:true});
 ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
 This gives you the game mode: Easy, Normal, Hard, Extreme.


 htmlTTT.open({com:true, mode: "easy"});
 ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
 This start Player vs Computer in easy mode directly.

 After the game, you can either reset or close it


 htmlTTT.open({com:true, mode: "hard",
               lose: `$gameMessage.add("You have lost the game.")`});
 ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
 This start Player vs Computer in hard mode, and if lost, it execute
 a JavaScript Code like Game Message, Switches, Variables, etc.
 this code MUST be into strings to be executed.

 win: execute code on winning (can be omitted)
 lose: execute code on lose (can be omitted)
 draw: execute code on draw (can be omitted)

 Omitting those settings, show the buttons, otherwise, it close the
 game if actions are set.

 
 Player vs Computer
 ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
 Easy: Computer set random move and isn't smart
 
 Normal: Computer is smarter, and block your path of winning.

 Hard: Computer is far smarter and try to win if able.

 Extreme: Computer is really smart and block each path and think ahead!

Download from itch.io (make sure you download the latest SDJB_htmlBase!)

=== TERMS OF USE ===
Free for Non-Commercial and Commercial use when credit is given.
credit one of the following:
ShadowDragon
ShadowDragonJB

Version + UPDATE'S
00-00-2025 Version 0.1.0 first release

=== WARNING ===
YOU ARE NOT ALLOWED TO REDISTRIBUTE OR SELL IT OR TAKE CODE FOR YOUR OWN.
DO NOT REMOVE THE HEADER.
this one goes OVERBOARD with a huge update.

few changelog (maybe release tomorrow)

player vs player or player vs computer

4 difficulties
easy, normal, hard, extreme!

each mode, the AI is smarter, extreme kind of UNBEATABLE for diehards!

fully customisable, can be played with keyboard and hopefully gamepad
with a unique UnifiedFusionBridge!

UnifiedFusionBridge? a keyboard and gamepad controller in 1, how cool is that,
built in my htmlBase and can be used globally!

no more keyboard checks and gamepads check, now under 1 roof!

get ready for its release as both htmlBase and htmlTicTacToe is massively changed =)
Now available, SDJB_htmlTicTactToe!

an Old school paper game now right from your game!

with Player vs Player or Player vs Computer with 4 difficulty mode.

easy, normal, hard and extreme.

change CSS layout for your own look, style that suit you game and try to
beat the game (each mode can be beaten, I can explain how to beat
easy mode, normal mode, and hard mode, but extreme mode is really trick
and probably unbeatable most of the times 🙂

enjoy and let me know what you think ^^
Updated SDJB_htmlBase to fix the unable to hover on window resize and back.
this has a few minor updates to the to the FakeMouse as well during TicTacToe.

so this issue is now (hopefully) completely terminated!

redownload the SDJB_htmlBase when using this plugin.

SDJB_UnifiedFusionBridge is required for keyboard support.
(this plugin will be moved to itch, once I can confirm gamepad works).
New update to the SDJB_htmlBase and SDJB_htmlTicTacToe.

while the base has new function and performance increase,
the major change is the fake mouse ownership (mouse and keyboard).

The SDJB_htmlTicTacToe.css has a major change in classes,
in order to make the fake mouse work correctly.

the JS plugin has scale able for html deployment update, which
was brough to my attention that is was wrong and far bigger than it
should be.

this has been fix and default is graphics * 0.44, for html deployment,
use around 0.25 to 0.28 (or play around), inside the plugin.

the function start near the top below the imported section.

if there is any suggestions, feedback, bugs, glitches, let me know.

Original thread: https://forums.rpgmakerweb.com/threads/sdjb_htmltictactoe.177127/