How it started
It all started when i found myself scrolling through reddit and i came across a post talking about the upcoming Reddit Devvit hackaton. At first i didn't really cared much about it, mostly because i have come across so many hackaton announcements and most of them where for things that either required a big team or required the use of technologies that i was just not familiar enough to build something in X amount of weeks. But then after reading more thoroughly about the competition, investigating a little about the Devvit platform and what could be achieve with it, and taking into account that i already had some experience working with web based apps, i decided to give it a try.
Initial idea
At first i tried making a 3D maze game using the Three.js Template on the Devvit platform. How hard could it be? i thought, only to realize very quickly that the amount of work that goes into a 3D game like the one i wanted to make, and added up to the fact that i also had to add a wow factor to it as well as battling through the Reddit framework to understand the structure. It all piled up and very soon I decided to ditch the idea and go for a 2D game that allowed me to add more content overtime without having to create each asset by hand, and also that had just enough personality that allowed it to stand out from the rest of games and ideas. All while giving me a more clean and easy path to program each and every aspect and mechanic of the game without giving me a headache. Finally after all the thought process had been done, ViralJutsu was born.
Inspiration
I needed something quick, fun and easy to play on any device and browser. Because of this, I wasn't going to make another oversaturated platformer or a game that had too complicated mechanics on it that could potentially be seen as intimidating or overly complicated for users that came across it. Cause let's be real..., we are talking about a game inside a tiny post in a remote subreddit across the whole reddit, so, of course, i wasn't going to be making the next Game of the Year with the limited tech and time and people that i had at my disposal.
That's when i had the idea, "What if i made a Fruit Ninja type game where instead of fruits you slashed memes?" a pretty basic idea of course, but this meant that i could use the 1000s of meme PNGs that exist across the internet as entities for the game, and at the same time it meant that i could spend less time crafting a character or asset, and focus solely on the core mechanics of the game.
What it does
As i mentioned above, it's basically like taking Fruit Ninja and slapping a bunch of memes, subreddits, characters, and viral stuff on top. Of course i couldn't replicate every single aspect of it in my game, so i focused on the core aspects: effects, feedback to the user, gameplay, challenging experience and simple design. All while trying to make the game as simple as possible, while still keeping it engaging enough to be a fun little game to play on the mean time and maybe even have a laugh.
How we built it
Using the Phaser.js Template on the Devvit platform i started to work on the project and get used to the structure and technologies of it, the project composes mainly of typescript for the type safe code, express, redis and the Reddit API on the backend, and then Phaser.js for making the game as such. As well as jsfxr for the sound effects of the game.
Challenges we ran into
It was really hard trying to figure out how to use phaser blindly and also adapting to the hiccups of the Devvit framework with stuff like CORS, 505 errors, and in general problems when trying to make API calls to external sources, mainly because at the start of the development, i wanted ViralJutsu to have Every subreddit's icon (Excluding NSFW) as an entity, and to avoid having to store images locally i tried to use the Reddit API for accessing subreddit info, which.... went very bad, as i couldn't figure out the restriction errors for external API calls on Devvit, so i ditched that plan and decided to store all images and asset icons in the public folder.
Then there was figuring out the physics related issues and the general mechanics of the game, for this part i had to heavely rely on AI and Docs to walk me through the process, but at the end, and after a lot of tweaking i manage to figure it out and go forward with the game.
Accomplishments
I manage to have the game in an acceptable MVP state for submission to the hackaton, and with enough time to tweak little details and redact this description XD.
What we learned
I learned the basic flow for working with the phaser.js library to make 2D games on the web.
What's next for ViralJutsu
I want to keep working on it so i can get a big community of people that enjoys it and for people to use it on their subreddit, hopefully with an integration so each subreddit can add it's own themed content to the game and see it in action. As well as taking user feedback to improve and polish the different aspects of the game, and make a true challenging arcade experience out of it.
Built With
- devvit
- express.js
- phaser.js
- redditapi
- redis
- typescript
Log in or sign up for Devpost to join the conversation.