5,226 reputation
11227
bio website vyznev.net
location Helsinki, Finland
age
visits member for 3 years, 1 month
seen 1 hour ago

I'm a PhD student in biomathematics, working on stochastic individual-based models of evolution in spatially structured populations. My other interests include cryptography, programming games and puzzles, photography and graphic design.

I started programming (in AmigaBASIC) when I was 10 years old. Nowadays, I'm most comfortable using Perl, C and JavaScript. I know Java and PHP too, but I can't really say I like them. I also know some Python, but not as much as I'd like.


CC-Zero Please consider any (original) code I post to Stack Overflow and other Stack Exchange sites to be released under CC-Zero unless stated otherwise. You may do whatever you want with it and don't have to credit me in any way, although of course that would be nice.


I'm the main author and maintainer of the Stack Overflow Unofficial Patch (SOUP), a user script for browsers with GreaseMonkey-compatible user script support (Firefox, Chrome, Opera, possibly Safari) that fixes or works around a number of outstanding issues with the Stack Exchange user interface.

I tend to answer a lot more questions than I ask. Some answers I'm rather proud of:


Mar
11
awarded  Custodian
Feb
22
comment Demo (and real game) Protection
One more trick would be to hardcode the MD5 / SHA hashes of each individual demo level file into the demo version. This has the advantage that, whereas just changing a single hash / signature key is fairly easy with a hex editor, increasing the number of hashes (to increase the number of playable levels) is somewhat trickier, at least if there's lots of other data following them.
Feb
2
awarded  Good Answer
Jan
24
awarded  Revival
Jan
21
awarded  Nice Answer
Jan
7
comment How does A* pathfinding work?
This answer could use a mention of what makes a heuristic admissible, in the sense of guaranteeing that A* will find the shortest path. (Briefly: To be admissible, the heuristic must never overestimate the actual distance to the target. Non-admissible heuristics may sometimes be useful, but they can cause A* to return suboptimal paths.)
Jan
5
comment Why don't we use octogonal maps instead of hexagonal maps?
3D does have a regular analogue of the hex grid, namely the FCC lattice, whose unit cell, the rhombic dodecahedron, is a Catalan solid (i.e. all its faces are identical and symmetric, even though not all the corners are). Haven't seen many games using it, though.
Dec
26
comment Controls: Rolling on a ceiling
Add some practice levels?
Dec
22
answered Trying to project a point onto a cubemap
Dec
22
comment Trying to project a point onto a cubemap
Do you want the point to stay stationary on the screen, or stationary with respect to the environment projected on the cubemap?
Dec
16
comment How do I synchronise real-time moves of players on a grid?
@DMGregory: That would still be forgeable, though, although not as easily -- a hacked client could pretend to be on a badly lagged connection by holding messages in a buffer for a while before sending them. This would allow it to edit the messages while they're in the buffer, effectively pre-dating the changes.
Dec
16
awarded  Nice Answer
Nov
28
comment How would one construct a realistic “infrared vision” effect?
Wikipedia. :) No, seriously, I knew that near IR isn't the same as thermal IR, and I've been interested in ray tracing and other fancy rendering techniques, so I knew they had applications to modeling radiative heat transfer. Most of the rest I just looked up. The thermal imprint thing was something I once saw a YouTube video about, I think.
Nov
28
answered Make fast thing look slow (Box2D)
Nov
25
awarded  Nice Answer
Nov
25
answered How would one construct a realistic “infrared vision” effect?
Nov
25
comment How would one construct a realistic “infrared vision” effect?
@ratchetfreak: You only need to divide by the square of the distance for point sources (or things you're approximating as point sources). For extended objects, you should keep the luminance (read: brightness per pixel) constant, while the solid angle (read: number of pixels on screen) covered by the object falls off as the inverse square of distance due to perspective.
Nov
15
comment Flashing candle light
In addition to varying the light intensity, you may also want to move the light source slightly around its nominal location to make it flicker more realistically.
Nov
7
answered Multithreading 2D gravity calculations
Nov
7
comment Multithreading 2D gravity calculations
The nice thing about using quad/octrees for gravity simulation is that, instead of just ignoring distant particles, you can store the total mass and the center of mass of all particles in each branch of your tree and use this to calculate the average gravitational effect of all the particles in this branch on other, distant particles. This is known as the Barnes-Hut algorithm, and it's what the pros use.