Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Compact Conflict - my JS13k game (also, long time no see!)

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Compact Conflict - my JS13k game (also, long time no see!)
Jakub Wasilewski
Member #3,653
June 2003
avatar

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 :).

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

StevenVI
Member #562
July 2000
avatar

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

__________________________________________________
Skoobalon Software
[ Lander! v2.5 ] [ Zonic the Hog v1.1 ] [ Raid 2 v1.0 ]

bamccaig
Member #7,536
July 2006
avatar

Michael Faerber
Member #4,800
July 2004
avatar

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. :)

--
"The basic of informatics is Microsoft Office." - An informatics teacher in our school
"Do you know Linux?" "Linux? Isn't that something for visually impaired people?"

type568
Member #8,381
March 2007
avatar

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
Member #1,146
March 2001
avatar

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

OK, playing the game now...

bamccaig
Member #7,536
July 2006
avatar

Edgar Reynaldo
Member #8,592
May 2007
avatar

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
Member #3,925
October 2003

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
Member #4,069
November 2003
avatar

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.

[My website][CppReference][Pixelate][Allegators worldwide][Who's online]
"Final Fantasy XIV, I feel that anything I could say will be repeating myself, so I'm just gonna express my feelings with a strangled noise from the back of my throat. Graaarghhhh..." - Yahtzee
"Uhm... this is a.cc. Did you honestly think this thread WOULDN'T be derailed and ruined?" - BAF
"You can discuss it, you can dislike it, you can disagree with it, but that's all what you can do with it"

Jakub Wasilewski
Member #3,653
June 2003
avatar

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.

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

type568
Member #8,381
March 2007
avatar

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

Jakub Wasilewski
Member #3,653
June 2003
avatar

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.

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

type568
Member #8,381
March 2007
avatar

"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
Member #8,592
May 2007
avatar

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
Member #7,536
July 2006
avatar

{"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
Member #3,653
June 2003
avatar

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 :).

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

Edgar Reynaldo
Member #8,592
May 2007
avatar

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

This is a great little strategy game.

Mark Oates
Member #1,146
March 2001
avatar

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
Member #3,653
June 2003
avatar

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?

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

Mark Oates
Member #1,146
March 2001
avatar

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
Member #7,536
July 2006
avatar

Jakub Wasilewski
Member #3,653
June 2003
avatar

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.

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

bamccaig
Member #7,536
July 2006
avatar

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
Member #3,653
June 2003
avatar

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!

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

 1   2 


Go to: