It’s been a month since the SHiT6 event concluded. I just got time to write this article after I did some travel to Singapore, and do home isolation after I tested positive for COVID. Originally, I should publish 2 articles about this event already but I left them abandoned so I decided to merge them into this article.
This will be the story of my contribution to organizing The ៦th Stupid Hackathon Thailand event from preparation, to the finish line.
Before the event could begin, we have to distribute tickets to contestants first. We could just publish all tickets to Eventpop, and let everyone grab them by themselves but what’s the fun in that?
So instead of just distributing tickets normally, we also reserve some tickets to be used to create challenges as well. In which, there’re multiple challenges made by different people such as.
- Beyond the canvas: A CTF (capture the flag) finding ticket code hidden in CLI
- Treasure Hunter: Guess ticket code based on hints hidden in the picture
- I’m not a robot challenge: Are you a captcha lover? Enjoy solving 20 captchas in a row to get a ticket.
And Stupid Adventure a text-based adventure game created by me.
The idea came when I’m playing Saints Row IV and came to the part where we play a text-based game to get Kinzie out of the simulation world. This reminded me of the scene in the TV series Mr.Robot as well where Elliot tries to stop a nuclear reactor meltdown by playing a text-based adventure game.
It let me think that there’s not much quite this genre of game left nowadays, and it should be the easiest method to make a game as well.
So I would like to challenge myself to make a text-based adventure game.
And the result is marvelous! I manage to make a game engine to drive a dialog that also provides conditional actions, an inventory system, and adaptive dialog with about 100 lines of code. Everything is type-strict, so the game engine can be reused to make other games in the future as well. Also as an extra challenge, I want to get out of my comfort zone and write the entire front with SolidJS as well.
This project is open-sourced on my GitHub, feel free to dig into the code and try to finish the game by yourself. Let me know how long you finish the game on the first try.
Hackathon: Reward distribution
In the history of entire The Stupid Hackathon Thailand, rewards are not distributed by prizes (1st place, 2nd place). But instead, rewards are being distributed by pure randomization. In this event, we still want to make rewards distribution to be randomized but also have skills involved as well.
This is the challenge that I’m thinking of together with Japan, Wit, P’Thai, and Poom during the hackathon overnight (this means that halfway to the hackathon and we still don’t have any system to distribute rewards just yet). We keep thinking hard…until we saw a carpet on the floor.
As a result of brainstorming, we solidify an idea and came up with a throwing game the user will throw an object onto a carpet. Then we will have a reward table 3D overlay onto the carpet, wherever the object stops it will be a reward that the user will get.
After we finalized the idea, I get to work with Japan right away. During development, P’Thai also guides me on the knowledge of
matrix3d() which led to creating a never seen technology to calculate 4 coordinates from video feed into a 4x4 homogeneous matrix.
Quite impressive, at first P’Thai also thought that I might have over-engineered this stack too much. In my opinion, yes it is too over-engineer using jQuery, and React as frontend already but also using Prisma, and Vercel as backend as well. But it comes in handy when we have edge cases where we have to immediately add more rewards into the pool live on production while the event is playing. So…that’s quite something.
And it also lets to this crazy supercut as well
This project is also published on my GitHub repo, feel free to look into my sins.
Even though I as an organizer need to help run the event, I also ended up playing hackathon overnight as well. But it was fun, that’s what hackathons are. Creating a solution to a problem during the limited amount of time.