Tic-Tac-Fˣᵒk-You

Tic-Tac-Fˣᵒk-You

31 devlogs
85h 23m
•  Ship certified
Created by Gangsta Ozcan

The Classic Kid's Game + Balatro + A snarky, cursing, and cheating AI who will do anything to bring you to the ground.

Play Today... If you dare!

Timeline

worked on hackclub/ai compatibility, currently borked, waiting for merge on hackclub/ai. I migrated to tools insstead of my shitty parser, currently broken due to hc/ai tool ssupport.

Update attachment

Ship 4

0 payouts of shell 0 shells

Gangsta Ozcan

2 days ago

Gangsta Ozcan Covers 1 devlog and 3h 33m

Use the new OpenAI API options from hackclub/ai, made mobile support better by adding a new tall: TWCSS variant to match horizontally oriented mobile screens. TOOD: implement mobile dragging on cards.

Update attachment

Ship 3

1 payout of shell 249.0 shells

Gangsta Ozcan

12 days ago

Gangsta Ozcan Covers 6 devlogs and 11h 25m

fixed ai, as of now, hackclub's AI model uses qwen32b reasoning. I added parsing support for <think></think> tags, which removed the clutter. Parsing regex was also fixed and it shows Thinking... when reasoning. This new model comes with it's own new personality... Have fun!

Update attachment

fixed an audio bug with the roulette gun. OK I'm actually gonna add mobile support now!

Update attachment

feat: add chemical reaction and roulette
-- chemical reaction
Spreading substance that acts as an empty cell but grows and consumes everything that touches it
-- roulette
what it sounds like, 1/6 chance for you to die, 1/6 chance for the AI to die. includes fun gun sounds!
-- details
quality: remove allowedDevOrigin
packages: upgrade all
remove: hardcore dev test page
add: help page for new features
change: lb TOP=100
refactor: filters and backend for card position validity.
refactor: split main game states into many components
fix: extend on static card is properly animated
change: card distribution sampling, you get hard cards more often with a base unlock of 1
impl: forcedwinner mechanic
fix: make prompt use human readable IDs
refactor: move audio equipment outside of the zustand store
add: wait until finished option for audio
refactor: audio is now async
fix: user-ui now waits for card calculations and debounces additional requests
fix: newboard RNG is now actually 1/5
fix: reduce volume on explode.opus

Update attachment

I changed all of the .wav and .mp3 files into .opus, which is much better for streaming and binary size. this improved the audio system load time by 10x!

Update attachment

add sfx: lose, explode, place, tie; link sfx(lose, explode, place, tie) -> game loss, interactive click, game place, game tie

Update attachment

I added a new sound effect! When placing MYTHICAL grade cards a new sfx plays. I refactored all from "\.*/" into from "@/{lib,components}/*" for imports. Lint, cleanup.

Update attachment

Ship 2

1 payout of shell 315.0 shells

Gangsta Ozcan

27 days ago

Gangsta Ozcan Covers 7 devlogs and 16h 11m

I added Win SFX! I also finished rewriting the audio system! The onWin system is now much cleaner on the client & server only issuing API calls when needed, i also fixed baby & infant mode, you can win now :skull:

Update attachment

Added free mode, reworked the audio system, visual bugs fixed!

I made the entire visual system work in layers of filters and finally mapped out every z-index that was used so no layer issues should happen! I blurred the bg of the how2play page so you could read the text.

volume control is now sqrt instead of linear, this mimics the human ear's perception of audio.

Added more credits for audio. began work on SFX!

Update attachment

CAN YOU HEAR THE MUSIC? I added a new playlist of one song to TTFU! Clicking anywhere will activate it. I need to fix a bug where it stops playing after you win, location.refresh nukes all my fuckin state. The song is BALATRO - [N163] by @LucasPucas. I did request to use it.

Spent too much time doing this :skull:

Update attachment

I redesigned the logo, readme, and documentation for the project. I spent considerable time working on refactoring the github page of this project. I commited a LICENSE to the repository, which I mistakenly forgot to do, I chose the strong copyleft AGPL-3.0 license for my project as it requires sharing. I added the hackatime badge to the respository.

I finally verified that opengraph works, you can now share links in discord/slack(not really, it cached it)!

Update attachment

fix fixed positioning with CRT filter and mouse; fix HOW 2 PLAY; fix font order; make 123 medals bigger; add taunt anim; fix auth buttons on small s
creens; pointer based card drops; hitbox highhlight on board; highlight X and O in AI responses

Update attachment

Configured open-graph and added a new icon + banner!

Update attachment

Added labels to the difficulty slider, added AI expreesions, you can talk back now!

Update attachment

Ship 1

1 payout of shell 966.0 shells

Gangsta Ozcan

about 1 month ago

Gangsta Ozcan Covers 16 devlogs and 53h 32m

MINIMUM. VIABLE. PRODUCT!

After just over 50 hours, I did it! The game is complete-ish!

In the last 3h 22m and 41s I added a new difficulty engine which samples cards based on a custom RBN function: max(b, 1 + floor(b + r(x - n)))

R = Rate/round, B = Base weight, and N = Unlock round

This formula has been adjusted to every card and difficulty. Especially HARD MODE. Which is now f*cking hard (I have not won, best I get is a tie)

FOR THE SOM PEOPLE: I added a HARDCORE mode. By default swearing is disabled. FOR THE STRONG-WILLED: Enable it on the home page :)

Mobile support is a negative, but the game works and it's kinda fun!

Thank you for all the support while making this!

Update attachment

HARD MODE IS IMPOSSIBLE ONG. I ONLY ONE ONCE AFTER 10 TRIES! I added new win modulation cards which can change the length to win! both you and the AI can use it. Also, its harder to get team cards in hard mode (why it is so hard now) you start with ONLY BLOCKED cards. To unlock team cards @ level 5, then re-unlock them at 24!!!

VERY HARD!

This is my only win, very hectic!

Update attachment

I added a new icon for the slack auth (see attachment)

I also made the hard mode even HARDER. YOU ARE FORCED TO A 5x2 GRID! HAHAHAHAH. Additionally, I played with oAuth for an hour. I found out that my app was requesting your email! (very odd!) I disabled it since it only needs your name for the AI and leaderboard.

Might ship soon?

Update attachment

Refactor Refactor Refactor Refactor Refactor Refactor Refactor Refactor Refactor Refactor Refactor Refactor Refactor Refactor Refactor Refactor Refactor Refactor Refactor Refactor Refactor Refactor Refactor Refactor

I remade the entire game logic and split it into many files.... I made hard mode harder by telling the AI to not expand sideways.

I fixed a few bugs because of the refactor too. I fixed the cursor and a few lag issues. The cursor now moves with the difficulty slider.

Update attachment

Added difficulty slider: You baby.

Update attachment

lint all files and add new xp events for special cards.

Update attachment

UGHH. I rebuilt the AI and it is quite smart now! I am using ai.hackclub.com for the model.

Why? Well, I got ratelimited by groq for the ENTIRE DAY within 10 minutes of sending the link into the slack chat. Yep! (If you know anything about groq limits, you know they are VERY forgiving with ratelimits). To solve this, I used hackclub's free AI API!

If you know anything about status of ai.hackclub.com, you may be asking the following questions:

- What! How! Doesn't that not work with tools?

- But it only does text, and you are controlling a game?

Yep! It does NOT support tools. That's why I built a custom parser (3 lines of regex :skull:) that controls the game by using things like this:
X|1|0 Which will place an X at (1, 0) on the board. The AI model outputs those XML-ish strings and my code parses them.

Well there might be one more question depending on wheather you have read the codebase: How did you get the hackclub ai api to work with the Vercel AI SDK?

Since the Hackclub AI API does NOT use SSE, but instead application/x-ndjson, which is a fancy way of saying a bunch of JSON then a new line, then more JSON (repeat until you get bored). SSE or Server-Sent events is a much better standard for AI streaming. I made a small fetch-wrapper and a OpenAICompatable:tm: AI SDK provider to wrap hackclub. It transforms x-ndjson to SSE!

I tried to use middleware for tools but it wouldn't parse correctly when accompanied with text. I could have just put the text INTO the tool call but this was more fun!

Pros:

- Faster inference! I also now use a much faster model that is more powerful and can play TT*U better!

Cons:

- Buggy ATM
- Kinda a step back
- Unreliable

It should be easier to maintain though, as I have almost no wrappers on the raw HTTP requests to the server now.

Mobile support is silently improving.... And I fixed the CRT effect on scrolling pages. It now sticks to the screen instead of staying at the top.

I fixed the win function so when the board is completely filled and no one has won yet, the game ends in a tie.

When playing cards that you have just received, sometimes the IDs get reused and the old cards reappear as ghosts from the past (id is the key in a react map). I added an ID counter which stores the highest ID ever seen per player. Now when you use cards you just got, they properly disappear.

Update attachment

New How to Play Page. I also began work on mobile support.

Update attachment

I implemented the block and neutralize cards. I added textures for them and textured the lowercase card.

More round-based deck leveling. Higher levels now increase the chances of cards unlocked on lower levels.

Update attachment

I remade the win function. It now computes every possible line inside of a NxK matrix of length L every time N, K, or L change. It stores this in a persistent state (not zustand, state does not need to update bc of this)

I also implemented dealing, so you get more cards after every other round (when the turn is the same as the starting turn, which is ALWAYS THE AI. THEY DOMINATE). Dealing is round based and you unlock more cards the more rounds you play. Ie You dont get Extend cards until level 3. The AI has them all by default though...

The AI is now fine tuned to play properly... it will end you. It can now lowercase your letters. (this is why I had to make that new win function). Unironically, the win function for the is 112 lines SHORTER than the CRT filter lmao.

The board is now fully centered on the Y axis as well, it also works better on small screens, however mobile is not supported yet, I am focused on making the game.

I fixed the CRT filter too, the scanlines move now.

The AI can now overwrite your cards, and make them lowercase too.

I added a new win screen which has some more formatting.

I fixed a bug where the Game could not remove the AI's cards.

Auth is disabled in dev mode in case you needed that.

Total AI prompt

BYE!

// TODO: Add neutral and blocked rendering + support in AI and human.

Update attachment

I finished the AI! Almost... I still need to add a few cards that it can play such as: Lowercase a letter (yes... they count differently), Block Cells, Neutralize cells, etc. All the fun goodies! Tool calls should now work better, i switched the model to groq's fine tuned llama.

I implemented full auth, you now HAVE to be signed in to use any API besides /api/auth / and /leaderboard (might change to ratelimit requests if it gets too bad...). If you are not signed in it redirects you to a helper /signin page.

XP now only gives XP for human events now, before the AI would give you XP... It's not that nice IRL believe me.

I added the Extend card and an animated GIF for it! It grows the board in the direction of the side it is closest to. I also fixed board CSS so it works with larger sizes now. Moreover, the indicies are now right for board display and AI model board input. I used the incorrect index formula ( row * rows + col instead of col * rows + row ) so alignment got fixed for non NxN boards (NxK etc).

You can no longer pick up the AI's cards. I could add this back and make it get mad at you but... too much work lel.

I ditched the event based system for human cards which sucked. Now, the card component just modifies state itself, and as a bonus, gives you the card back if the move was invalid!

General cleanup etc,

Added CQW container sizing so the letters in the board dynamically scale to the size of the board ( small cells = small letters )

Renamed XPsidebar to sidebar bc it now stores the AI model output for better visibility.

I fixed: applyCardToCell, extendCell, makeMove, winState

Better AI zod schema & System Prompt

I implemented winning! You can now win! It also should add your state to the leaderboard and you should be number #2 (im always #1 :) ).

Technically I can release this rn, but I wanna send it to the #summer-of-making channel and let them weed out the bugs lol.

This IS MVP!

PLAY IF YOU DARE /cringe-warning

Update attachment

NEWSFLASH: The AI works now!
I'm using groq + AI SDK to do the AI end of things, and it has been a breeze to implement. The AI can play moves (Extend, X, O) which are just Cards + Position/Direction data. I will add more cards then publish soon.

Update attachment

INTEGRAL + AI2

ADD AI. REPLACE HUMAN. MANUFACTURE CELLS............

Update attachment

Better card mechanics, you can now place the cards into the board.

Build Status: Not pushed, not building.

Update attachment

AHHHHHHH THIS HURTS!

I finally made a balatro-style card ebgube hkjhd react component. THIS TOOK 5 HOURS AAAAA. I NEED SLEEpp. Also i made a better CRT filter. IT BENDS THE SCREEN! IT ALSO BREAKS YOUR PC BY TURNING ON THE FANS! HAHA I NEED SLEEP.

Update attachment
Gangsta Ozcan Gangsta Ozcan about 1 month ago
SVG filters and displacement maps, along with some animations. See my repo for more info. Specifically src/crt.module.css and src/layout.tsx (The SVG filter)
WheeledCord WheeledCord about 1 month ago
HOW DID YOU DO THE CRT FILTER!! IVE BEEN TRYING FOR AGES

Implementing version 0.1.0!!!!!!! Here's a screenshot from the main branch! NOTE: Please do NOT use the auth yet, I am trying to test it.

Update attachment