It’s a me a brandon letsa go.
Tic-Tac-Toe
…
It’s tic-tac-toe
What else is there to say?
It does not contain viruses, it was made in Game Maker 8.1.
…
No but really what’s the deal with this? Why would I make such a deep, intricate and complicated game from following the Game Maker’s Apprentice tutorials? If I recall correctly, this segment taught me about using scripts and A.I.
Scripts are useful files you create that can help streamline things like duplicating huge blocks of code for more redundant functions.
Example: In Ato, all enemies share the same “launch” state, which means they all pretty much use the same state script to make them properly have the same rotation and behavior. By using a script I don’t have to copy the same huge chunk of code and possibly risk human error.
Scripts are simply a means of giving you power to organize your code and create your own functions for doing stuff like position checks or A.I. behaviors, etc.
Frog Hop had a gigantic (and terrible) script that checks whenever you collide with an enemy and then goes through a list to find the one you specifically collided with to check for things like their attacks, if they’re protected, special status etc.
In terms of A.I…
A lot of my games like Frog Hop just have the A.I. utilize timers to change their sprite and attack timings, sometimes they have collision rectangles if you’re in range of an attack. Things like running into a wall also have to be checked for turning around, especially depending on the animation (because if you had an enemy turn around when touching a wall, you’d have to turn it off depending on their animation such as an attack (otherwise they’d flip back and forth while attacking).
The A.I. in Nameless get a bit more complicated with using path-finding from the A* Algorith (A Star). I’d have to check if they have vision of you and if they don’t, they rely solely on the A* pathfinding to navigate to where they last saw you/where they heard a gunshot. I’d say the A.I. in this game was a bit more complicated than Frog Hop. Since there was a lot more to check in terms of going into certain states and exceptions when stunned or hurt. Actually, probably the most difficult part with coding this A.I. was actually their dimensions, since most top down games have characters with even dimensions vs having tall sprites.
Now if you want to marvel at complex A.I., take a look at none-other-than Franchise Wars. Programmer, Austin Huebner did an excellent job on the A.I. when it path finds it’s way through the map and check for things like properly positioning itself to attack. (The example below does not demonstrate it but uh….yeah)
I can’t really remember too much about the Tic-Tac-Toe AI other than that depending on certain circumstances it picks a random spot sometimes to at least simulate human error, otherwise if it knows it can score the last point it will go for it. So basically it’s designed to be extremely smart and make the best move, but randomness is also applied and will sometimes make a dumb move (if it’s not a winning/blocking move).
Tic Tac Toe can only go so far with A.I. behavior (which is probably why the tutorial wanted to teach it through this game type). Since really if you wanted to make the A.I. super easy, you’d just make them make really stupid moves that don’t block, don’t line up or give them a chance at score (or just make them purely random). And to do impossible difficulty you just remove the randomness.
enjoy,
-Brandon