HNHacker News
TopNewBestAskShowJobs

sergejsb

19 karma · joined June 3, 2014

submissionscomments
sergejsb··on Show HN: Math Machine – a game based on the concept of a stack machine
FYI - I wasn't able to find your app on my nexus when searching for "math machine". I found it only when looked for "woodencloset".

As for the app - great idea and nice implementation, but for someone who understands what to do right from the beginning, "hints"-popups are really annoying. Maybe add a button "I know what I'm doing" or something like that to allow to skip them?

sergejsb··on A texture-mapped raycaster in 128 bytes
To my understanding - yes, all "assets" are typically included. In most of the cases though, all assets (textures, geometry, sounds, camera paths) are generated during runtime. More information can be found, for example here: http://iquilezles.org/www/index.htm
sergejsb··on Flappy Bird in Swift
A couple more interesting swift features that seemed a bit weird to me after skipping through the reference:

1. Strings, arrays and dictionaries are value types (like structs in C# - stored on stack, not on the heap) with special copying rules for arrays.

2. Custom operators - can be defined as a sequence of "/ = - + * % < > ! & | ^ . ~" characters and made prefix, infix or postfix. There is an example in the reference that defines a prefix operator "+++" for vectors

sergejsb··on Flappy Bird in Swift
Are you sure this should work? I checked the grammar once more and it seems that closure-expression should always be enclosed in { ... }
sergejsb··on Flappy Bird in Swift
I don't have XCode to try it out, but according to the book, you can replace

  var spawn = SKAction.runBlock({() in self.spawnPipes()})
with

  var spawn = SKAction.runBlock({self.spawnPipes()})
or even

  var spawn = SKAction.runBlock() {self.spawnPipes()}
or

  var spawn = SKAction.runBlock {self.spawnPipes()}
EDIT: formatting for code