Page 1 of 1

Re: To authors of "a virtual date with..."

PostPosted: Sun, 10Apr18 10:13
by kicks
Okay, so i'm kind of a lurker... anyways I like your "a virtual date with" games. However the cookies drives me nuts, and are totally not needed. And I think it just slows down and complicates your process making these games.

So I'm here to present a solution of how to save the state of a game without cookies, yay!

You simply do it with an iframe, ofc you could also use a frameset, anyways, enough talk, here's some code:

index.html
Code: Select all


  var state = "blaha";










page1.html
Code: Select all


Save state and go to page 2





page2.html
Code: Select all



document.write(parent.state);





Happy coding!

Re: To authors of "a virtual date with..."

PostPosted: Sun, 10Apr18 10:39
by tlaero
That's kind of similar to how ArianneB did things. Chaotic did his addon to her game using that technique, but didn't like it.

I think the real problem with cookies is that Chaotic and Phreaky are making their decisions based on the existence of the cookie, rather than its value. This means they need to accurately delete the cookies when they're done. Unfortunately, how and when cookies are deleted is non-standard across browsers.

However, all browsers support the same method for writing a value to and reading the value from a cookie. So if chaotic and phreaky and any others jump into this switch to using the cookie's value (with 0 meaning they haven't done it and 1 meaning they have), things would go a LOT smoother.

I uploaded an example of this to rapidshare for Phreaky and Chaotic to look at. Chaotic hasn't changed his technique yet, but I have high hopes for Phreaky. (-:

Tlaero

Re: To authors of "a virtual date with..."

PostPosted: Sun, 10Apr18 10:50
by Squeeky
Let's get this clear.

"a virtual date with..."?

You have an adversity towards cookies but do you have "Ariane" in mind?

ArianeB employs Javascrïpt variables to navigate the environment. I note "Ariane" is composed in MS Frontpage 4.0.

But yes "Amy" and Chaotic games use cookies.

I doubt that you'll make any impact on Chaotic as he seems to be infrequent of late. Phreaky, well? He may have been given good advice.

Let me not appear to be dismissive, but might this be well transferred as advice to future developers by going over to "Projects"?

Re: To authors of "a virtual date with..."

PostPosted: Sun, 10Apr18 14:34
by yawner
Iframes? Come on. Don't make one step forward and then one backward. Javascrïpt and variables in it don't need iframes/framesets to be working great in such games.

Re: To authors of "a virtual date with..."

PostPosted: Sun, 10Apr18 15:33
by Squeeky
yawner wrote : Iframes? Come on. Don't make one step forward and then one backward. Javascrïpt and variables in it don't need iframes/framesets to be working great in such games.

I am beginning to explore this. I note from a reference quite some years old that IFrames was not exactly "cool", clearly you maintain that view.

My thought was for Frames/Framesets.

Could we take this into "Projects", explore benefits etc?
My prime consideration is that I can bring up an Alt with mouseover on an href within IE but not in FireFox. Ariane does offer this.

Maybe I need to explore things like "this.window. ..." a bit more, but others might like some insights thus my suggestion to open a project thread. Frankly I have a personal direction but probably not a well guided one.

Re: To authors of "a virtual date with..."

PostPosted: Sun, 10Apr18 19:56
by erana
As a developer of "A date with..."(sic) content myself (remember, I made the first Ariane add-on), I must say that Tlaero is, once again, right. You CAN do things with variables -which need some way of keeping track of the variable value along the game (and one working way is using a frame, either an iframe or a parent frameser, and defining the variable on it), AND you CAN do it with cookies -which need a control of them, the best way of which is to relie on the VALUE of the cookie; basicaly, usingthe cookies as variables without a frame.

Both things have their uses. Both can be done poorly. Both CAN be done right.

And as I said, Tlaero certainly seems to know what he talks about .

BTW, personally, I'm more at ease with variables than with cookies, but to each coder his/her style.

Re: To authors of "a virtual date with..."

PostPosted: Mon, 10Apr19 11:11
by tlaero
Thank's Erana,

I personally prefer variables too. But I REALLY prefer having people write more of these games. I understand that the cookies are easier to wrap your head around than Jscrïpt variables. So that's why I'm suggesting that route. I'd rather more well done cookies than fewer well done variables. (-:

Tlaero

Re: To authors of "a virtual date with..."

PostPosted: Mon, 10Apr19 12:50
by Arnulf
tlaero, I can imagine, why you prefer ( as I do)the variables: You can see in the codes directly, what's up with the variables ans also can see directly the outcome of the same. [img]smile/xuh.gif[/img] [img]smile/xread.gif[/img] [img]smile/xidea.gif[/img] [img]smile/085.gif[/img] [img]smile/xsgrin.gif[/img]

Re: To authors of "a virtual date with..."

PostPosted: Mon, 10Apr19 14:42
by Squeeky
Yes, the "algebra", if I may use that term slightly out of context.

Re: To authors of "a virtual date with..."

PostPosted: Sun, 10Sep05 18:47
by gnoggle
hey
I've been trying to make a game in this style (not a dating sim, admittedly, but oh well). I've tried using cookies but i really don't like them, and from what i can see of this system, it appears far more elegant.

however, i can't figure out how to make the program act upon a variable. basically, i want to create an image map, and when you click on a section it takes you onto one page if the variable is true (=1), and another if it is false (=0). I've look at the codes for ArianeB, but i can't figure out how he does it.

any help would be much appreciated. thanks :D

(ps, does this comment belong here or should i have put it somewhere else?)

-----------

EDIT: never mind, i figured out a way!

Re: To authors of "a virtual date with..."

PostPosted: Mon, 10Sep06 11:29
by tlaero
gnoggle, I wrote a tool called "AdventureCreator" to make writing these kinds of games easier. There's a link to it in the projects section of the forum.

It uses cookies, but does them the right way so that they work in all browsers. It also comes with an example that shows how to act on variables, etc.

Tlaero