Live data from Hacker News

Game about squares

gameaboutsquares.com

141–150 of 208 posts

Re: Game about squares

#141

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

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.

Re: Game about squares

#143

And go! Tomorrow this game in full will appear on the Google Play store with the exact same colors. In 3 days this game will be rewritten in Swift, Erlang, and have a community based variation. In 4 days someone will find a way to merge this game with 2048 and Flappy Bird. In a week there will be 20 variations of this game including one called Dodge Squares on the iTunes App Store. I'm not psychic, I've just seen thi…

Check it out :)

https://play.google.com/store/apps/details?id=com.chuger.squ...

Re: Game about squares

#144
post #99

Suggestion : add keybindings. I'm spoiled by 2048 I want direct repeated manipulation at my finger tips. :)

Maybe tab to change the selected square and enter to make it move, since there's only one direction?

Or numbers/numkeys + enter.

Re: Game about squares

#145
post #31

Earlier quoted context omitted.

Sokoban rules, you can get it for free here: http://www.abandonia.com/en/games/231/Sokoban.html You need DosBox to play that. But there's probably a multitude of online clones as well.

I made a web based one a few years ago which I'll take the opportunity to shamelessly plug: http://sokobanjs.com

And here's a text-terminal version in a couple pages of Python: https://github.com/darius/sturm/blob/master/sokoban.py -- I'd like to see more small, readable game implementations to learn from.

Re: Game about squares

#146
post #99

Suggestion : add keybindings. I'm spoiled by 2048 I want direct repeated manipulation at my finger tips. :)

Maybe tab to change the selected square and enter to make it move, since there's only one direction?

For up to four squares (npi) I thought a simple mapping A S D F would do. Pressing A pushes Square A in its current direction. Squares would have the letter tagged on them subtly.

Re: Game about squares

#147

It should be possible to write a solver for this with a "decision tree". There are decisions where the blocks run out of the screen - you ignore these. You only take into account "sensible" decisions (this has to be formalized). When there are multiple possible "sensible" decisions you branch. One decision consists of an action "click x times on block X and y times on block Y …"

Should be far easier to create a heuristic search solution. Very naively you could probably get good results by exploring nodes in order by sum of distances from blocks to colour points if blocks could move in any direction. You'll eliminate most of the move away and out of screen behaviours naturally and by preventing the exploration of a previously explored state. You could explore better heuristics but given that the branching factor is only n where n is the number of blocks, most puzzles are solved in under 50 moves and most solutions get pruned quickly both position duplication or bad solutions quickly mangling the heuristic. The hard problems for this program are ones where you have to make a whole sequences of moves away from the objective in order to get a key directional move that accomplishes it.

Re: Game about squares

#148
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 of the solver's code at one point, although now I've expanded them a bit to improve memory efficiency.

I love D.

Re: Game about squares

#149
post #107

Earlier quoted context omitted.

I found myself following a constraint-satisfaction approach to prune the search. I'd quickly work out the unrecoverable conditions to put constraints on the overall possible moves, then start thinking about possible states both forward from the start and backward from the solution, and consider the requirements to reach those states. That tends to produce new unrecoverable conditions and prune the search further. Sti…

You perfectly described my process so now there's 2 data points. If anyone else had some different way please share.

Everything you said, plus - in the last levels I usually tried to find "the difficult thing" first. After looking at the push directions a bit, it becomes obvious that the difficult thing is going to be to position the red square, say. Then imagine possible solutions to the difficult thing, and go both forwards (after it's done the end is usually close) and backwards (how to set up the solution).

Re: Game about squares

#150

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…

Nice work.
Post reply on HN