jonathanasdf
3910 posts
|
|
|
|
jonathanasdf
3910 posts
|
Topic: Game Programming /
Leap Motion
Originally posted by NineFiveThree:
Except that this kind of control is actually quite tiring.
more tiring than this?
http://www.youtube.com/watch?feature=player_embedded&v=qpHWJMytx5I
|
|
|
jonathanasdf
3910 posts
|
Topic: Game Programming /
Google Code Jam 2013
thanks.
I usually never try for the efficient solution right away, but rather go for something that solves the small fast. Chances are, in the process of coding that, you will gain some insights into the problem.
I had to recode both A and B in order to solve the large.
|
|
|
jonathanasdf
3910 posts
|
Topic: Game Programming /
Google Code Jam 2013
http://www.go-hero.net/jam/13/name/Jonathanasdf
ugh i can’t believe people other than me used cool, pike, and haxe.. guess i need to choose weirder languages next time.. (not that haxe is really weird or anything though)
|
|
|
jonathanasdf
3910 posts
|
Topic: Game Programming /
Google Code Jam 2013
The official analysis is always posted quite soon after the round ends. You can find it by clicking “Contest Analysis” on the sidebar (https://code.google.com/codejam/contest/2270488/dashboard#s=a)
|
|
|
jonathanasdf
3910 posts
|
Topic: Game Programming /
Google Code Jam 2013
pssh brainfuck is so easy… take a look at KirarinSnow’s Whirl solution
http://www.go-hero.net/jam/13/name/KirarinSnow
|
|
|
jonathanasdf
3910 posts
|
Topic: Game Programming /
Google Code Jam 2013
“accidentally fell asleep and woke up 12 hours later”
|
|
|
jonathanasdf
3910 posts
|
|
|
|
jonathanasdf
3910 posts
|
|
|
|
jonathanasdf
3910 posts
|
Topic: Game Programming /
Secure Remember Me
If you don’t have access to javascript sure. Timeouts/expirations/whatever is handled by the server anyways so I don’t see why it matters where you store the sid client-side.
|
|
|
jonathanasdf
3910 posts
|
Topic: Game Programming /
Adobe Roadmap - Goodbye Actionscript "Next" and changes to Premium/licensing
Not sure, you don’t need a complete overhaul of the language and architecture in order to make some drastic improvements. Obviously it won’t be as good as scrapping everything and starting over, but the costs will be much less.
|
|
|
jonathanasdf
3910 posts
|
Topic: Game Programming /
Global Game Jam 2013
scoreboard is completely local so… I would be afraid that your computer has been hacked into if you weren’t leading!!
|
|
|
jonathanasdf
3910 posts
|
|
|
|
jonathanasdf
3910 posts
|
Topic: Game Programming /
Identical, but not equal
I would suggest when creating the arrays to create some hash and keep it updated. Then, you can be pretty sure with quite high confidence that the arrays are different.
|
|
|
jonathanasdf
3910 posts
|
Topic: Game Programming /
Al Zimmermann's contest.
since I gave up on the topcoder $10k contest I’m gonna start taking a crack at this eventually…
EDIT: Ok the trivial solution ((2n-3)-step) gives me a score of 8.95, which basically means that even at the top end k is not too much smaller than n… of the solutions found so far.
Anyways, I think the breakthroughs to good scores will be from adding random big numbers and suddenly getting a useful number. When you mix addition and multiplication together lots of complicated and weird things happen. I think any solution which generates all the factors and then multiplies them together is not going to be the optimal one (for the larger cases).
|
|
|
jonathanasdf
3910 posts
|
Topic: General Gaming /
Guild Wars 2 Guide
better guide:
Do the events and hope you get a legendary craft. Seriously can’t believe the Karka event just gave them out like that… 150 gold!!
|
|
|
jonathanasdf
3910 posts
|
Topic: Game Programming /
Rainbow Math!
Originally posted by Aaants:
Color.interpolateColor works for what you’re trying to achieve.
Nice, did not know that method existed.
|
|
|
jonathanasdf
3910 posts
|
Topic: Game Programming /
Rainbow Math!
Look into RGB to HSV transformations. You can do a simple lerp in HSV space to accomplish this. There are probably more complicated ways to get better control over the transition though, such as specifying intermediate colors and whatnot.
|
|
|
jonathanasdf
3910 posts
|
Topic: Game Programming /
How Would You Do This? - #6 - Pathing
Originally posted by BobJanova:
I’d quantise the cubic spline because as others have said there is no trivial way to find evenly spaced points on one in its raw form. (You basically have to guess and then use N/R or something similar to converge on the right spot.) This seems to be something of a consensus.
Hrm I’m not very knowledgeable about this but I don’t see why it’s not doable… If you have a curve you can then parametrize it with the arclength parametrization and then increase the parameter at a constant rate. The math will probably be a bit involved though, but I’m sure there’s gotta be some research out there with closed form solutions for B-splines at least.
Of course, that’s not really a great use of the programmer’s time…
|
|
|
jonathanasdf
3910 posts
|
Topic: Game Programming /
Interesting Web Social Engineering Security Hole
lol… I like how the younger people on this forum are all pushing for using stuff like noscript or never using ctrl+F and blaming “uneducated people” for falling for scams, while the more senior people are all accepting that this is a potentially harmful exploit compared with the other phishing scams out there, and are agreeing that blocking javascript or not using the find feature is just plain ridiculous.
/flameshield
I personally would never block javascript, or even rely on whitelists, since I use stumbleupon, and whitelisting every site I stumble on defeats the purpose of whitelisting in the first place. It is entirely possible to make a phishing site that still contains very interesting content and makes it to the top of reddit for example. Who immediately goes to check the source code of every page they visit before assuming it’s safe? Especially if it has over 1000 upvotes in reddit? Whitelisting things only go so far, is a general hassle, and the scammers are not going to be targeting anyone savvy enough to use a whitelist in the first place.
|
|
|
jonathanasdf
3910 posts
|
Topic: Game Programming /
Interesting Web Social Engineering Security Hole
I definitely agree this is something to be taken seriously, and that people like Senekis are in the extreme minority. However, I fail to see how it can be actually used in a real phishing attack. Generally, for both passwords and credit cards, more information is needed to be able to use them, such as the account the password is for, or the expiration date of the card. I can’t quite see how this strategy can extract more than a single piece of information…
|
|
|
jonathanasdf
3910 posts
|
Topic: Game Programming /
Sticky Thread && Your Source Code
well this is just some neat way to check neighbours on a grid that I’ve grown fond of doing. Actually, there’s 2 tricks in 1 here. Written in C++ because my AS3 syntax has gotten rusty :/ Done as a BFS for example, but really applies to whatever (for example A* on grid)
int dd[5] = {0,1,0,-1,0};
// Takes a square grid of . and #, and returns the length of the shortest path from (sr, sc) to (tr, tc)
// Assumes (sr, sc) and (tr, tc) are within the grid and are . tiles. If no path exists returns -1.
int bfs(int n, char grid[n][n], int sr, int sc, int tr, int tc) {
// Resize grid and pad the sides with #
char g[n+2][n+2];
for (int i=0; i < n+2; i++) g[0][i]=g[i][0]=g[n+1][i]=g[i][n+1]='#';
for (int i=0; i < n; i++) for (int j=0; j < n; j++) g[i+1][j+1] = grid[i][j];
// BFS distance array
int dist[n][n]; for (int i=0; i < n; i++) for (int j=0; j < n; j++) dist[i][j] = n*n;
dist[sr][sc] = 0;
// Queue of what to expand next
queue<pair<int, int> > q;
q.push(make_pair(sr, sc));
while(!q.empty()) {
int r = q.front().first, c = q.front().second; q.pop();
if (r == tr && c == tc) return dist[r][c];
for (int i=0; i < 4; i++) {
int rr = r + dd[i], cc = c + dd[i];
if (g[rr][cc]=='.' && dist[rr][cc] > dist[r][c]+1) {
dist[rr][cc] = dist[r][c]+1;
q.push(make_pair(rr, cc));
}
}
}
return -1;
}
|
|
|
jonathanasdf
3910 posts
|
Topic: Game Programming /
Creating an encoder/encryption class
or take some intro class online: https://www.coursera.org/course/crypto http://www.udacity.com/overview/Course/cs387/CourseRev/apr2012
Note that these are classes on cryptography not encryption/encoding, which are almost completely different things (some encryptions use cryptographic principles though). Not quite sure what you wanted since your post talks about both but I couldn’t find any online classes on encryption/encoding…
|
|
|
jonathanasdf
3910 posts
|
Topic: Game Programming /
Determining the path of a line
I believe this is actually identical to the problem of finding an Euler path, assuming the grid actually is of a valid path (whether the grid is valid is easy to check. Assuming it’s connected, then for any cell if twice that cell’s value is not equal to the sum of the value of all its neighbours the grid is not valid. Special case for start and end cells).
The Euler path is by no means unique, but if you are guaranteed that the grid has an unique solution, you can use any algorithm to find Euler path (Fleurry’s, Hierholzer’s)
|
|
|
jonathanasdf
3910 posts
|
Topic: Game Programming /
Math problem (not my homework)
I totally can’t see the pattern in that draco :/
Anyways, hint2: http://pastebin.com/vuwNxKCk
Also player_03, no need to worry about duplicates. If you consider each rational as a pair of numbers (p,q), and if you let S=set of all pairs (p,q) with p,q integers >= 1, then if you can prove that you can map S to the integers, then you can also map any (infinite) subset of S to the integers. So, the set R={(p,q) such that gcd(p,q)=1} which is precisely the set of all positive rationals is countable.
|