Staś Małolepszy Profile picture
Apr 15, 2021 36 tweets 14 min read Read on X
Gamedev.js Jam 2021 is happening over the next two weeks, and @michalbe and I are making a turn-based strategy game inspired by Risk.

#gamedev #gamedevjs #gamejam #javascript Image
The jam's only restriction is that the game must be playable in a web browser. It's a refreshing change from the size-constrained jams that I typically take part in. I'm not used to not having to worry about the code and assets size.

itch.io/jam/gamedevjs-…
For the last year's Gamedev.js Jam we created an idle clicker game: Time Is Money. I wrote a short thread about it back then:
This year's theme is 'Mirror.' Our idea so far: a turn-based strategy game similar to Risk, where the goal is to conquer the world, region by region and continent by continent. Except that the world map is mirrored.
It's a subtle connection to the theme, but I like it how uncomfortable and alien the Earth looks like when you change the frame of reference. Image
The effect is perhaps even more powerful when the map is upside-down. What planet is this and where did all this water come from? Image
"Research suggests that north-south positions on maps have psychological consequences. In general, north is associated with richer people, more expensive real estate, and higher altitude, while south is associated with poorer people, cheaper prices, and lower altitude."
I've been meaning to try to build a turn-based strategy game for some time now. And the idea came back to me after spending most of the winter playing HoMM 3 and Total War: Warhammer 2.
Both @michalbe and I remember playing Risk back when we were kids. The rules are simple enough for a 2-week-long jam. Creating the opponent AI might end up being an exciting challenge.
We'll be using the path finding example from Goodluck to bootstrap the game. I don't think we'll need actual path finding, but the example already has some tech for picking objects with the mouse and ordering them around.

gdlck.com/#PathFinding
According to Risk's rules, Europe has 7 regions. I modeled them in Blender and made them pickable via a ray cast from the camera. The raycasting code computes the exact point of the intersection on the mesh. It is then set as the destination for the cube's navigation agent.
I've added camera controls (panning, rotating and zooming) and replaced the cube with a 19th century soldier. It's starting to look like Risk!
The soldiers now know which territories they can move into from the one they're currently occupying. In the video below, the units in Iceland can only move to the UK and Scandinavia.
The graph of connections between territories is based on this schematic of Risk's board from Wikipedia: Image
We've got real-time shadows!

#gamedevjs #mirrorisk
This is huge for me personally. In my mind shadow mapping had always been a feature too advanced for me to build it myself. I'd always told myself that perhaps one day I'd be able to do it. Consequently, all @pieskucom's web games so far shipped without shadows.
Well, Mirrorisk will be the first one to ship with shadows! What helped were all the intermediate steps: I built a few render-to-texture demos in June 2020 (WebGL1 and WebGL2), as well as a deferred rendering pipeline in desktop OpenGL (December 2020) and in WebGL2 (April 2021).
So even though you could say it only took a half day of work today to implement shadow mapping in Mirrorisk, in reality it's been almost a year in the making, through various coding experiments and learning resources.
In particular, I've found the following two articles very helpful: learnopengl.com/Advanced-Light…
The idea behind shadow mapping is to first render the scene from the light source's point of view to find out which objects are visible, i.e. are illuminated by the light.
In the second pass, we render all objects from the main camera, as we normally would, and we use the data from the first pass to decide which fragments to dim—the ones that weren't visible from the light's POV because they were in the shadow.
So... because we want to first render the scene from the light's POV, it's as if the light was a special kind of camera, one that renders to a framebuffer rather than onto the canvas. With the ECS architecture, expressing this idea is rather elegant: Image
To prove that these really are real-time shadows I've implemented the day light cycle this morning:
Post-weekend (day 6) update: @michalbe implemented turn-based gameplay which allows any number of human and AI players to play against each other. We're experimenting with using the day-night cycle (see above) for the end-of-turn effect.

#gamedevjs
Day 7 update: I modeled other continents and added work-in-progress textures. I wasn't going for the brass sundial look, but in fact it doesn't look too bad. I'll try adding more color to the world map to make it look more like a proper board game.

#gamedevjs
Day 9: I implemented roughness and normal mapping to give the meeples a more wooden look. They look a bit like they were made of chocolate, though. I'm also experimenting with hand-drawn textures and you can see that I'm not very good at drawing.

#gamedevjs Image
Day 12: We've settled on the art direction for #Mirrorisk. We're giving it a home-made feel of a board game cut out of cardboard and painted by hand. The meeples already look a bit like they're 3D-printed which fits this style quite well.

#gamedevjs Image
I went the analog way to create the board textures. I exported the UV layouts from Blender to SVG and I used a pencil to manually copy the outlines of the territories onto a sheet of paper. ImageImage
I then filled the outlines with watercolors, allowing the different shades to freely mix on the paper. I hope I won't sound too ignorant when I say that before today I thought watercolor was… easier. It's crazy how you can paint with water and only add the color later! ImageImage
I also drew the icons to be placed on the maps to breathe some life into the board. I never draw, so I'd looked at a lot of hand-drawn maps to find inspiration and learn (i.e. copy) drawing techniques. ImageImageImageImage
On second thought, it's not very different from programming, is it? Step 1: Find things on the internet. Step 2. Copy them.
Lastly, I scanned everything and put it all together in Inkscape, which gives me the ability to tweak sizes and positions later on. Here's the final colored texture and a version with only the outline (not used in the game for now, but it looks cool). ImageImage
Here's what the entire board currently looks like. I still need to add icons to 4 continents out of 6, but I'm happy with the result so far. Image
After a busy weekend, it's time for the Day 14 update: #Mirrorisk is live!

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Staś Małolepszy

Staś Małolepszy Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @stas

May 3, 2022
Two weeks ago over Easter I started working on a submission to the @Gamedevjs Jam. The theme was 'Raw,' and I wanted to create a processing pipeline simulator. This is how Super Simple Salad Simulator came to be. #gamedevjs

stas.itch.io/super-simple-s…
It's my hommage to The Incredible Machine from 1993, and also to the vegetable salad, sałatka jarzynowa in Polish. It's a springtime treat in Poland. The full list of ingredients includes potato, carrot, green pea, apple, pickled cucumber, onion, boiled egg, and mayonnaise.
When researching it for this project, I learned that the salad apparently started as a completely different recipe with many kinds of meats in it. Depending where you are, you may know it under the name of the French, the Italian, or the Russian salad. en.wikipedia.org/wiki/Olivier_s…
Read 13 tweets
Apr 10, 2022
Last weekend I made a tiny action game about being an alarm clock on wheels.

Presenting: You Are The Snooze Button.

#LDJAM #gamedev #webgl
You Are The Snooze Button can be played in all modern browsers, both desktop and mobile. It only takes a few minutes to finish it.

Play it here: piesku.itch.io/snooze
You Are The Snooze Button is a submission to Ludum Dare 50; the theme was 'Delay the inevitable.' I entered the Compo category, which meant the game had to be made solo, in less than 48 hours, and with original assets only.

ldjam.com/events/ludum-d…
Read 16 tweets
Sep 13, 2021
ESCAPE is a 2.5D puzzle platformer in 13KB of HTML and JS (zipped) by @michalbe and myself. It's a short story about wildlife and nature on Earth after mankind leaves for good. You can play it right now in the browser on desktop and mobile.

#js13k #gamedev #javascript #webgl
In ESCAPE, you solve environmental puzzles as you progress through a misty world abandoned by people. We were inspired by games like @Playdead's INSIDE and movies like @bladerunner, and we tried to convey a sense of loneliness, remorse, and confusion.

#js13k #gamedev #webgl ImageImageImage
ESCAPE fits into a 13KB Zip, but we built it using fully-featured tools. All our assets, props and scenes are built in Blender and imported into the game as GLTFs. They take up a large part of our size budget, leaving even less space for the engine code and game logic.

#js13k ImageImageImage
Read 8 tweets
Aug 23, 2021
It's August again which means @michalbe and I are taking part in @js13kGames! This year's theme is Space.

We're joining a week late with a new idea: a 2.5D puzzle platformer on Earth abandoned by humans and reclaimed by nature. #js13k
When the theme was announced over a week ago, we spent a few hours on Saturday and Sunday brainstorming game ideas. And to be frank, we didn't like any single one of them. They just didn't seem to click.
Most of them weren't even game ideas, just plays on words that could dub as game titles, but nothing more. There was RequiesCAT in Space (probably a game about an astronaut cat), Spaciba (probably a game about cosmonauts), Space Bar (probably a game about managing an inn?)...
Read 49 tweets
Aug 29, 2020
I managed to get simple 3D physics working in the prototype for my WebXR game for #js13k. Best part is, I'm not using any extra libs! It's all vanilla JS, clocking in at 9 KB right now. The hand mesh alone is 3 KB so I'm sure there's plenty room for optimization, too.
More #js13k progress! I added toon shading, a few textures, and replaced the hand mesh with a paw which has fewer vertices. This is now still around 9 KB zipped!

Have you ever wanted to be a Godzilla wreaking havoc in a city?
I added rooftops to each building type and a road texture, but really, this tweet is about the fire breath.

Check out the fire breath, everyone!

Build size: 11 KB. #js13k
Read 31 tweets
Jun 20, 2020
Part 2 of this experiment starts right now! Today, I plan to implement projectile, wall and pickup collisions. I'll generate the terrain procedurally, and I'll add a simple UI.

With this set of features, I want to build an MVP version of the game: loading a map, advancing through it, killing enemies and picking up items, and finally finding the exit.
The idea behind this milestone is twofold:

1. Test and evaluate the core gameplay loop. Show it to other users and gather early feedback.

2. (If this was a compo game) Have something that can be submitted at any time, in case I can't finish the game for any reason.
Read 89 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(