Ways-to-not-make-money / wtnmm-javascript

http://ways-to-not-make-money.github.io/wtnmm-javascript
Creative Commons Zero v1.0 Universal
1 stars 0 forks source link

enable cookies #2

Open bortkiewicz opened 8 years ago

bortkiewicz commented 8 years ago

Does this use cookies to store the current stats and stuff?

hanyuone commented 8 years ago

How?

bortkiewicz commented 8 years ago

Like it stores data somewhere (mainly on the user's computer) to store the data for later use?

hanyuone commented 8 years ago

No, I understand that - I mean, how are we going to use cookies? How are we going to store data in the user's computer?

bortkiewicz commented 8 years ago

Forget that. Upload all of the data onto a repository on Github.

bortkiewicz commented 8 years ago

https://www.google.com/search?q=javascript+write+to+file&ie=utf-8&oe=utf-8#q=https+cookies

bortkiewicz commented 8 years ago

HELLO, @DerpfacePython ?

hanyuone commented 8 years ago

What? This issue is practically solved. Also, can you please style the page, @testitem? Thanks.

bortkiewicz commented 8 years ago

Is not solved! Oh, I styled the page already.

hanyuone commented 8 years ago

@testitem When I said styling - I meant style the actual game itself, not the page that holds the game. In fact, I don't think that extra bit at the top should even be there at all - this is meant to be a game, after all, not a webpage. Just fix up the styling of the actual game so that it looks better.

We can do cookies after we:

hanyuone commented 8 years ago

Hello, are you reading this, @testitem?

bortkiewicz commented 8 years ago

Yes, of course I am? I am still working on more upgrades

hanyuone commented 8 years ago

@testitem Like what?

bortkiewicz commented 8 years ago

Pretty much all the upgrades in P0.7 and upgrade hiding

hanyuone commented 8 years ago

I'm still trying to figure out how to include cookies (using js-cookie, which I'll include in the require folder). Just an update.

bortkiewicz commented 8 years ago

It's easier when you read the entire Cookie Clicker source code because they use cookies to store data. Well, the source code is much too long for you to read it in a short amount of time.

bortkiewicz commented 8 years ago

I added js-cookie. Now i'm getting thoroughly annoyed that I have to import jc-cookie from main.js when they are in two different branched folders.

hanyuone commented 8 years ago

Yeah, js-cookie is great... but I just have no idea how it works.

bortkiewicz commented 8 years ago

Uh.. docs?

bortkiewicz commented 8 years ago

i.e. https://github.com/js-cookie/js-cookie/wiki?

hanyuone commented 8 years ago

I just have no idea how to access the cookie itself with Cookie.get(), do I declare it as a variable? Do I just call the function? What do I do?

bortkiewicz commented 8 years ago

well basically the readme animation says all.

Make a cookie: Cookie.set(name, value) Get the data: Cookie.get(name) Remove the cookie: Cookie.remove(name)

bortkiewicz commented 8 years ago

NO. No variable

bortkiewicz commented 8 years ago

just like that.

P.S. I need to eat breakfast now. Bye

bortkiewicz commented 8 years ago

Oh well just encode the data into a cookie.

bortkiewicz commented 8 years ago

i.e. <money>|<AC-s>|<AC-price>|<MP-s>|<MP-price>|<SC-s>|<SC-price>|<CC-s>|<CC-price>|<BH-s>|<BH-price>|<the-upgrades-purchased>