|
|
| A.cc ChristmasHack |
|
Billybob
Member #3,136
January 2003
|
You can't grab the ID, cookies are not accessible outside of the set domain (though there may be an option to make a cookie public...not that anyone does that). Your best bet for a "hack" would be to use cURL to access the A.cc login page. Have people give you their login info, then your script can attempt to login and if it works then you know it's them. EDIT: Looking at AWiki it sends people to:
|
|
Jakub Wasilewski
Member #3,653
June 2003
|
Quote:
Your best bet for a "hack" would be to use cURL to access the A.cc login page. Have people give you their login info, then your script can attempt to login and if it works then you know it's them. Not to mention that I wouldn't trust a semi-random person with my login data for A.cc. That's not really a solution, and BAF mentioned that a better one exist (AWiki uses it), so... [EDIT] It seems that "/account/login/" passes a "token" to the URL provided. Whatever that token means... I think I will just PM Matthew and see if he is willing to help me out. --------------------------- |
|
Billybob
Member #3,136
January 2003
|
Well EDIT: Beaten!
|
|
BAF
Member #2,981
December 2002
|
Token looks like a session ID of some sort to me... not sure, but it looks fairly easy to handle to me, run the login then store your data. |
|
Jakub Wasilewski
Member #3,653
June 2003
|
Quote: Token looks like a session ID of some sort to me... not sure, but it looks fairly easy to handle to me, run the login then store your data. OK, the fact of returning a token means that the user is in fact a member of A.cc. But, I'd like to be able to discern which of the members is it. AWiki does that, it has e.g. the %avatar% tag which can display my avatar - so it knows who I am. Somehow, it must get that info from the token. Maybe I just didn't understand what you said, I'm getting a little sleepy --------------------------- |
|
Billybob
Member #3,136
January 2003
|
My guess is that AWiki takes the token and gives it to another a.cc script which returns user info. The process may seem redundent but it isn't. By having the server contact a.cc personally with an arbitrary hash it can be sure the data it gets is from A.cc, and not the user.
|
|
Jakub Wasilewski
Member #3,653
June 2003
|
I hope to hear from either Matthew or Thomas Fjellstrom (he is the one managing AWiki, right?) soon. Meanwhile, I'll proceed with making other parts of the site. Once I get the required information I'll plug in the A.cc authentication. --------------------------- |
|
BAF
Member #2,981
December 2002
|
William: the returning of a token doesnt automatically mean you're logged in correctly, but the point was you won't recieve a real token unless you logged in correctly. |
|
Jakub Wasilewski
Member #3,653
June 2003
|
I already got a reply from Matthew and I'm currently plugging it into the code. Once I'm done, I will put it up on the net. --------------------------- |
|
Billybob
Member #3,136
January 2003
|
I'm curious as to what he said...
|
|
BAF
Member #2,981
December 2002
|
Remote a.cc authentication is great for stuff like this. Perhaps amarillion and I could set this up for TINS/TINS uploading too. |
|
Jakub Wasilewski
Member #3,653
June 2003
|
WH: Matthew asked me not to spread the information, but basically you had the right idea. Everything is already set up and working. I'll queue a news item for the front page, and give you all the details here. Right now you can:
If you are logged in on A.cc, registration should be really simple. There is no e-mail verification, so be sure you get it right the first time The link: http://xmashack.bafsoft.com Enjoy! It's 3:17 here, and I'm going to have nice three hours of sleep --------------------------- |
|
Billybob
Member #3,136
January 2003
|
It isn't working. I am logged in but it says my member # is 0. Also it failed the first time I tried (url was broken).
|
|
BAF
Member #2,981
December 2002
|
You have to hit 'register' first. It worked fine for me, pretty cool! Great job! |
|
Jakub Wasilewski
Member #3,653
June 2003
|
Try now. Everything should be up by now. If it's not, it'll have to wait until tomorrow, I can't think straight anymore. --------------------------- |
|
nonnus29
Member #2,606
August 2002
|
I think the contest should require everyone to use a language they haven't previously used to code their entry. Like ruby or scheme using kazzmirs bindings. That would really show us who is king of christmas hackery mountain. edit; nice site, I registered! (maybe I'll feel like coding around christmas time...) |
|
BAF
Member #2,981
December 2002
|
Thanks! Good night! |
|
Billybob
Member #3,136
January 2003
|
It works now, yay! I'm all registered and I've voted. Thanks for all the hard work Jakub! This is going to be fun
|
|
Onewing
Member #6,152
August 2005
|
Quote: Like ruby or scheme using kazzmirs bindings
Scheme? I hate you. [EDIT] - Just signed up! Now let's get this thing more popular! I say, continually send-to-top until the event starts. BTW, if you vote on something with "so-so", is it possible that you might get that as the game your expected to do? ------------ |
|
Matthew Leverton
Supreme Loser
January 1999
|
The Rules said: the [1MB] ZIP must contain (apart from game data):
The binary requirement is unnecessary and impractical. Just change it so that only the (cross platform) source & datafiles are required. |
|
ImLeftFooted
Member #3,935
October 2003
|
One megabyte o_O!? Are you sure about that rule... ? |
|
Jakub Wasilewski
Member #3,653
June 2003
|
Quote: The binary requirement is unnecessary and impractical. Just change it so that only the (cross platform) source & datafiles are required. I liked to make an alternative for users of external libraries. For example, getting 3 libs installed just to compile a game is boring/tiring, while the binary version can ship with DLLs/whatever shared libs the system uses. On the other hand, preparing a cross-platform makefile (or even just a makefile) takes some work, and even then MSVC only users won't be satisfied. And I wouldn't like to split the "develop for" tick-boxes to cover compilers I'm going to reword the rules a little, possibly making binary for the two systems an "encouraged option", and the source - required. I will also add information about the screening process (I overlooked it the first time). Anyway, I have a small upgrade for you - looking at your participation page, you will be able to see how your descriptions are rated. Red is below the screening threshold, green is good. [Corrected this: now gives the right figures [edit] [RULESET UPDATED!] Source is now a requirement, binary is an encouraged option. Quote: One megabyte o_O!? Are you sure about that rule... ? We won't have as many participants as SpeedHack/TINS, so that shouldn't be a problem. And even if it would be a problem, it would be BAF's call to make the limit smaller (he provides the bandwidth). --------------------------- |
|
NyanKoneko
Member #5,617
March 2005
|
If we host elsewhere, can we upload more than a 1 megabyte project? The Allegro DLL is like 800kb alone. I really want to focus on giving as much as possible (MP3s, art, etc...), as opposed to worrying about space constraints. ----------------- |
|
Jakub Wasilewski
Member #3,653
June 2003
|
Quote: The Allegro DLL is like 800kb alone. I really want to focus on giving as much as possible (MP3s, art, etc...), as opposed to worrying about space constraints. The Allegro DLL when properly prepared is only like 250kb, and you don't have to distribute it with your game (take note of the fact that the rules were updated). We can probably safely assume that everyone has or knows where to get 4.2.0 shared libs. The 1mb requirement is already extremely lenient in comparison to other hacks. I don't think we should push it further. I could allow adding an "extended version" link to a ZIP hosted externally, in addition to the "hack version" hosted on BAFSoft. I'll think about it and let you know, OK? --------------------------- |
|
miran
Member #2,407
June 2002
|
Quote: If we host elsewhere, can we upload more than a 1 megabyte project?
Make your game download the data when it is started for the first time. -- |
|
|
|