Live data from Hacker News

Game about squares

gameaboutsquares.com

171–180 of 208 posts

Re: Game about squares

#171

Solver and solutions: https://gist.github.com/CyberShadow/39f43cf25dac0534f8a9 The solver uses BFS with delayed duplicate detection for pruning visited states (instead of, say, hash tables). The DDD part can be summed up in two lines of code: prevStates = (prevStates ~ states).sort.uniq.array(); states = nextStates.sort.uniq.setDifference(prevStates).array(); // ... expand states into nextStates ... These were part o…

DDD was new to me, and I was wondering how sorting all previously visited states could be faster than checking a hash table. The answer appears to be:

1. Duplicate detection is done delayed and in bulk, not after expanding each node

2. The linear memory access of the bulk check is more cache friendly than random-like hash table access

Allow me to quote from the first Google result:

Surprisingly, delayed duplicate detection is useful even when all nodes fit in memory, resulting in reduced running time due to improved cache performance. In the standard implementation of breadth-first search in memory, the Open list is stored in a hash table. As each new node is generated, it is looked up in the hash table, which often results in a cache miss, since the hash function is designed to randomly scatter the nodes.

http://www.ijcai.org/Past%20Proceedings/IJCAI-2003/PDF/267.p...

Re: Game about squares

#172

Earlier quoted context omitted.

I'm curious what would stop someone from directly copying his code and sticking it in an webview of an android app.?

Somebody will definitely do it, on a throwaway dev account, but the original developer will only need to file a complaint and that account will almost certainly get banned for such blatant copyright infringement.

Well if the copier is intelligent enough it would easy and not time consuming at all to change the code in ways that would prevent such infringement laws to step in.

Re: Game about squares

#173
post #74

Advice to author. Create iOS and Android versions of games ASAP. You are just hours away from getting cloned on app stores.

I'm hoping the author is way ahead of us. If he were smart, the game should be approved in iTunes and uploaded to Google Play, just ready for him to click "Publish" the moment this web version picks up some traffic. Otherwise, Google Play will have a clone by the weekend if not sooner, and iTunes, maybe a week or two.

I'm the author. I'm not very smart...

Re: Game about squares

#174

Earlier quoted context omitted.

I can't seem to get past level 17. The black and red squares always end up on the wrong sides.

You're going to love level 18 then!

If you're really stuck, here's a walkthrough/solutions for levels 0-20, https://alicious.com/game-about-squares/.

Re: Game about squares

#175
post #152

Earlier quoted context omitted.

http://stackoverflow.com/questions/12566306/how-to-test-for-...

It doesn't answer why they want to do this in the first place.

A lot of site have a design for mouse (hover states, pulldowns) and a design for touch (the hamburger) and they want to use only one or the other.

Re: Game about squares

#177
Cool game. When I saw so many points I immediately thought of 2048 but it is not that kind of game. But I like the clean look, the fun premise and the slightly snarky comments. :)

Re: Game about squares

#178
post #74

Earlier quoted context omitted.

I'm hoping the author is way ahead of us. If he were smart, the game should be approved in iTunes and uploaded to Google Play, just ready for him to click "Publish" the moment this web version picks up some traffic. Otherwise, Google Play will have a clone by the weekend if not sooner, and iTunes, maybe a week or two.

I'm the author. I'm not very smart...

Or you are and you didn't invest time making an iOS or Android app before confirming that this game is popular. You did nothing stupid.

Re: Game about squares

#179
post #63

The author is intentionally limiting this app to touch-only for touch-capable users. This breaks the game for anyone wanting to use a touchpad or mouse on their touchscreen laptop. The offending code (from http://gameaboutsquares.com/game.c.js , beautified): (function($) { try { document.createEvent("TouchEvent"); return; } catch (f) {} var eventMap = { mousedown : "touchstart", mouseup : "touchend", mousemove : "tou…

I have a touchscreen laptop, and both touch and mouse work perfectly for me. Firefox 31 here.

Is it multitouch? Could it be that there is no TouchEvent and the touch screen acts as mouse?

Re: Game about squares

#180
post #114

Earlier quoted context omitted.

Are you from the US? I'm from the UK and I really liked the comments too. I really find that people from the US are more likely to dislike humour in this kind of game. Especially Californians.

Ever notice how people from the UK tend to generalize in a condescending way that only really serves to highlight their backward, provincial attitudes? Sort of like this?

It's true, everyone in Britain generalises. One of the most common generalisations we have about Americans is that they don't get irony.
Post reply on HN