Compact Conflict - my JS13k game (also, long time no see!)
Jakub Wasilewski

Hello everyone,

It's been a long time since I posted or visited here, but maybe some of you still remember me :).

This community is the place where I got my game development chops, so I try to announce every completed project here, even if they usually have little to do with Allegro anymore (but then, the off-topic forum never had much to do with it anyway).

So, without further ado:
My entry for the JS13k competition
Bonus! Blog post on implementing the AI for the game

Obligatory screenshot:
{"name":"608913","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/b\/bbfba9147ea6902cf85bfe5cd7ab5598.jpg","w":1000,"h":565,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/b\/bbfba9147ea6902cf85bfe5cd7ab5598"}608913

Enjoy. Any feedback is, as always appreciated :).

StevenVI

You should have mentioned that it was a web browser game, I nearly completely ignored it because of the lack of details. :)

That said, I couldn't really figure out how to play it. :( I'm not really into games that I have to do a bunch of reading for, since I'm illiterate. :-[

My only critique at the moment is that the angular menu was difficult to read, which probably impacted my lack of interest in trying to figure it out. Even with my gigantic monitor (like 23" or something) the text on the menu was hard to read. If it were flat I may have expended more effort in playing it.

Edit: To be more constructive, as I see it looks a lot more legible in your screenshot, this is what it looked like on my end with the latest version of Firefox under Windows 7:

{"name":"608914","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/6\/f698fb380eb1698e0965e8932fe617af.jpg","w":1524,"h":931,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/6\/f698fb380eb1698e0965e8932fe617af"}608914

bamccaig

Nice work! I suck at these kinds of strategy games, but I played one game and it's quite polished.

Michael Faerber

I really enjoyed your game!
What I didn't figure out at first was how to choose your number of armies you want to move. I always clicked onto the armies, but it took some time until I figured out I had to click next to them.
Also, at the end, it says "bellow", in "Click the button bellow to start a new game."
Often, I moved armies by accident. For example, I click on one field where I have some armies, then I click on another field where I also have some armies (to look at which regions I could reach), only to discover that I moved all armies from one field to the other. Argh!
Just played it a second time, and this time, I won. Again, great game. :)

type568

It's awesome. I played like seven times now.
Append:
I don't get what does the fire temple do.. (invisible soldier? wut?)?

Mark Oates

OMG Jakub Wasilewski! :D How you doing? Good to see ya! ;D

OK, playing the game now...

bamccaig

I wish more people would come back, even just to say hi. :(

Edgar Reynaldo

Welcome back, Jakub!

Amber Wins! (That's me) on my 2nd attempt.
{"name":"608915","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/6\/d6903e2835140f194a49556ea446e1bd.png","w":1280,"h":800,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/6\/d6903e2835140f194a49556ea446e1bd"}608915

Amazing what you can do with HTML 5 and CSS these days. Just how much of a giant hack is it to program in html?

Gideon Weems

I remember you, but don't change your avatar, or I might forget.

I really like the twelve-turn limit mechanic. It's great that your game is playable in-browser, as well. My only real complaint is that attack results are unpredictable (unless I'm missing something).

OICW

Hi there, Jakub, welcome back. Nice game, reminds me of an old addictive flash game called Dice Wars which was inspired by Risk! It looks polished, though it wasn't very responsive in my browser but I think that's a problem on my side with JS. Also the menu fonts weren't crispy but with some rough edges. Anyway, it's challenging.

Jakub Wasilewski

Thanks for all the feedback, and glad that some of you found it fun to play! The results are coming in today by the way, but I'm not very hopeful - other games are killing it on Twitter, while mine is pretty much ignored.

Amazing what you can do with HTML 5 and CSS these days. Just how much of a giant hack is it to program in html?

You should really check out the other entries. Mine is not the most technically impressive by a long shot, and I'm looking forward to cannibalizing their source code to learn for the next time :).

Quote:

Just how much of a giant hack is it to program in html?

The modern day JS is much closer to traditional game development than ever. My game is kind of hacky (I rely on the DOM a lot), but you don't have to go that way. Many others are canvas-based, where you have a more traditional approach. And with new APIs, getting things like audio or 3D (through WebGL) is easier than ever.

OMG Jakub Wasilewski! How you doing? Good to see ya!

Good to see you too! Doing pretty well for myself, just moved to a different city and a different job.

How is taking over the music industry going these days? :)

OICW said:

Nice game, reminds me of an old addictive flash game called Dice Wars which was inspired by Risk!

Both Risk, and to some extent Dice Wars are on the list of inspirations.

type568

Damn the game is epic. But I still don't get what does the fire temple do :(

Jakub Wasilewski
type568 said:

invisible soldier? wut?

Invincible :). In other words, if one of your soldiers would die during the attack, he won't (you always take 1 less casualty).

It was kind of hard to explain the upgrades inside those small buttons, I admit.

type568

"Always take one less casualty in an attack." Would do as an explanation. Thanks for the clarification btw. :)

An really good job. Very well done.

Edgar Reynaldo

You should really check out the [js13kgames.com] other [js13kgames.com] entries [js13kgames.com]. Mine is not the most technically impressive by a long shot, and I'm looking forward to cannibalizing their source code to learn for the next time :).

Ooh - Virtual War is pretty cool! Air Fury was kind of difficult, and you could easily leave the screen. Pinto Racer was alright, but the collision detection with the cones seems wrong, and they aren't animated when you hit them so you can't tell if you did or not... But visually I had no idea HTML5 could be used that way. Where do the graphics come from? Ie - how do you paint the screen in HTML5?

Can't tell if I like the 12 turn limit or not - it was probably the only reason I won - Lavender had way more armies than I did, but I had more territories because he played defensively and I did not. If the game went until someone took over the whole world that would have been okay with me, but the 12 turn limit helps get the game going. Don't want to waste time. ;)

bamccaig

{"name":"608916","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/0\/e07bca96a16728055f34eee81cf99e5e.png","w":2030,"h":1049,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/0\/e07bca96a16728055f34eee81cf99e5e"}608916

One win for me! On easy... With 2 AI players...

Append:

{"name":"608917","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/a\/4a70d8c31b3b722c072136c8e510467a.png","w":2024,"h":1051,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/a\/4a70d8c31b3b722c072136c8e510467a"}608917

Whoo, second win. Still easy, but this time 3 AIs! 8-)

Append:

{"name":"dQTgmkZ.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/7\/f752fda1ec05487b7444b6a9fa6bd519.png","w":2021,"h":1053,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/7\/f752fda1ec05487b7444b6a9fa6bd519"}dQTgmkZ.png

Whoo, third win. This time difficult against 3 AIs! 8-)

Jakub, your game might not be as technically difficult, but at least it's actually fun. I think you have a good chance. The only other one I tried was the rally one. It was an interesting tech. demo, but not very fun at all. It was also choppy, and I have a decent rig...

Append:

{"name":"OZt0tcW.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/0\/70d7f2ea56c4abf13afeca8903671089.png","w":2026,"h":1050,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/0\/70d7f2ea56c4abf13afeca8903671089"}OZt0tcW.png

Whoo, forth win. This time unfair against 3 AIs! 8-)

I find the only real strategy to this game is picking a map with few flanks. In this last case, one of them (lavender perhaps?) started in the lower right corner. I started in the right middle just above. I accepted this map as a bit of a challenge since it wasn't an ideal configuration, but the AI got greedy and after taking those 2 extra temples moved its forces to the top middle temple. I retreated initially, but after they passed me by I managed to move in and take its under manned temples without much trouble. It was smooth sailing from there. I just kept my forces strong on my fronts, and tried to match any forces that looked threatening to my position.

Append:

There's nothing particularly wrong with the 12 move mechanic, but I think having the option to play to the death (during configuration) would be a nice alternative game mode. Games are supposed to be fun, and as fun as it is to win, it would feel even better to drag it out as long as possible and literally conquer the entire board (this might also make for some crushing losses).

Append:

Adding networking support would be great too. This is a fun game, but the AI has its limitations (just working my way through the blog post now to try to understand the work you put in). Playing against human players is the obvious solution to the problem: the AI was written for you by a much smarter force. That said, I do not often find myself in a room with people interested in playing. I envision #allegro having quite some fun with this linking up with each other and going head to head to head to head. There are certainly challenges involved in turning this into a networked game (and you'd presumably have to rewrite parts to make it server-side), but I can see it being lots of fun.

On second thought, I'm not sure the game really scales to human players. It seems like a very "hand you were dealt" kind of game, which would get old pretty fast for the players in the worst positions. Balancing that out would be tough.

Jakub Wasilewski

So, I got 10th overall, 4th on mobile (tablets in case of my game) :).

bamccaig said:

On second thought, I'm not sure the game really scales to human players. It seems like a very "hand you were dealt" kind of game, which would get old pretty fast for the players in the worst positions. Balancing that out would be tough.

It works pretty well for humans (we've tested it a lot that way), although once people stop making mistakes, there is usually a very decisive moment around turn 6/7. Most games we had, second place was within 1-2 regions of the winner.

There is however a problem that a critical mistake at the early stage ruins your chances completely.

Quote:

12 turn limit

The limit is there to ensure that there is a decent amount of gameplay and a satisfying resolution at the end. Play until you crush them only works against AI (human players get bored way before you can take their last region).

Many people asked for an unlimited mode though, so I'll probably add it soon :).

Edgar Reynaldo

Congratulations on a complete game, and on your standings! That's not too bad. ;)

This is a great little strategy game.

Mark Oates

This game is really cool. My girlfriend and I are addicted to it and last night I played the game for probably about 7 hours.

I've played it on my win 7 laptop and my Sony Xperia Z tablet (which works really well but has crashed a couple of times, though I'm not convinced it's related to the game and might be a problem with the browser/os because it does that).

Winning all the spaces and defeating your opponent seems to be the ultimate challenge, which I've managed to do three times:

{"name":"608926","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/f\/8f6d99bd86808bc43e23f1e9d56f6553.png","w":1919,"h":1004,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/f\/8f6d99bd86808bc43e23f1e9d56f6553"}608926

Doing this in JS in < 13k is pretty cool :) There's a lot of gameplay you must have worked hard to balance and integrate in there. I'm impressed.

Here are my criticisms, and there are a couple things that could solve it:

  1. Having an undo button would be nice, there were several times when I accidentally meant to select a different plot of attackers and ended up moving them. I like the idea of strategically making a wrong move, but too often my finger slipped or I mis-read the UI and accidentally moved pieces.

  2. Making a more clearer distinction between selecting land and moving with the selected pieces can help.

  3. Alternative play modes, like different number of turns (Maybe 7, 12, 16?) An unlimited mode (would be really cool), and/or larger and smaller maps.

After playing for a long time, I also began to notice a pattern that the game is pretty straight forward until about turn 6-7. Like you said, that seems to be when the decisions and strategy starts to come in to play. :)

My girlfriend has a 5-inch tablet (mine is a ~7 inches), and it's playable on both, but on hers it's a little small. She recommended changing the perspective to not skew so much, and on that note, I also would prefer to have the menu on the right side (being right handed and all).

But other than that, yea, I can't stop playing :) I'll probably play for hours still. Playing this even makes me want to code up my own version in C++.

Jakub Wasilewski

Mark:

Glad you like it so much! You'll probably be happy that suggestions 1) and 3) from your list are already implemented :). You can check them out here(the most up to date version is always on GitHub pages).

There are a few improvements (mostly AI and graphics-related) I want to do, and then I'm going to officially call this updated version 1.1. I might also change the fire temple a bit, as it's both pretty weak and hard to understand right now.

As for tablet gameplay: deskewing the view doesn't buy you that much (I've tried). I'm afraid I'd have to rethink the whole UI for <6-inch screens, with a fullscreen map and foldable/pop-up menus. Not sure if I'll find the time to do that.

Oh, and major props on getting the whole map in 12! Which difficulty was this on?

Mark Oates
Quote:

Which difficulty was this on?

Oh, just the easy mode.

Unlimited mode definitely has some different gameplay dynamics:

{"name":"608928","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/f\/ffee7cedd51684a102c7eea9f8146478.png","w":1028,"h":753,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/f\/ffee7cedd51684a102c7eea9f8146478"}608928
winning. 8-)

bamccaig

:D

Jakub Wasilewski

Had to tweet that image :). Still, maybe it's a reason to reconsider adding the unlimited turns option... or at least introduce some caps on money/soldiers per round.

bamccaig

At least put a limit on the number of soldiers that can occupy any one territory. That will get rid of that little "bug" of soldiers falling off of the screen.

I only played one unlimited game, but it was disappointing. One of the AIs was quickly overpowering all others, and I was the helpless bugger in the corner. :(

You could tweak the AI to force itself into hopeless battle in a case like Mark's i.e., only one remaining opponent and surrounded by overwhelming forces? Hail Mary!

Jakub Wasilewski

Necro thread resurrection!

Just letting you guys know that there is a new version if you want to play it, with configurable game length, AI and UX improvements and bugfixes galore.

Probably a few new bugs, too :).

Anyway, I think that's going to be it for Compact Conflict. On to the next project!

Edgar Reynaldo

Jakub, your latest link gives a 404 not found error. Otherwise I would try the new version...

furinkan

Very polished, very simple, and very good! Love it! ;D

Jakub Wasilewski

your latest link gives a 404 not found error.

That's just because apparently, I can't type.

Gideon Weems

Necro thread resurrection!

Clearly you have been away too long.

Michael Faerber

Your game is so addictive, I cannot stop playing it! I have easily played over a hundred matches over the last days. o_O

What I would like:

  • Undo functionality

  • Ability to select troop force by clicking on number of soldiers

  • Fairer map generation

  • Harder AI :)

Put it on some App store and become a millionaire!

[EDIT]
Just saw your new version. :)
While I like the Unlimited Mode, I find that the eyecandy (particles, transparent +x faith tooltips) distract a little bit, and they slow the game down for me, i.e. are not fluent. Would be nice if you could switch that off somehow.

Mark Oates

Yea, I played for about 5 hours yesterday again. I think I got it down, I can beat "evil" on 4 player mode.

I guess the only change I can think of now, would be to show larger sizes of armies (maybe 20+) with a little number overlay.

Edgar Reynaldo

Yeah, the change to showing large armies as concentrated groups of what looks like only 20 seems a step in the wrong direction. Seeing the whole massive army lined up is kind of cool, but a number overlay would be good too.

This game is very addictive, but not much of a challenge anymore. The AI is either too conservative or they spend time fighting amongst each other, both of which lead to victory over them.

Edit
Out of curiosity, what are the battle mechanics like? How is battle resolved?

Thread #614658. Printed from Allegro.cc